From 1410dee61f9788cb5d6d561e34a1b36f55d7f6c8 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sun, 24 May 2020 22:06:26 +0800 Subject: [PATCH] fix: modal add dialogStyle dialogClass #2285 --- antdv-demo | 2 +- components/vc-dialog/Dialog.jsx | 6 ++++-- components/vc-dialog/IDialogPropTypes.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/antdv-demo b/antdv-demo index aba05e5d5f..f3b049411f 160000 --- a/antdv-demo +++ b/antdv-demo @@ -1 +1 @@ -Subproject commit aba05e5d5f91583c536f44e95df5b9dbeb8482fe +Subproject commit f3b049411f17e556d8795f40d41bfadb471ae630 diff --git a/components/vc-dialog/Dialog.jsx b/components/vc-dialog/Dialog.jsx index 1247378ebe..3237784279 100644 --- a/components/vc-dialog/Dialog.jsx +++ b/components/vc-dialog/Dialog.jsx @@ -218,8 +218,10 @@ export default { visible, bodyProps, forceRender, + dialogStyle, + dialogClass, } = this; - const dest = {}; + const dest = { ...dialogStyle }; if (width !== undefined) { dest.width = typeof width === 'number' ? `${width}px` : width; } @@ -276,7 +278,7 @@ export default { role="document" ref="dialog" style={style} - class={cls} + class={[cls, dialogClass]} forceRender={forceRender} onMousedown={this.onDialogMouseDown} > diff --git a/components/vc-dialog/IDialogPropTypes.js b/components/vc-dialog/IDialogPropTypes.js index a15a153a5d..709bcdb0c9 100644 --- a/components/vc-dialog/IDialogPropTypes.js +++ b/components/vc-dialog/IDialogPropTypes.js @@ -33,7 +33,7 @@ function IDialogPropTypes() { wrapProps: PropTypes.any, getContainer: PropTypes.any, dialogStyle: PropTypes.object.def(() => ({})), - dialogClass: PropTypes.object.def(() => ({})), + dialogClass: PropTypes.object.def(''), closeIcon: PropTypes.any, forceRender: PropTypes.bool, getOpenCount: PropTypes.func,