Browse Source

🎟 优化

master
wangxiang 3 years ago
parent
commit
75ff82f1b4
  1. 3
      kicc-ui/src/store/modules/permission.ts

3
kicc-ui/src/store/modules/permission.ts

@ -111,13 +111,14 @@ export const usePermissionStore = defineStore({ @@ -111,13 +111,14 @@ export const usePermissionStore = defineStore({
/** 构建菜单与路由 */
let routeList: AppRouteRecordRaw[] = [];
try {
let routeList: AppRouteRecordRaw[] = (await getMenuList()) as AppRouteRecordRaw[];
routeList = (await getMenuList()) as AppRouteRecordRaw[];
transformObjToRoute(routeList);
const menuList = transformRouteToMenu(routeList);
this.setMenuList(menuList);
// 过滤忽略路由配置项,只构建菜单不构建路由
routeList = filter(routeList, routeRemoveIgnoreFilter);
patchHomeAffix(routeList);
console.log(routeList);
} catch (error) { console.error(error); }
return routeList;
}

Loading…
Cancel
Save