去掉固定
This commit is contained in:
@@ -88,7 +88,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
icon: 'ep:home-filled',
|
icon: 'ep:home-filled',
|
||||||
noCache: false,
|
noCache: false,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
affix: true
|
affix: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -100,7 +100,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
icon: 'ep:home-filled',
|
icon: 'ep:home-filled',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
noCache: false,
|
noCache: false,
|
||||||
affix: true
|
affix: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -26,11 +26,13 @@ export const useTagsViewStore = defineStore('tagsView', {
|
|||||||
actions: {
|
actions: {
|
||||||
// 新增缓存和tag
|
// 新增缓存和tag
|
||||||
addView(view: RouteLocationNormalizedLoaded): void {
|
addView(view: RouteLocationNormalizedLoaded): void {
|
||||||
|
debugger
|
||||||
this.addVisitedView(view)
|
this.addVisitedView(view)
|
||||||
this.addCachedView()
|
this.addCachedView()
|
||||||
},
|
},
|
||||||
// 新增tag
|
// 新增tag
|
||||||
addVisitedView(view: RouteLocationNormalizedLoaded) {
|
addVisitedView(view: RouteLocationNormalizedLoaded) {
|
||||||
|
debugger
|
||||||
if (this.visitedViews.some((v) => v.path === view.path)) return
|
if (this.visitedViews.some((v) => v.path === view.path)) return
|
||||||
if (view.meta?.noTagsView) return
|
if (view.meta?.noTagsView) return
|
||||||
this.visitedViews.push(
|
this.visitedViews.push(
|
||||||
@@ -41,6 +43,7 @@ export const useTagsViewStore = defineStore('tagsView', {
|
|||||||
},
|
},
|
||||||
// 新增缓存
|
// 新增缓存
|
||||||
addCachedView() {
|
addCachedView() {
|
||||||
|
debugger
|
||||||
const cacheMap: Set<string> = new Set()
|
const cacheMap: Set<string> = new Set()
|
||||||
for (const v of this.visitedViews) {
|
for (const v of this.visitedViews) {
|
||||||
const item = getRawRoute(v)
|
const item = getRawRoute(v)
|
||||||
|
|||||||
Reference in New Issue
Block a user