Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dialog/_example/attach.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<t-dialog
:visible.sync="visibleShowInAttachedElement"
header="对话框仅展示在挂载元素区域"
attach=".dialog-attach-wrap"
:showInAttachedElement="true"
placement="center"
:onConfirm="() => (this.visibleShowInAttachedElement = false)"
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default mixins(
return !this.isFullScreen ? { width: getCSSValue(this.width), ...this.dialogStyle } : { ...this.dialogStyle }; // width全屏模式不生效;
},
computedAttach(): AttachNode {
return this.showInAttachedElement || this.isNormal ? undefined : this.attach || this.globalAttach();
return this.isNormal ? undefined : this.attach || this.globalAttach();
},
},

Expand Down
9 changes: 8 additions & 1 deletion src/drawer/_example/attach-parent.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<template>
<div class="t-container">
<div class="t-suf-container">
<t-drawer :visible.sync="visible" :placement="placement" :mode="mode" header="抽屉标题" showInAttachedElement>
<t-drawer
:visible.sync="visible"
:placement="placement"
:mode="mode"
header="抽屉标题"
showInAttachedElement
attach=".t-suf-container"
>
<p>抽屉的内容</p>
</t-drawer>
<div class="tdesign-radio-button">
Expand Down
2 changes: 1 addition & 1 deletion src/drawer/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default mixins(
};
},
computedAttach(): AttachNode {
return this.showInAttachedElement ? undefined : this.attach || this.globalAttach();
return this.attach || this.globalAttach();
},
},

Expand Down
Loading