From ee5d7f986a5068bdb654ed5831687c33b7d45dd9 Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Tue, 31 Dec 2019 15:39:21 +0800 Subject: [PATCH] =?UTF-8?q?dialog=20size=20=E6=94=AF=E6=8C=81=20full=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scss/components/_modal.scss | 11 +++++++++++ src/renderers/Dialog.tsx | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scss/components/_modal.scss b/scss/components/_modal.scss index e72987b1..b929b845 100644 --- a/scss/components/_modal.scss +++ b/scss/components/_modal.scss @@ -218,3 +218,14 @@ .#{$ns}Dialog-error { color: $danger; } + +.#{$ns}Modal--full .#{$ns}Modal-content { + width: calc(100% - 60px); + height: calc(100% - 60px); + max-width: unset; + margin: px2rem(30px); + + .#{$ns}Modal-body { + overflow: auto; + } +} diff --git a/src/renderers/Dialog.tsx b/src/renderers/Dialog.tsx index 38fecdec..85444be2 100644 --- a/src/renderers/Dialog.tsx +++ b/src/renderers/Dialog.tsx @@ -17,7 +17,7 @@ import {Spinner} from '../components'; export interface DialogProps extends RendererProps { title?: string; // 标题 - size?: 'md' | 'lg' | 'sm' | 'xl'; + size?: 'md' | 'lg' | 'sm' | 'xl' | 'full'; closeOnEsc?: boolean; onClose: () => void; onConfirm: (