From cda6938d898dc9744cea408c6e34d591710f6003 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 29 七月 2024 17:36:13 +0800
Subject: [PATCH] 2024.7.29

---
 src/composables/formConfirm.js |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/composables/formConfirm.js b/src/composables/formConfirm.js
index dc295d5..92d114c 100644
--- a/src/composables/formConfirm.js
+++ b/src/composables/formConfirm.js
@@ -1,4 +1,4 @@
-import { defineProps, onActivated, onDeactivated, ref, watch } from 'vue';
+import { defineProps, onActivated, onDeactivated, reactive, ref, watch } from 'vue';
 import { useCloned } from '@vueuse/core';
 import { useMessageBoxTip, useMessageBox } from './messageBox';
 
@@ -92,9 +92,10 @@
   };
 
   // 鎻愪氦琛ㄥ崟
-  const onSubmit = function () {
-    formRef.value.validate((valid) => {
+  const onSubmit = function (messageBox = true) {
+    formRef.value.validate(async (valid) => {
       if (valid) {
+        if (messageBox) {
         useMessageBoxTip({
           confirmMsg: submit.msg,
           confirmTitle: submit.title,
@@ -104,6 +105,10 @@
             return res;
           }
         });
+        } else {
+          await submit.do();
+          submited();
+        }
       }
     });
   };

--
Gitblit v1.9.3