mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): 修复路由守卫的动态路由逻辑
This commit is contained in:
@ -35,11 +35,12 @@ export async function createDynamicRouteGuard(
|
||||
next({ path: to.fullPath, replace: true, query: to.query });
|
||||
return false;
|
||||
}
|
||||
// 动态路由已经加载,仍然未找到,重定向到not-found
|
||||
if (to.name === routeName('not-found-page')) {
|
||||
next({ name: routeName('not-found'), replace: true });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 动态路由已经加载,仍然未找到,重定向到not-found
|
||||
if (to.name === routeName('not-found-page')) {
|
||||
next({ name: routeName('not-found'), replace: true });
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -28,6 +28,9 @@ export default function subscribeThemeStore() {
|
||||
} else {
|
||||
removeDarkClass();
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user