From 160fe541a739b52513d79d98eae65d39f4224fc8 Mon Sep 17 00:00:00 2001 From: zhaolaiqun Date: Thu, 14 May 2020 10:34:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E9=9D=9E=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E7=8A=B6=E6=80=81=E7=9A=84tagsview=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=85=A8=E9=83=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在非选中状态的tagsview右键关闭全部会出现不能关闭当前路由下的页面,但是tagsviews中无此标签 如果去除 `if (this.affixTags.some(tag => tag.path === this.$route.path)) { return }` 判断则会导致如果当前页是affix === true时也进行跳转 --- src/layout/components/TagsView/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index d2a56e70..d54ec776 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -149,7 +149,7 @@ export default { }, closeAllTags(view) { this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => { - if (this.affixTags.some(tag => tag.path === view.path)) { + if (this.affixTags.some(tag => tag.path === this.$route.path)) { return } this.toLastView(visitedViews, view)