From 2f7436398ec053168cc5968e8e9f6b53cf1e99ce Mon Sep 17 00:00:00 2001 From: chenlin Date: Fri, 5 Dec 2025 15:50:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=9B=BA=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 4 ++-- src/store/modules/tagsView.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index d2c9e56..47b0e3f 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -88,7 +88,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ icon: 'ep:home-filled', noCache: false, hidden: true, - affix: true + affix: false } }, { @@ -100,7 +100,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ icon: 'ep:home-filled', hidden: true, noCache: false, - affix: true + affix: false } } ] diff --git a/src/store/modules/tagsView.ts b/src/store/modules/tagsView.ts index 25a3a1f..0ab87b7 100644 --- a/src/store/modules/tagsView.ts +++ b/src/store/modules/tagsView.ts @@ -26,11 +26,13 @@ export const useTagsViewStore = defineStore('tagsView', { actions: { // 新增缓存和tag addView(view: RouteLocationNormalizedLoaded): void { + debugger this.addVisitedView(view) this.addCachedView() }, // 新增tag addVisitedView(view: RouteLocationNormalizedLoaded) { + debugger if (this.visitedViews.some((v) => v.path === view.path)) return if (view.meta?.noTagsView) return this.visitedViews.push( @@ -41,6 +43,7 @@ export const useTagsViewStore = defineStore('tagsView', { }, // 新增缓存 addCachedView() { + debugger const cacheMap: Set = new Set() for (const v of this.visitedViews) { const item = getRawRoute(v)