diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index e5aa91a6c3c805f1263bdb1132ce3588084c6ffd..642b4f42747c4725b46a0e3ed1532071e38f61fb 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 }} - + @@ -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 => {