diff --git a/web/src/view/layout/aside/historyComponent/history.vue b/web/src/view/layout/aside/historyComponent/history.vue index 1b204cca18c604355dcf45bbe0a56c4fc327471b..b63ec709969ce4a9fb60b242a74d01961a053b2c 100644 --- a/web/src/view/layout/aside/historyComponent/history.vue +++ b/web/src/view/layout/aside/historyComponent/history.vue @@ -36,6 +36,7 @@ export default { left: 0, top: 0, isCollapse: false, + isMobile:false, rightActive: '' } }, @@ -53,9 +54,15 @@ export default { this.setTab(this.$route) }, mounted() { - this.$bus.on('totalCollapse', () => { - this.isCollapse = !this.isCollapse + this.$bus.on('collapse',(isCollapse)=>{ + this.isCollapse = isCollapse }) + this.$bus.on('mobile'),(isMobile)=>{ + this.isMobile = isMobile + } + }, + beforeDestroy(){ + this.$bus.off('collapse') }, methods: { openContextMenu(e) { @@ -66,10 +73,13 @@ export default { this.contextMenuVisible = true let width if (this.isCollapse) { - width = 60 + width = 54 } else { width = 220 } + if(this.isMobile){ + width = 0 + } this.left = e.clientX - width this.top = e.clientY + 10 this.rightActive = e.srcElement.id.split('-')[1] diff --git a/web/src/view/layout/aside/index.vue b/web/src/view/layout/aside/index.vue index f5268ed8ae68b04af8d4a18d3bd65869bde0be55..19672f68fd75294d9cf0343ff4ac47c2134a1f9c 100644 --- a/web/src/view/layout/aside/index.vue +++ b/web/src/view/layout/aside/index.vue @@ -50,9 +50,7 @@ export default { if(screenWidth<1000){ this.isCollapse = !this.isCollapse } - this.$bus.on('totalCollapse', () => { - this.isCollapse = !this.isCollapse - }) + this.$bus.on('collapse', (item) => { this.isCollapse = item }) @@ -64,7 +62,6 @@ export default { } }, beforeDestroy() { - this.$bus.off('totalCollapse') this.$bus.off('collapse') } } diff --git a/web/src/view/layout/index.vue b/web/src/view/layout/index.vue index 6e223dbc65483c10c9e0186c638663a8845323ca..e6f5b88da75b66bcf34193fcc4b3e44d174f2c61 100644 --- a/web/src/view/layout/index.vue +++ b/web/src/view/layout/index.vue @@ -8,45 +8,47 @@ -
- - - - {{item.meta.title}} - -
- - - - {{userInfo.title}} - - - - - - 更多信息 - +
+ + + + {{item.meta.title}} + +
+ + + + {{userInfo.title}} + - - 修改密码 - 个人信息 - 登 出 - - - + + + + 更多信息 + + + + 修改密码 + 个人信息 + 登 出 + + +
+
+ + +
- - - - -
@@ -54,43 +56,38 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + +