From 69dba93ae5f0db0060e8c3ad9f587ed2dde82d19 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 17 Feb 2022 11:32:32 +0800 Subject: [PATCH] =?UTF-8?q?v3.7.0=20=E9=A1=B5=E7=AD=BE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=B7=A6=E4=BE=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/layout/components/TagsView/index.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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(() => {