From b0530ed9211230227a8f94e394eda779d5ae5fc1 Mon Sep 17 00:00:00 2001 From: birt <2499248221@qq.com> Date: 星期日, 13 四月 2025 01:51:52 +0800 Subject: [PATCH] birtzhang --- zhitan-vue/src/store/modules/tagsView.js | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/zhitan-vue/src/store/modules/tagsView.js b/zhitan-vue/src/store/modules/tagsView.js index 9d07f33..0e6c6e2 100644 --- a/zhitan-vue/src/store/modules/tagsView.js +++ b/zhitan-vue/src/store/modules/tagsView.js @@ -20,6 +20,11 @@ ) }, addVisitedView(view) { + // 杩囨护棣栭〉鏍囩 + if (view.path === '/index' || view.path === '/' || view.name === 'Index') { + return; + } + if (this.visitedViews.some(v => v.path === view.path)) return this.visitedViews.push( Object.assign({}, view, { @@ -110,7 +115,8 @@ }, delAllVisitedViews(view) { return new Promise(resolve => { - const affixTags = this.visitedViews.filter(tag => tag.meta.affix) + // 杩囨护鎺夐椤垫爣绛撅紝鍙繚鐣欏叾浠栧浐瀹氭爣绛� + const affixTags = this.visitedViews.filter(tag => tag.meta.affix && tag.path !== '/index' && tag.path !== '/' && tag.name !== 'Index') this.visitedViews = affixTags this.iframeViews = [] resolve([...this.visitedViews]) -- Gitblit v1.9.3