docs(Dialog): fix before-close description

This commit is contained in:
chenjiahan
2021-01-02 21:23:47 +08:00
parent 1bfc4d32ed
commit 101b416fa2
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -100,7 +100,7 @@ Dialog.alert({
通过 `beforeClose` 属性可以传入一个回调函数,在弹窗关闭前进行特定操作。
```js
const beforeClose = (action, done) =>
const beforeClose = (action) =>
new Promsie((resolve) => {
setTimeout(() => {
if (action === 'confirm') {
@@ -192,7 +192,7 @@ export default {
| closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | _boolean_ | `false` |
| lockScroll | 是否锁定背景滚动 | _boolean_ | `true` |
| allowHtml `v2.8.7` | 是否允许 message 内容中渲染 HTML | _boolean_ | `false` |
| beforeClose | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | _(action, done) => void_ | - |
| beforeClose | 关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 Promise | _(action) => boolean \| Promise_ | - |
| transition | 动画类名,等价于 [transtion](https://v3.cn.vuejs.org/api/built-in-components.html#transition) 的`name`属性 | _string_ | - |
| teleport | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| Element_ | `body` |