From 6947c0e8274750404e27c0ad143486ab475e075e Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 12 May 2023 14:45:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8=E6=8B=96=E6=8B=BD=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=AE=BD=E5=BA=A6=EF=BC=8C=E7=82=B9=E5=87=BB=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=90=8E=EF=BC=8C=E5=AE=BD=E5=BA=A6=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E4=BA=86=E5=8E=9F=E6=9D=A5=E7=9A=84=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1026066 --user=陈建星 【测试跟踪】 github#24300功能用例使用中调整了侧边栏展示的宽度后,再点击具体模块,侧边栏宽度又恢复到了原来的宽度 https://www.tapd.cn/55049933/s/1371141 --- .../frontend/src/components/dragbar/MsLeft2RightDragBar.vue | 2 +- .../frontend/src/components/new-ui/MsAsideContainer.vue | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/dragbar/MsLeft2RightDragBar.vue b/framework/sdk-parent/frontend/src/components/dragbar/MsLeft2RightDragBar.vue index 8503a3c84c..7f4ff15168 100644 --- a/framework/sdk-parent/frontend/src/components/dragbar/MsLeft2RightDragBar.vue +++ b/framework/sdk-parent/frontend/src/components/dragbar/MsLeft2RightDragBar.vue @@ -22,7 +22,7 @@ export default { } .drag-bar:hover { - width: 2px; + width: 4px; background-color: #783887; } diff --git a/framework/sdk-parent/frontend/src/components/new-ui/MsAsideContainer.vue b/framework/sdk-parent/frontend/src/components/new-ui/MsAsideContainer.vue index 8b1cd59415..5562eedead 100644 --- a/framework/sdk-parent/frontend/src/components/new-ui/MsAsideContainer.vue +++ b/framework/sdk-parent/frontend/src/components/new-ui/MsAsideContainer.vue @@ -107,7 +107,10 @@ export default { let MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver this.observer = new MutationObserver(() => { // 监听元素的宽度变化,保存在 localStorage 中 - localStorage.setItem(rememberKey, getComputedStyle(element).getPropertyValue('width')); + let width = getComputedStyle(element).getPropertyValue('width'); + localStorage.setItem(rememberKey, width); + // 这里宽度变化设置下默认宽度,否则页面有更新,会导致宽度变回到原来的默认宽度 + this.defaultWidth = width; }) this.observer.observe(element, { attributes: true, attributeFilter: ['style'], attributeOldValue: true }) }