Browse Source

docs: fix alert demo in docs

pull/5855/head
Netfan 2 years ago
parent
commit
c623604ea9
  1. 7
      docs/src/demos/vben-alert/confirm/index.vue

7
docs/src/demos/vben-alert/confirm/index.vue

@ -20,8 +20,11 @@ function showIconConfirm() {
function showAsyncConfirm() { function showAsyncConfirm() {
confirm({ confirm({
beforeClose() { beforeClose({ isConfirm }) {
return new Promise((resolve) => setTimeout(resolve, 2000)); if (isConfirm) {
// 这里可以执行一些异步操作。如果最终返回了false,将阻止关闭弹窗
return new Promise((resolve) => setTimeout(resolve, 2000));
}
}, },
content: 'This is an alert message with async confirm', content: 'This is an alert message with async confirm',
icon: 'success', icon: 'success',

Loading…
Cancel
Save