浏览代码

自动关闭弹窗

lifanagju_citu 6 月之前
父节点
当前提交
11bd67b999
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/plugins/confirm/confirm.vue

+ 3 - 1
src/plugins/confirm/confirm.vue

@@ -24,7 +24,9 @@ const autoCloseTime = props.option.autoCloseTime || 0
 
 
 // 自动关闭弹窗
 // 自动关闭弹窗
 if (autoCloseTime && Number.isInteger(autoCloseTime) && autoCloseTime >= 1000) {
 if (autoCloseTime && Number.isInteger(autoCloseTime) && autoCloseTime >= 1000) {
-  setTimeout(() => { props.cancel }, autoCloseTime)
+  setTimeout(() => {
+    props.cancel()
+  }, autoCloseTime)
 }
 }
 // const show = () => {
 // const show = () => {
 //   dialog.value = true
 //   dialog.value = true