Browse Source

增加关闭当前页面方法

main
piexlmax 3 years ago
parent
commit
1962bd771d
  1. 1
      web/src/core/gin-vue-admin.js
  2. 13
      web/src/view/layout/aside/historyComponent/history.vue

1
web/src/core/gin-vue-admin.js

@ -7,7 +7,6 @@ import config from './config'
export const run = function(app) {
app.config.globalProperties.$GIN_VUE_ADMIN = config
// app.use(uploader)
console.log(`

13
web/src/view/layout/aside/historyComponent/history.vue

@ -16,7 +16,9 @@
:tab="item"
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-tabs>
@ -107,11 +109,10 @@ export default {
}
this.setTab(this.$route)
},
mounted(){
//
this.$bus.on('closeThisPage', ()=>{
const router = this.$route.path.split("/")
this.removeTab(`${router[router.length - 1]}`)
mounted() {
//
emitter.on('closeThisPage', () => {
this.removeTab(this.name(this.$route))
})
},
beforeDestroy() {

Loading…
Cancel
Save