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
@@ -72,7 +72,7 @@ Dialog.alert({
### Asnyc Close
```js
const beforeClose = (action, done) =>
const beforeClose = (action) =>
new Promsie((resolve) => {
setTimeout(() => {
resolve(action === 'confirm');
@@ -157,7 +157,7 @@ export default {
| closeOnClickOverlay | Whether to close when overlay is clicked | _boolean_ | `false` |
| lockScroll | Whether to lock body scroll | _boolean_ | `true` |
| allowHtml `v2.8.7` | Whether to allow HTML rendering in message | _boolean_ | `false` |
| beforeClose | Callback function before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: Function) => void | - |
| beforeClose | Callback function before close | _(action) => boolean \| Promise_ | - |
| transition | Transition, equivalent to `name` prop of [transtion](https://v3.vuejs.org/api/built-in-components.html#transition) | _string_ | - |
| teleport | Return the mount node for Dialog | _string \| Element_ | `body` |