From 3357ab2da1d7eedf966829abbb9a2566b4bccbdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AD=90=E6=B6=B5?= <2067519648@qq.com> Date: Fri, 9 Aug 2024 10:00:29 +0000 Subject: [PATCH] =?UTF-8?q?!2975=20=E4=BF=AE=E5=A4=8D:=20=E6=A8=A1?= =?UTF-8?q?=E6=80=81=E6=A1=86=E6=9C=80=E5=A4=A7=E5=8C=96=E5=90=8E=E5=86=8D?= =?UTF-8?q?=E8=BF=98=E5=8E=9F=EF=BC=8C=E6=8B=96=E6=8B=BD=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UI/Components/Modal/CadModal.tsx | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/UI/Components/Modal/CadModal.tsx b/src/UI/Components/Modal/CadModal.tsx index 7e290680d..9140ccc96 100644 --- a/src/UI/Components/Modal/CadModal.tsx +++ b/src/UI/Components/Modal/CadModal.tsx @@ -62,15 +62,10 @@ export class CADModal dialog.insertBefore(dialogHeader, dialog.firstChild);//将header移回原dialog if (this.canResize)//恢复上一次resize后尺寸 { - if (this.resizeSize) - { - this.container.style.height = this.resizeSize.height + "px"; - this.container.style.width = (this.resizeSize.width + 1) + "px"; - } if (this.rndDiv) { - this.rndDiv.style.width = this.container.style.width; - this.rndDiv.style.height = this.container.style.height; + this.rndDiv.style.width = (this.resizeSize.width + 1) + "px"; + this.rndDiv.style.height = this.resizeSize.height + "px"; this.rndDiv.style.minWidth = "250px"; this.rndDiv.style.minHeight = "220px"; } @@ -408,8 +403,6 @@ export class CADModal ele.style.minHeight = "0"; ele.style.width = "auto"; ele.style.height = "auto"; - this.container.style.width = "auto"; - this.container.style.height = "auto"; } } this.container.blur(); @@ -422,15 +415,10 @@ export class CADModal if (this.container.classList.contains("max")) { this.container.classList.remove("max"); - if (this.resizeSize) - { - this.container.style.height = this.resizeSize.height + "px"; - this.container.style.width = (this.resizeSize.width + 1) + "px"; - } if (this.rndDiv) { - this.rndDiv.style.width = this.container.style.width; - this.rndDiv.style.height = this.container.style.height; + this.rndDiv.style.width = (this.resizeSize.width + 1) + "px"; + this.rndDiv.style.height = this.resizeSize.height + "px"; this.rndDiv.style.minWidth = "250px"; this.rndDiv.style.minHeight = "220px"; }