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)