增加关闭当前页面方法
This commit is contained in:
parent
9838725a3f
commit
f5677e6858
|
@ -7,7 +7,6 @@ import config from './config'
|
||||||
|
|
||||||
export const run = function(app) {
|
export const run = function(app) {
|
||||||
app.config.globalProperties.$GIN_VUE_ADMIN = config
|
app.config.globalProperties.$GIN_VUE_ADMIN = config
|
||||||
|
|
||||||
// app.use(uploader)
|
// app.use(uploader)
|
||||||
|
|
||||||
console.log(`
|
console.log(`
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
:tab="item"
|
:tab="item"
|
||||||
class="gva-tab"
|
class="gva-tab"
|
||||||
>
|
>
|
||||||
<span slot="label" :style="{color: activeValue===name(item)?activeColor:'#333'}"><i class="dot" :style="{ backgroundColor:activeValue===name(item)?activeColor:'#ddd'}" /> {{ item.meta.title }}</span>
|
<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>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
|
@ -109,9 +111,8 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 全局监听 关闭当前页面函数
|
// 全局监听 关闭当前页面函数
|
||||||
this.$bus.on('closeThisPage', ()=>{
|
emitter.on('closeThisPage', () => {
|
||||||
const router = this.$route.path.split("/")
|
this.removeTab(this.name(this.$route))
|
||||||
this.removeTab(`${router[router.length - 1]}`)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
Loading…
Reference in New Issue