From 0f6755e8622befd3c79b7a4abf9796d1df3e2189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 26 Nov 2024 10:00:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A6=E4=BE=A7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-ui/src/layout/index.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw-ui/src/layout/index.vue b/hw-ui/src/layout/index.vue index b0b7c56d..255f61e5 100644 --- a/hw-ui/src/layout/index.vue +++ b/hw-ui/src/layout/index.vue @@ -43,16 +43,28 @@ export default { TagsView }, mixins: [ResizeMixin], + mounted() { + console.log(this.sidebar) + }, watch: { 'sidebar.opened': { handler: function() { - console.log(this.sidebar.opened) if (this.sidebar.opened) { this.sidebarWidth = 200 } else { this.sidebarWidth = 54 } } + }, + 'sidebar.hide': { + handler: function() { + if (this.sidebar.hide) { + this.sidebarWidth = 54 + } else { + this.sidebar.opened = true + this.sidebarWidth = 200 + } + } } }, computed: { @@ -81,7 +93,6 @@ export default { this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) }, setLineLeft(e) { - console.log(e) let left = e.pageX if (left < 54) { left = 54