From 60a31589ff27e57161bff25d14405318223bf83d Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 6 Feb 2023 17:40:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B-?= =?UTF-8?q?=E8=84=91=E5=9B=BE=E6=A8=A1=E5=BC=8F=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=94=BE=E5=A4=A7=E6=8C=89=E9=92=AE=E5=90=8E=EF=BC=8C=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=8C=BA=E5=9F=9F=E5=87=BA=E7=8E=B0=E9=81=AE=E6=8C=A1?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=AE=8C=E6=95=B4=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1020202 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001020202 --- .../business/common/minder/MsModuleMinder.vue | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/test-track/frontend/src/business/common/minder/MsModuleMinder.vue b/test-track/frontend/src/business/common/minder/MsModuleMinder.vue index 9ce0dedfd9..d64eaded53 100644 --- a/test-track/frontend/src/business/common/minder/MsModuleMinder.vue +++ b/test-track/frontend/src/business/common/minder/MsModuleMinder.vue @@ -116,9 +116,17 @@ export default { this.height = document.body.clientHeight - 285; }, destroyed() { + if (this.$EventBus) { + this.$EventBus.$off("appFixedChange", this.setFullScreenLeft); + } minderPageInfoMap.clear(); }, mounted() { + if (this.$EventBus) { + // 导出的报告不走这里 + this.$EventBus.$on("appFixedChange", this.setFullScreenLeft); + } + this.setFullScreenLeft(); this.defaultMode = 3; if (this.minderKey) { let model = localStorage.getItem(this.minderKey + 'minderModel'); @@ -160,6 +168,13 @@ export default { } }); }, + setFullScreenLeft() { + const root = document.querySelector(':root'); + // 获取 :root 上 --screen-left 变量的值 + const left = getComputedStyle(root).getPropertyValue('--screen-left').trim(); + // 设置 :root 上 --screen-left 变量的值 + root.style.setProperty('--screen-left', left === '44px' ? '150px' : '44px'); + }, handleMoldChange(index) { if (this.minderKey) { localStorage.setItem(this.minderKey + 'minderModel', index); @@ -299,11 +314,15 @@ export default { }; return importJson; } - } + }, }