diff --git a/web/src/view/layout/aside/historyComponent/history.vue b/web/src/view/layout/aside/historyComponent/history.vue
index ec645799e3b175217db55b58835d65418ad518b4..e78a24c31cccee65ba31049b848a5d70178dedf9 100644
--- a/web/src/view/layout/aside/historyComponent/history.vue
+++ b/web/src/view/layout/aside/historyComponent/history.vue
@@ -16,7 +16,7 @@
:tab="item"
class="gva-tab"
>
- {{ item.meta.title }}
+ {{ item.meta.title }}
@@ -105,7 +105,13 @@ export default {
}
this.setTab(this.$route)
},
-
+ mounted(){
+ //全局监听 关闭当前页面函数
+ this.$bus.on('closeThisPage', ()=>{
+ const router = this.$route.path.split("/")
+ this.removeTab(`${router[router.length - 1]}`)
+ })
+ },
beforeDestroy() {
this.$bus.off('collapse')
this.$bus.off('mobile')
@@ -244,6 +250,7 @@ export default {
})
},
removeTab(tab) {
+ console.log(tab)
const index = this.historys.findIndex(
item => getFmtString(item) === tab
)
diff --git a/web/src/view/layout/index.vue b/web/src/view/layout/index.vue
index 7bb7d08ba1128a72c2f1b471dcb344a70d9316b6..ccf13a9b8d66123ff2433eb31529c1ad57a16d70 100644
--- a/web/src/view/layout/index.vue
+++ b/web/src/view/layout/index.vue
@@ -68,7 +68,7 @@
-
+