update src/store/modules/tagsView.ts.
不是很懂这个文件在做什么,但是用更简单的方式为Set删除元素 Signed-off-by: supemeko <nek03@qq.com>pull/460/head
parent
93bee8c82c
commit
10bba2de31
|
|
@ -72,10 +72,7 @@ export const useTagsViewStore = defineStore('tagsView', {
|
|||
// 删除缓存
|
||||
delCachedView() {
|
||||
const route = router.currentRoute.value
|
||||
const index = findIndex<string>(this.getCachedViews, (v) => v === route.name)
|
||||
if (index > -1) {
|
||||
this.cachedViews.delete(this.getCachedViews[index])
|
||||
}
|
||||
this.cachedViews.delete(route.name)
|
||||
},
|
||||
// 删除所有缓存和tag
|
||||
delAllViews() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue