mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 14:13:40 +08:00
perf: the routeModule can ignore the layou configuration without writing
This commit is contained in:
@@ -87,8 +87,13 @@ export async function getFlatChildrenMenus(children: Menu[]) {
|
||||
function basicFilter(routes: RouteRecordNormalized[]) {
|
||||
return (menu: Menu) => {
|
||||
const matchRoute = routes.find((route) => {
|
||||
if (route.meta && route.meta.carryParam) {
|
||||
return pathToRegexp(route.path).test(menu.path);
|
||||
if (route.meta) {
|
||||
if (route.meta.carryParam) {
|
||||
return pathToRegexp(route.path).test(menu.path);
|
||||
}
|
||||
if (route.meta.ignoreAuth) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return route.path === menu.path;
|
||||
});
|
||||
|
Reference in New Issue
Block a user