diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 1b112317..3c20275b 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -9,27 +9,18 @@ :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)" > {{ generateTitle(tag.title) }} - + @@ -80,6 +71,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 => {