fix: modal add dialogStyle dialogClass #2285

pull/2275/head
tangjinzhou 2020-05-24 22:06:26 +08:00
parent ffc002f094
commit 1410dee61f
3 changed files with 6 additions and 4 deletions

@ -1 +1 @@
Subproject commit aba05e5d5f91583c536f44e95df5b9dbeb8482fe
Subproject commit f3b049411f17e556d8795f40d41bfadb471ae630

View File

@ -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}
>

View File

@ -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,