Skip to content

Commit 5121012

Browse files
committed
fix(Dialog): attach should work when showInAttachedElement is true
1 parent 4464b69 commit 5121012

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/dialog/_example/attach.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<t-dialog
5050
:visible.sync="visibleShowInAttachedElement"
5151
header="对话框仅展示在挂载元素区域"
52+
attach=".dialog-attach-wrap"
5253
:showInAttachedElement="true"
5354
placement="center"
5455
:onConfirm="() => (this.visibleShowInAttachedElement = false)"

src/dialog/dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export default mixins(
153153
return !this.isFullScreen ? { width: getCSSValue(this.width), ...this.dialogStyle } : { ...this.dialogStyle }; // width全屏模式不生效;
154154
},
155155
computedAttach(): AttachNode {
156-
return this.showInAttachedElement || this.isNormal ? undefined : this.attach || this.globalAttach();
156+
return this.isNormal ? undefined : this.attach || this.globalAttach();
157157
},
158158
},
159159

0 commit comments

Comments
 (0)