!813 update src/store/modules/tagsView.ts.

Merge pull request !813 from 口口口/N/A
pull/824/head
芋道源码 2025-09-21 02:48:31 +00:00 committed by Gitee
commit d076d75c38
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 0 deletions

View File

@ -93,6 +93,11 @@ export const useTagsViewStore = defineStore('tagsView', {
delCachedView() {
const route = router.currentRoute.value
const index = findIndex<string>(this.getCachedViews, (v) => v === route.name)
for (const v of this.visitedViews) {
if (v.name === route.name) {
return
}
}
if (index > -1) {
this.cachedViews.delete(this.getCachedViews[index])
}