mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-28 08:40:17 +08:00
fix(projects): 修复权限切换路由数据未更新的问题
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Router, RouteLocationNormalized, NavigationGuardNext } from 'vue-router';
|
||||
import type { RouteLocationNormalized, NavigationGuardNext } from 'vue-router';
|
||||
import { routeName } from '@/router';
|
||||
import { useAuthStore } from '@/store';
|
||||
import { exeStrategyActions, getToken } from '@/utils';
|
||||
@@ -8,11 +8,10 @@ import { createDynamicRouteGuard } from './dynamic';
|
||||
export async function createPermissionGuard(
|
||||
to: RouteLocationNormalized,
|
||||
from: RouteLocationNormalized,
|
||||
next: NavigationGuardNext,
|
||||
router: Router
|
||||
next: NavigationGuardNext
|
||||
) {
|
||||
// 动态路由
|
||||
const permission = await createDynamicRouteGuard(to, from, next, router);
|
||||
const permission = await createDynamicRouteGuard(to, from, next);
|
||||
if (!permission) return;
|
||||
|
||||
// 外链路由, 从新标签打开,返回上一个路由
|
||||
|
||||
Reference in New Issue
Block a user