mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 02:00:25 +08:00
fix(router): resolve menu loading failure when permission is in "role mode" (#3660)
closed #3655
This commit is contained in:
parent
a4cc1d5316
commit
c7631fed68
@ -33,9 +33,7 @@ function joinParentPath(menus: Menu[], parentPath = '') {
|
||||
|
||||
// Parsing the menu module
|
||||
export function transformMenuModule(menuModule: MenuModule): Menu {
|
||||
const { menu } = menuModule;
|
||||
|
||||
const menuList = [menu];
|
||||
const menuList = [menuModule];
|
||||
|
||||
joinParentPath(menuList);
|
||||
return menuList[0];
|
||||
|
@ -10,7 +10,7 @@ import { router } from '@/router';
|
||||
import { PermissionModeEnum } from '@/enums/appEnum';
|
||||
import { pathToRegexp } from 'path-to-regexp';
|
||||
|
||||
const modules = import.meta.glob('./modules/**/*.ts', { eager: true });
|
||||
const modules = import.meta.glob('../routes/modules/**/*.ts', { eager: true });
|
||||
|
||||
const menuModules: MenuModule[] = [];
|
||||
|
||||
|
@ -51,10 +51,7 @@ export interface Menu {
|
||||
hideMenu?: boolean;
|
||||
}
|
||||
|
||||
export interface MenuModule {
|
||||
orderNo?: number;
|
||||
menu: Menu;
|
||||
}
|
||||
export type MenuModule = Menu;
|
||||
|
||||
// export type AppRouteModule = RouteModule | AppRouteRecordRaw;
|
||||
export type AppRouteModule = AppRouteRecordRaw;
|
||||
|
Loading…
Reference in New Issue
Block a user