Jelajahi Sumber

refactor(.gitignore): 添加 .DS_Store 文件到忽略列表

- 在 .gitignore 文件中添加 .DS_Store,避免 macOS 系统文件被 Git 跟踪

refactor(src/views/toolManage/shipOwnerWeappConfig.vue): 优化修改联系人表单验证

- 为修改联系人表单添加 ref 属性,实现表单验证
- 在提交修改前增加表单验证步骤,提高数据完整性
wzg 10 bulan lalu
induk
melakukan
000090e0e3
2 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 1 0
      .gitignore
  2. 3 1
      src/views/toolManage/shipOwnerWeappConfig.vue

+ 1 - 0
.gitignore

@@ -30,3 +30,4 @@ node_modules
 
 dist
 
+.DS_Store

+ 3 - 1
src/views/toolManage/shipOwnerWeappConfig.vue

@@ -64,6 +64,7 @@
         <el-dialog v-model="showModifyDialog" title="修改联系人" width="500px">
           <el-form
             class="ml20 mt20"
+            ref="modifyFormRef"
             :model="modifyForm"
             :rules="formRules"
             label-width="100px"
@@ -347,9 +348,10 @@ async function modifyShipCertOperation(row) {
     }
   } catch (error) {}
 }
-
+const modifyFormRef = ref(null);
 async function submitModifyForm() {
   try {
+    await modifyFormRef.value.validate();
     await ElMessageBox.confirm("确定要保存修改吗?", "警告", {
       confirmButtonText: "确定",
       cancelButtonText: "取消",