diff --git a/yudao-ui-admin/src/layout/components/TagsView/index.vue b/yudao-ui-admin/src/layout/components/TagsView/index.vue
index 592222c68..99bb28969 100644
--- a/yudao-ui-admin/src/layout/components/TagsView/index.vue
+++ b/yudao-ui-admin/src/layout/components/TagsView/index.vue
@@ -21,6 +21,7 @@
刷新页面
关闭当前
关闭其他
+ 关闭左侧
关闭右侧
全部关闭
@@ -84,6 +85,13 @@ export default {
isAffix(tag) {
return tag.meta && tag.meta.affix
},
+ isFirstView() {
+ try {
+ return this.selectedTag.fullPath === this.visitedViews[1].fullPath || this.selectedTag.fullPath === '/index'
+ } catch (err) {
+ return false
+ }
+ },
isLastView() {
try {
return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath
@@ -167,6 +175,13 @@ export default {
}
})
},
+ closeLeftTags() {
+ this.$store.dispatch('tagsView/delLeftTags', this.selectedTag).then(visitedViews => {
+ if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) {
+ this.toLastView(visitedViews)
+ }
+ })
+ },
closeOthersTags() {
this.$router.push(this.selectedTag).catch(()=>{});
this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => {