From d8b9cc08c00be24e886b84b5a8aff0e6e192eebc Mon Sep 17 00:00:00 2001 From: zhouyun1 Date: Wed, 14 Sep 2022 15:55:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(modal):=20=E4=BF=AE=E6=94=B9max-height?= =?UTF-8?q?=E5=80=BC=E7=9A=84=E8=AE=BE=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/modal/src/Modal.tsx | 7 ++++++- packages/ui/modal/src/styles/modal.scss | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/ui/modal/src/Modal.tsx b/packages/ui/modal/src/Modal.tsx index 47649d373..f5f9087a2 100644 --- a/packages/ui/modal/src/Modal.tsx +++ b/packages/ui/modal/src/Modal.tsx @@ -31,6 +31,7 @@ const modalIconMap = { [ModalType.WARNING]: , [ModalType.INFO]: , } +const defaultMaxHeight = 600 /** * TODO: What is Modal @@ -135,7 +136,11 @@ export const Modal = forwardRef( {showMask ?
: null}
defaultMaxHeight ? height : defaultMaxHeight, + }} {...getModalWrapperProps()} > {hasHeader ? ( diff --git a/packages/ui/modal/src/styles/modal.scss b/packages/ui/modal/src/styles/modal.scss index 990d4303b..5706fec44 100644 --- a/packages/ui/modal/src/styles/modal.scss +++ b/packages/ui/modal/src/styles/modal.scss @@ -82,17 +82,14 @@ $modal-overlay-background-color: rgba(0, 0, 0, 0.45) !default; .#{$prefix}--size-sm & { width: 400px; - max-height: 600px; } .#{$prefix}--size-md & { width: 520px; - max-height: 600px; } .#{$prefix}--size-lg & { width: 720px; - max-height: 600px; } .#{$prefix}--motion-enter & {