ipanghu
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
5 deletions
-
web/src/view/layout/aside/historyComponent/history.vue
-
web/src/view/layout/index.vue
|
|
@ -16,9 +16,7 @@ |
|
|
|
:tab="item" |
|
|
|
class="gva-tab" |
|
|
|
> |
|
|
|
<template #label> |
|
|
|
<span :style="{color: activeValue===name(item)?activeColor:'#333'}"><i class="dot" :style="{backgroundColor:activeValue===name(item)?activeColor:'#ddd'}" /> {{ item.meta.title }}</span> |
|
|
|
</template> |
|
|
|
<span slot="label" :style="{color: activeValue===name(item)?activeColor:'#333'}"><i class="dot" :style="{ backgroundColor:activeValue===name(item)?activeColor:'#ddd'}" /> {{ item.meta.title }}</span> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
|
|
|
@ -109,7 +107,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() { |
|
|
|
emitter.off('collapse') |
|
|
|
emitter.off('mobile') |
|
|
@ -247,6 +251,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
removeTab(tab) { |
|
|
|
console.log(tab) |
|
|
|
const index = this.historys.findIndex( |
|
|
|
item => getFmtString(item) === tab |
|
|
|
) |
|
|
|
|
|
@ -75,7 +75,7 @@ |
|
|
|
<!-- 当前面包屑用路由自动生成可根据需求修改 --> |
|
|
|
<!-- |
|
|
|
:to="{ path: item.path }" 暂时注释不用--> |
|
|
|
<HistoryComponent /> |
|
|
|
<HistoryComponent ref="layoutHistoryComponent" /> |
|
|
|
</div> |
|
|
|
</transition> |
|
|
|
<router-view v-if="$route.meta.keepAlive && reloadFlag" v-slot="{ Component }" v-loading="loadingFlag" element-loading-text="正在加载中" class="admin-box"> |
|
|
|