Skip to content

Commit 1410dee

Browse files
committed
fix: modal add dialogStyle dialogClass #2285
1 parent ffc002f commit 1410dee

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

antdv-demo

components/vc-dialog/Dialog.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,10 @@ export default {
218218
visible,
219219
bodyProps,
220220
forceRender,
221+
dialogStyle,
222+
dialogClass,
221223
} = this;
222-
const dest = {};
224+
const dest = { ...dialogStyle };
223225
if (width !== undefined) {
224226
dest.width = typeof width === 'number' ? `${width}px` : width;
225227
}
@@ -276,7 +278,7 @@ export default {
276278
role="document"
277279
ref="dialog"
278280
style={style}
279-
class={cls}
281+
class={[cls, dialogClass]}
280282
forceRender={forceRender}
281283
onMousedown={this.onDialogMouseDown}
282284
>

components/vc-dialog/IDialogPropTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function IDialogPropTypes() {
3333
wrapProps: PropTypes.any,
3434
getContainer: PropTypes.any,
3535
dialogStyle: PropTypes.object.def(() => ({})),
36-
dialogClass: PropTypes.object.def(() => ({})),
36+
dialogClass: PropTypes.object.def(''),
3737
closeIcon: PropTypes.any,
3838
forceRender: PropTypes.bool,
3939
getOpenCount: PropTypes.func,

0 commit comments

Comments
 (0)