From 9c6d762dd0930daa7bbd920d75789c29b477d5e2 Mon Sep 17 00:00:00 2001 From: WANGFan <15871339963@163.com> Date: Sun, 20 Jul 2025 20:30:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=9D=99=E6=80=81=E4=B8=80=E7=BA=A7?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=B8=8D=E5=8F=82=E4=B8=8Etabs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/route-config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/modules/route-config.ts b/src/store/modules/route-config.ts index bb80c1e..030445e 100644 --- a/src/store/modules/route-config.ts +++ b/src/store/modules/route-config.ts @@ -1,5 +1,6 @@ import { defineStore } from "pinia"; import router from "@/router/index"; +import { staticRoutes } from "@/router/route"; import { getRoutersAPI } from "@/api/modules/system/index"; import { moduleReplacement, linearArray } from "@/router/route-output"; import { getUrlWithParams } from "@/utils/index"; @@ -52,9 +53,10 @@ export const routesConfigStore = () => { * @param {object} route 当前tabs路由 */ function setTabs(route: Menu.MenuOptions) { + // 顶层手动添加的全屏静态路由不参与tabs + if (staticRoutes.some(item => item.path == route.path)) return; // 当前路由在tags中是否存在 let index = tabsList.value.findIndex((item: Menu.MenuOptions) => item.path === route.path); - // 不存在,直接缓存 if (index == -1) return tabsList.value.push(route); }