Skip to content

Commit 5cb1802

Browse files
authored
fix(Dialog): fix dialog props duplicate (#3423)
* fix(Dialog): fix dialog props duplicate * fix(Dialog): fix dialog props duplicate
1 parent 2fecf0b commit 5cb1802

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/dialog/dialog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ export default mixins(ActionMixin, getConfigReceiverMixins<Vue, DialogConfig>('d
141141
}
142142
return topStyle;
143143
},
144-
dialogStyle(): Styles {
145-
return !this.isFullScreen ? { width: getCSSValue(this.width) } : {}; // width全屏模式不生效;
144+
computedDialogStyle(): Styles {
145+
return !this.isFullScreen ? { width: getCSSValue(this.width), ...this.dialogStyle } : { ...this.dialogStyle }; // width全屏模式不生效;
146146
},
147147
},
148148

@@ -477,7 +477,7 @@ export default mixins(ActionMixin, getConfigReceiverMixins<Vue, DialogConfig>('d
477477
// 非模态形态下draggable为true才允许拖拽
478478
<div class={this.wrapClass}>
479479
<div class={this.positionClass} style={this.positionStyle} onClick={this.overlayAction} ref="dialogPosition">
480-
<div key="dialog" ref="dialog" class={this.dialogClass} style={this.dialogStyle}>
480+
<div key="dialog" ref="dialog" class={this.dialogClass} style={this.computedDialogStyle}>
481481
<div class={headerClassName} onmousedown={this.onStopDown}>
482482
<div class={`${this.componentName}__header-content`}>
483483
{this.getIcon()}

0 commit comments

Comments
 (0)