Browse Source

自动关闭弹窗

lifanagju_citu 6 tháng trước cách đây
mục cha
commit
11bd67b999
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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