顶部页签右键bug修复

This commit is contained in:
QM303176530 2020-05-01 18:20:02 +08:00
parent 7dd0512e67
commit 5745afaea8
1 changed files with 8 additions and 8 deletions

View File

@ -41,6 +41,12 @@ export default {
} }
}, },
created() { created() {
this.$bus.on('mobile',(isMobile)=>{
this.isMobile = isMobile
})
this.$bus.on('collapse',(isCollapse)=>{
this.isCollapse = isCollapse
})
const initHistorys = [ const initHistorys = [
{ {
name: 'dashboard', name: 'dashboard',
@ -53,16 +59,10 @@ export default {
JSON.parse(sessionStorage.getItem('historys')) || initHistorys JSON.parse(sessionStorage.getItem('historys')) || initHistorys
this.setTab(this.$route) this.setTab(this.$route)
}, },
mounted() {
this.$bus.on('collapse',(isCollapse)=>{
this.isCollapse = isCollapse
})
this.$bus.on('mobile'),(isMobile)=>{
this.isMobile = isMobile
}
},
beforeDestroy(){ beforeDestroy(){
this.$bus.off('collapse') this.$bus.off('collapse')
this.$bus.off('mobile')
}, },
methods: { methods: {
openContextMenu(e) { openContextMenu(e) {