From ba6359bb91c88c4a2d7a41660ae5a6232d45bcde Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Wed, 28 Aug 2024 17:46:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=98=8E=E4=BF=AE=E5=A4=8D=E7=99=BD?= =?UTF-8?q?=E5=B1=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/stores/keepAliveNames.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Web/src/stores/keepAliveNames.ts b/Web/src/stores/keepAliveNames.ts index 981198f2..8f516b80 100644 --- a/Web/src/stores/keepAliveNames.ts +++ b/Web/src/stores/keepAliveNames.ts @@ -22,7 +22,9 @@ export const useKeepALiveNames = defineStore('keepALiveNames', { }, async delCachedView(view: any) { const index = this.cachedViews.indexOf(view.name); - index > -1 && this.cachedViews.splice(index, 1); + setTimeout(() => { + index > -1 && this.cachedViews.splice(index, 1); + }, 20) }, async delOthersCachedViews(view: any) { if (view.meta.isKeepAlive) this.cachedViews = [view.name]; From 4bf3070b16ada30a839655c4a893427a8b3a31b2 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Wed, 28 Aug 2024 17:55:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=98=8E=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/stores/keepAliveNames.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/src/stores/keepAliveNames.ts b/Web/src/stores/keepAliveNames.ts index 8f516b80..493d019f 100644 --- a/Web/src/stores/keepAliveNames.ts +++ b/Web/src/stores/keepAliveNames.ts @@ -24,7 +24,7 @@ export const useKeepALiveNames = defineStore('keepALiveNames', { const index = this.cachedViews.indexOf(view.name); setTimeout(() => { index > -1 && this.cachedViews.splice(index, 1); - }, 20) + }, 20); }, async delOthersCachedViews(view: any) { if (view.meta.isKeepAlive) this.cachedViews = [view.name];