mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 11:35:58 +08:00
fix(menu): fix externalLink not work
This commit is contained in:
@@ -89,12 +89,17 @@ export async function getFlatChildrenMenus(children: Menu[]) {
|
||||
function basicFilter(routes: RouteRecordNormalized[]) {
|
||||
return (menu: Menu) => {
|
||||
const matchRoute = routes.find((route) => {
|
||||
if (route.meta.externalLink) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (route.meta) {
|
||||
if (route.meta.carryParam) {
|
||||
return pathToRegexp(route.path).test(menu.path);
|
||||
}
|
||||
if (route.meta.ignoreAuth) return false;
|
||||
if (route.meta.ignoreAuth) return true;
|
||||
}
|
||||
|
||||
return route.path === menu.path;
|
||||
});
|
||||
|
||||
|
@@ -15,7 +15,7 @@ const menu: MenuModule = {
|
||||
name: 'routes.demo.iframe.doc',
|
||||
},
|
||||
{
|
||||
path: 'docExternal',
|
||||
path: 'https://vvbin.cn/doc-next/',
|
||||
name: 'routes.demo.iframe.docExternal',
|
||||
},
|
||||
],
|
||||
|
Reference in New Issue
Block a user