mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 12:12:01 +08:00
fix(locale): fix locale.show not work
This commit is contained in:
@@ -20,6 +20,7 @@ import { transformRouteToMenu } from '/@/router/helper/menuHelper';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
// import { warn } from '/@/utils/log';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { PAGE_NOT_FOUND_ROUTE } from '/@/router/constant';
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const NAME = 'permission';
|
||||
@@ -109,7 +110,8 @@ class Permission extends VuexModule {
|
||||
if (!paramId) {
|
||||
throw new Error('paramId is undefined!');
|
||||
}
|
||||
let routeList: any[] = await getMenuListById({ id: paramId });
|
||||
let routeList = (await getMenuListById({ id: paramId })) as AppRouteRecordRaw[];
|
||||
|
||||
// 动态引入组件
|
||||
routeList = transformObjToRoute(routeList);
|
||||
// 后台路由转菜单结构
|
||||
@@ -117,7 +119,7 @@ class Permission extends VuexModule {
|
||||
|
||||
this.commitBackMenuListState(backMenuList);
|
||||
|
||||
routes = routeList;
|
||||
routes = [PAGE_NOT_FOUND_ROUTE, ...routeList];
|
||||
}
|
||||
return routes;
|
||||
}
|
||||
|
Reference in New Issue
Block a user