perf(tree): strengthen BasicTree function

This commit is contained in:
Vben
2021-03-03 23:35:30 +08:00
parent 9a1ba74920
commit cd8e924d46
20 changed files with 394 additions and 138 deletions

View File

@@ -18,7 +18,7 @@ import { transformObjToRoute } from '/@/router/helper/routeHelper';
import { transformRouteToMenu } from '/@/router/helper/menuHelper';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
// import { useI18n } from '/@/hooks/web/useI18n';
import { ERROR_LOG_ROUTE, PAGE_NOT_FOUND_ROUTE } from '/@/router/constant';
const { createMessage } = useMessage();
@@ -84,7 +84,7 @@ class Permission extends VuexModule {
@Action
async buildRoutesAction(id?: number | string): Promise<AppRouteRecordRaw[]> {
const { t } = useI18n();
// const { t } = useI18n();
let routes: AppRouteRecordRaw[] = [];
const roleList = toRaw(userStore.getRoleListState);
@@ -101,7 +101,8 @@ class Permission extends VuexModule {
// If you are sure that you do not need to do background dynamic permissions, please comment the entire judgment below
} else if (permissionMode === PermissionModeEnum.BACK) {
createMessage.loading({
content: t('sys.app.menuLoading'),
content: 'Loading menu...',
// content: 't('sys.app.menuLoading')',
duration: 1,
});
// Here to get the background routing menu logic to modify by yourself