diff --git a/src/stores/modules/auth.ts b/src/stores/modules/auth.ts index 6d9e08b..e8370ce 100644 --- a/src/stores/modules/auth.ts +++ b/src/stores/modules/auth.ts @@ -95,7 +95,6 @@ export const useAuthStore = defineStore({ // 构建页面与按钮的映射关系 buildPageButtonMap() { const pageButtonMap: PageButtonMap = {}; - // 递归处理路由,建立页面与按钮的关联 const processRoutes = (routes: any[], parentPageName?: string) => { routes.forEach((route: any) => { @@ -105,7 +104,6 @@ export const useAuthStore = defineStore({ if (!pageButtonMap[route.name]) { pageButtonMap[route.name] = []; } - // 处理子节点中的按钮权限 if (route.children && route.children.length > 0) { route.children.forEach((child: any) => { @@ -126,7 +124,6 @@ export const useAuthStore = defineStore({ } }); }; - processRoutes(this.authMenuList); this.pageButtonMap = pageButtonMap; },