From 3cc575268b3042b35e785ffeebf51a6ea3b5e73d Mon Sep 17 00:00:00 2001 From: gerson <1405270578@qq.com> Date: 星期五, 01 十一月 2024 11:32:13 +0800 Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test --- src/stores/keepAliveNames.ts | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/stores/keepAliveNames.ts b/src/stores/keepAliveNames.ts index 981198f..1da076d 100644 --- a/src/stores/keepAliveNames.ts +++ b/src/stores/keepAliveNames.ts @@ -18,7 +18,9 @@ this.keepAliveNames = data; }, async addCachedView(view: any) { - if (view.meta.isKeepAlive) this.cachedViews?.push(view.name); + if (view.meta.isKeepAlive && !this.cachedViews?.includes(view.name)) { + this.cachedViews?.push(view.name); + } }, async delCachedView(view: any) { const index = this.cachedViews.indexOf(view.name); -- Gitblit v1.9.3