Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dialog): 修复示例代码运行问题 #289

Merged
merged 2 commits into from
Aug 22, 2022
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
4 changes: 2 additions & 2 deletions src/dialog/demos/confirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<t-button theme="primary" @click="changeDialogVisible(5)"> 双操作对话框 </t-button>
<t-button theme="primary" @click="eventDialog()"> 带警示操作对话框 </t-button>
<t-dialog
v-model="isShowDialog5"
v-model:visible="isShowDialog5"
type="confirm"
:title="title"
:content="content"
Expand All @@ -16,7 +16,7 @@
>
</t-dialog>
<t-dialog
v-model="isShowDialog6"
v-model:visible="isShowDialog6"
type="confirm"
:title="title"
:content="moreTextContent"
Expand Down
8 changes: 4 additions & 4 deletions src/dialog/demos/feedback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<t-cell-group title="反馈类对话框">
<t-cell value-align="left">
<t-button theme="primary" @click="changeDialogVisible(1)"> 单行标题对话框 </t-button>
<t-dialog v-model="isShowDialog1" :title="singleHeader"> </t-dialog>
<t-dialog v-model:visible="isShowDialog1" :title="singleHeader"> </t-dialog>
</t-cell>
<t-cell value-align="left">
<t-button theme="primary" @click="changeDialogVisible(2)"> 多行标题对话框 </t-button>
<t-dialog v-model="isShowDialog2" :title="moreTextHeader"> </t-dialog>
<t-dialog v-model:visible="isShowDialog2" :title="moreTextHeader"> </t-dialog>
</t-cell>
<t-cell value-align="left">
<t-button theme="primary" @click="changeDialogVisible(3)"> 短文本对话框 </t-button>
<t-dialog
v-model="isShowDialog3"
v-model:visible="isShowDialog3"
:content="content"
@confirm="onConfirm"
@opened="openDialog"
Expand All @@ -25,7 +25,7 @@
</t-cell>
<t-cell value-align="left">
<t-button theme="primary" @click="changeDialogVisible(4)"> 长文本对话框 </t-button>
<t-dialog v-model="isShowDialog4" :title="title"> </t-dialog>
<t-dialog v-model:visible="isShowDialog4" :title="title"> </t-dialog>
</t-cell>
</t-cell-group>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/dialog/demos/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<t-button theme="primary" size="middle" @click="changeDialogVisible(2)"> 带说明文本 </t-button>
</t-cell>
<t-dialog
v-model="isShowDialog1"
v-model:visible="isShowDialog1"
:show-overlay="showOverlay"
type="confirm"
:is-input="isInput"
Expand All @@ -24,7 +24,7 @@
</template>
</t-dialog>
<t-dialog
v-model="isShowDialog2"
v-model:visible="isShowDialog2"
:show-overlay="showOverlay"
type="confirm"
:is-input="isInput"
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ preventScrollThrough | Boolean | true | 防止滚动穿透 | N
showInAttachedElement | Boolean | false | 【开发中】仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative | N
showOverlay | Boolean | true | 是否显示遮罩层 | N
title | String / Slot / Function | - | 标题。TS 类型:`string | TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
visible | Boolean | false | 控制对话框是否显示 | N
visible | Boolean | false | 控制对话框是否显示,支持语法糖 `v-model:visible`。TS 类型:`boolean` | N
width | String / Number | - | 对话框宽度,示例:320, '500px', '80%' | N
zIndex | Number | - | 对话框层级,Web 侧样式默认为 2500,移动端和小程序样式默认为 1500 | N
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件 | N
Expand Down