Browse Source

自动关闭弹窗

lifanagju_citu 6 months ago
parent
commit
11bd67b999
1 changed files with 3 additions and 1 deletions
  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