Ver Fonte

refactor(shipOwnerWeappConfig): 优化修改表单提交逻辑

- 在提交修改表单时,增加根据 isEditMode 判断是否需要显示确认对话框
- 减少了不必要的弹窗提示,提高了用户体验
wzg há 10 meses atrás
pai
commit
a3f491b35e
1 ficheiros alterados com 7 adições e 5 exclusões
  1. 7 5
      src/views/toolManage/shipOwnerWeappConfig.vue

+ 7 - 5
src/views/toolManage/shipOwnerWeappConfig.vue

@@ -352,11 +352,13 @@ const modifyFormRef = ref(null);
 async function submitModifyForm() {
   try {
     await modifyFormRef.value.validate();
-    await ElMessageBox.confirm("确定要保存修改吗?", "警告", {
-      confirmButtonText: "确定",
-      cancelButtonText: "取消",
-      type: "warning",
-    });
+    if (isEditMode.value) {
+      await ElMessageBox.confirm("确定要保存修改吗?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      });
+    }
     const { data } = await api.modifyShipCertOperation({
       ...modifyForm.value,
       certOperationId: modifyForm.value.id,