fix: 【framework】删除缓存失效的问题,对应 https://github.com/yudaocode/yudao-ui-admin-vue3/issues/180

pull/831/MERGE
YunaiV 2025-11-22 19:49:59 +08:00
parent b622840240
commit 915f1fc3a9
1 changed files with 6 additions and 5 deletions

View File

@ -93,11 +93,12 @@ 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) { // 需要注释解决“标签页刷新无效”。相关案例https://github.com/yudaocode/yudao-ui-admin-vue3/issues/180
if (v.name === route.name) { // for (const v of this.visitedViews) {
return // if (v.name === route.name) {
} // return
} // }
// }
if (index > -1) { if (index > -1) {
this.cachedViews.delete(this.getCachedViews[index]) this.cachedViews.delete(this.getCachedViews[index])
} }