!69 修复升级依赖带来的类型问题
* fix 修复变量问题 * Merge remote-tracking branch 'origin/dev' into dev * update 依赖升级 * update 依赖升级 * Merge remote-tracking branch 'origin/dev' into dev * 升级依赖 * Merge remote-tracking branch 'origin/ts' into ts * 升级依赖 * Merge branch 'dev' of gitee.com:JavaLionLi/plus-ui into ts * 升级依赖 * !61 fix: 删除重复环境变量ElUploadInstance * fix: 删除重复环境变量ElUploadInstance
This commit is contained in:
@ -8,7 +8,6 @@ import { isRelogin } from '@/utils/request';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import usePermissionStore from '@/store/modules/permission';
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
NProgress.configure({ showSpinner: false });
|
||||
const whiteList = ['/login', '/register', '/social-callback'];
|
||||
@ -36,12 +35,14 @@ router.beforeEach(async (to, from, next) => {
|
||||
isRelogin.show = false;
|
||||
const accessRoutes = await usePermissionStore().generateRoutes();
|
||||
// 根据roles权限生成可访问的路由表
|
||||
accessRoutes.forEach((route: RouteRecordRaw) => {
|
||||
accessRoutes.forEach((route) => {
|
||||
if (!isHttp(route.path)) {
|
||||
router.addRoute(route); // 动态添加可访问路由表
|
||||
}
|
||||
});
|
||||
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
|
||||
const n = { ...to, replace: true };
|
||||
console.log(n);
|
||||
next({ path: to.path, replace: true, params: to.params, query: to.query, hash: to.hash, name: to.name as string }); // hack方法 确保addRoutes已完成
|
||||
}
|
||||
} else {
|
||||
next();
|
||||
|
Reference in New Issue
Block a user