diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index f4009a70..9328aa8c 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -16,7 +16,7 @@ :to="{ name: tag.name, path: tag.path, query: tag.query, fullPath: tag.fullPath, params: tag.params }" tag="span" class="tags-view-item" - @click.middle.native="closeSelectedTag(tag)" + @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''" @contextmenu.prevent.native="openMenu(tag,$event)" >
{{ generateTitle(tag.title) }}
@@ -32,11 +32,11 @@ :to="{ name: tag.name, path: tag.path, query: tag.query, fullPath: tag.fullPath, params: tag.params }" tag="span" class="tags-view-item" - @click.middle.native="closeSelectedTag(tag)" + @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''" @contextmenu.prevent.native="openMenu(tag,$event)" >
{{ generateTitle(tag.title) }}
-
+
@@ -44,7 +44,7 @@
  • {{ $t('tagsView.refresh') }}
  • -
  • +
  • {{ $t('tagsView.close') }}
  • @@ -116,6 +116,9 @@ export default { return route.name === this.$route.name } }, + isAffix(tag) { + return tag.meta && tag.meta.affix + }, filterAffixTags(routes, basePath = '/') { let tags = [] routes.forEach(route => {