From 3c40f5e98cbeaf554cf0245d4f528063f0b9db69 Mon Sep 17 00:00:00 2001 From: Admin <978517621@qq.com> Date: 星期二, 05 七月 2022 15:24:47 +0800 Subject: [PATCH] 添加修改页面 --- src/router/index.ts | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 1554262..112fa0f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -10,6 +10,7 @@ import { staticRoutes } from '/@/router/route'; import { initFrontEndControlRoutes } from '/@/router/frontEnd'; import { initBackEndControlRoutes } from '/@/router/backEnd'; +import {useUserInfo} from "/@/stores/userInfo"; @@ -87,13 +88,11 @@ const storesRoutesList = useRoutesList(pinia); const { routesList } = storeToRefs(storesRoutesList); if (routesList.value.length === 0) { - if (isRequestRoutes) { // 后端控制路由:路由数据初始化,防止刷新时丢失 - await initBackEndControlRoutes(); + await initBackEndControlRoutes(); // 动态添加路由:防止非首页刷新时跳转回首页的问题 // 确保 addRoute() 时动态添加的路由已经被完全加载上去 - next({ ...to, replace: true }); - } + next({ ...to, replace: true }); } else { next(); } -- Gitblit v1.9.2