mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-03 21:53:23 +08:00
Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into dev
This commit is contained in:
@@ -32,6 +32,10 @@ function useNavigation() {
|
|||||||
return route?.meta?.openInNewWindow ?? false;
|
return route?.meta?.openInNewWindow ?? false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const resolveHref = (path: string): string => {
|
||||||
|
return router.resolve(path).href;
|
||||||
|
};
|
||||||
|
|
||||||
const navigation = async (path: string) => {
|
const navigation = async (path: string) => {
|
||||||
try {
|
try {
|
||||||
const route = routeMetaMap.get(path);
|
const route = routeMetaMap.get(path);
|
||||||
@@ -40,7 +44,7 @@ function useNavigation() {
|
|||||||
if (isHttpUrl(path)) {
|
if (isHttpUrl(path)) {
|
||||||
openWindow(path, { target: '_blank' });
|
openWindow(path, { target: '_blank' });
|
||||||
} else if (openInNewWindow) {
|
} else if (openInNewWindow) {
|
||||||
openRouteInNewWindow(path);
|
openRouteInNewWindow(resolveHref(path));
|
||||||
} else {
|
} else {
|
||||||
await router.push({
|
await router.push({
|
||||||
path,
|
path,
|
||||||
|
|||||||
Reference in New Issue
Block a user