fix: 提升管理端启动与导航稳定性
- 等待初始路由就绪并提供可恢复的启动失败页面 - 收敛失效登录导航并按需加载 SVG 图标资源
This commit is contained in:
@@ -146,6 +146,11 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
resetAllStores();
|
||||
accessStore.setLoginExpired(false);
|
||||
|
||||
// 初始路由守卫仍在执行时由守卫统一返回登录页,避免并发导航。
|
||||
if (!router.currentRoute.value.name) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 回登录页带上当前路由地址
|
||||
await router.replace({
|
||||
path: LOGIN_PATH,
|
||||
|
||||
Reference in New Issue
Block a user