Skip to content

Commit f253446

Browse files
author
QM303176530
committed
顶部页签右键bug修复
1 parent d883f40 commit f253446

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ export default {
4141
}
4242
},
4343
created() {
44+
this.$bus.on('mobile',(isMobile)=>{
45+
this.isMobile = isMobile
46+
})
47+
this.$bus.on('collapse',(isCollapse)=>{
48+
this.isCollapse = isCollapse
49+
})
4450
const initHistorys = [
4551
{
4652
name: 'dashboard',
@@ -53,16 +59,10 @@ export default {
5359
JSON.parse(sessionStorage.getItem('historys')) || initHistorys
5460
this.setTab(this.$route)
5561
},
56-
mounted() {
57-
this.$bus.on('collapse',(isCollapse)=>{
58-
this.isCollapse = isCollapse
59-
})
60-
this.$bus.on('mobile'),(isMobile)=>{
61-
this.isMobile = isMobile
62-
}
63-
},
62+
6463
beforeDestroy(){
6564
this.$bus.off('collapse')
65+
this.$bus.off('mobile')
6666
},
6767
methods: {
6868
openContextMenu(e) {

0 commit comments

Comments
 (0)