mirror of
https://github.com/yudaocode/yudao-ui-admin-vue3.git
synced 2026-04-19 13:18:39 +00:00
update src/store/modules/tagsView.ts.
当存在多个相同名称的标签时,删除缓存应该排除是否存在相同的名称。 Signed-off-by: 口口口 <17975121@qq.com>
This commit is contained in:
@@ -93,6 +93,11 @@ export const useTagsViewStore = defineStore('tagsView', {
|
|||||||
delCachedView() {
|
delCachedView() {
|
||||||
const route = router.currentRoute.value
|
const route = router.currentRoute.value
|
||||||
const index = findIndex<string>(this.getCachedViews, (v) => v === route.name)
|
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) {
|
if (index > -1) {
|
||||||
this.cachedViews.delete(this.getCachedViews[index])
|
this.cachedViews.delete(this.getCachedViews[index])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user