From 7211a17a8158b01a1f6dd6c83591f86d76633de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=87=95=E5=8D=9A=E6=96=87?= <349952469@qq.com> Date: Tue, 29 Nov 2022 15:12:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(projects):=20=E4=BF=AE=E5=A4=8Dtabs?= =?UTF-8?q?=E5=9C=A8static=E8=B7=AF=E7=94=B1=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=85=B3=E9=97=AD=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/route/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index c9a757c8..c1f38c49 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -128,9 +128,14 @@ export const useRouteStore = defineStore('route-store', { }, /** 初始化静态路由 */ async initStaticRoute() { + const { initHomeTab } = useTabStore(); const auth = useAuthStore(); + const routes = filterAuthRoutesByUserPermission(staticRoutes, auth.userInfo.userRole); this.handleAuthRoute(routes); + + initHomeTab(this.routeHomeName, router); + this.isInitAuthRoute = true; }, /** 初始化权限路由 */