From 10bba2de31a63dcbe71bf5c8cbf4f97cd906a0e0 Mon Sep 17 00:00:00 2001 From: supemeko Date: Fri, 14 Jun 2024 20:15:04 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/store/modules/tagsView.ts.=20?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E5=BE=88=E6=87=82=E8=BF=99=E4=B8=AA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=9C=A8=E5=81=9A=E4=BB=80=E4=B9=88=EF=BC=8C=E4=BD=86?= =?UTF-8?q?=E6=98=AF=E7=94=A8=E6=9B=B4=E7=AE=80=E5=8D=95=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E4=B8=BASet=E5=88=A0=E9=99=A4=E5=85=83=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: supemeko --- src/store/modules/tagsView.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/store/modules/tagsView.ts b/src/store/modules/tagsView.ts index 25a3a1fdd..d5026c47b 100644 --- a/src/store/modules/tagsView.ts +++ b/src/store/modules/tagsView.ts @@ -72,10 +72,7 @@ export const useTagsViewStore = defineStore('tagsView', { // 删除缓存 delCachedView() { const route = router.currentRoute.value - const index = findIndex(this.getCachedViews, (v) => v === route.name) - if (index > -1) { - this.cachedViews.delete(this.getCachedViews[index]) - } + this.cachedViews.delete(route.name) }, // 删除所有缓存和tag delAllViews() {