From b51590b982841795853b82501376d3978763406c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Fri, 11 Oct 2019 13:37:01 +0800 Subject: [PATCH] fix[TagsView]: fixed click.middle can close affixed tag bug (#2649) --- src/layout/components/TagsView/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index e5aa91a..642b4f4 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -9,16 +9,16 @@ :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item" - @click.middle.native="closeSelectedTag(tag)" + @click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''" @contextmenu.prevent.native="openMenu(tag,$event)" > {{ tag.title }} - +
  • Refresh
  • -
  • Close
  • +
  • Close
  • Close Others
  • Close All
@@ -69,6 +69,9 @@ export default { isActive(route) { return route.path === this.$route.path }, + isAffix(tag) { + return tag.meta && tag.meta.affix + }, filterAffixTags(routes, basePath = '/') { let tags = [] routes.forEach(route => { -- GitLab