diff --git a/src/dialog/dialog.en-US.md b/src/dialog/dialog.en-US.md index 4748ac3e8..639de437e 100644 --- a/src/dialog/dialog.en-US.md +++ b/src/dialog/dialog.en-US.md @@ -22,6 +22,7 @@ width | String / Number | - | \- | N zIndex | Number | - | \- | N onCancel | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N onClose | Function | | Typescript:`(context: DialogCloseContext) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dialog/type.ts)。
`type DialogEventSource = 'cancel' \| 'overlay'`

`interface DialogCloseContext { trigger: DialogEventSource; e: MouseEvent }`
| N +onClosed | Function | | Typescript:`() => void`
| N onConfirm | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N onOverlayClick | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N diff --git a/src/dialog/dialog.md b/src/dialog/dialog.md index 2e563b7a2..71bcc6c1f 100644 --- a/src/dialog/dialog.md +++ b/src/dialog/dialog.md @@ -22,6 +22,7 @@ width | String / Number | - | 对话框宽度,示例:320, '500px', '80%' | N zIndex | Number | - | 对话框层级,Web 侧样式默认为 2500,移动端和小程序样式默认为 1500 | N onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件 | N onClose | Function | | TS 类型:`(context: DialogCloseContext) => void`
关闭事件,点击 取消按钮 或 点击蒙层 时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dialog/type.ts)。
`type DialogEventSource = 'cancel' \| 'overlay'`

`interface DialogCloseContext { trigger: DialogEventSource; e: MouseEvent }`
| N +onClosed | Function | | TS 类型:`() => void`
组件关闭且动画结束后执行。 | N onConfirm | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果“确认”按钮存在,则点击“确认”按钮时触发 | N onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果蒙层存在,点击蒙层时触发 | N