瀏覽代碼

自动关闭弹窗

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) {
-  setTimeout(() => { props.cancel }, autoCloseTime)
+  setTimeout(() => {
+    props.cancel()
+  }, autoCloseTime)
 }
 // const show = () => {
 //   dialog.value = true