File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/layout/components/TagsView Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 99 :to =" { path: tag.path, query: tag.query, fullPath: tag.fullPath }"
1010 tag =" span"
1111 class =" tags-view-item"
12- @click.middle.native =" closeSelectedTag(tag)"
12+ @click.middle.native =" !isAffix(tag)? closeSelectedTag(tag):'' "
1313 @contextmenu.prevent.native =" openMenu(tag,$event)"
1414 >
1515 {{ tag.title }}
16- <span v-if =" !tag.meta.affix " class =" el-icon-close" @click.prevent.stop =" closeSelectedTag(tag)" />
16+ <span v-if =" !isAffix( tag) " class =" el-icon-close" @click.prevent.stop =" closeSelectedTag(tag)" />
1717 </router-link >
1818 </scroll-pane >
1919 <ul v-show =" visible" :style =" {left:left+'px',top:top+'px'}" class =" contextmenu" >
2020 <li @click =" refreshSelectedTag(selectedTag)" >Refresh</li >
21- <li v-if =" !(selectedTag.meta&&selectedTag.meta.affix )" @click =" closeSelectedTag(selectedTag)" >Close</li >
21+ <li v-if =" !isAffix (selectedTag)" @click =" closeSelectedTag(selectedTag)" >Close</li >
2222 <li @click =" closeOthersTags" >Close Others</li >
2323 <li @click =" closeAllTags(selectedTag)" >Close All</li >
2424 </ul >
@@ -69,6 +69,9 @@ export default {
6969 isActive (route ) {
7070 return route .path === this .$route .path
7171 },
72+ isAffix (tag ) {
73+ return tag .meta && tag .meta .affix
74+ },
7275 filterAffixTags (routes , basePath = ' /' ) {
7376 let tags = []
7477 routes .forEach (route => {
You can’t perform that action at this time.
0 commit comments