去掉固定

This commit is contained in:
chenlin
2025-12-05 15:50:28 +08:00
parent 4bca8652d6
commit 2f7436398e
2 changed files with 5 additions and 2 deletions

View File

@@ -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
}
}
]

View File

@@ -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<string> = new Set()
for (const v of this.visitedViews) {
const item = getRawRoute(v)