Browse Source

处理数据表删除行后长度框禁用异常问题

lph 1 year ago
parent
commit
2537f0d15b
1 changed files with 11 additions and 6 deletions
  1. 11 6
      zkqy-ui/src/views/tool/datasheet/index.vue

+ 11 - 6
zkqy-ui/src/views/tool/datasheet/index.vue

@@ -595,13 +595,17 @@ export default {
           this.handleRules("add");
         });
         // 初始化校验规则
-        this.experienceData.map((val, index) => {
-          let temp = JSON.parse(JSON.stringify(this.dataType));
-          let targetDictItem = temp.find((item) => {
-            return item.label === val.fieldType;
-          });
-          this.handleSelected(targetDictItem, { $index: index, row: val });
+        this.initInputEditable();
+      });
+    },
+    // 初始化长度框是否禁用
+    initInputEditable() {
+      this.experienceData.map((val, index) => {
+        let temp = JSON.parse(JSON.stringify(this.dataType));
+        let targetDictItem = temp.find((item) => {
+          return item.label === val.fieldType;
         });
+        this.handleSelected(targetDictItem, { $index: index, row: val });
       });
     },
     // 处理长度框是否可输入
@@ -775,6 +779,7 @@ export default {
       this.experienceData.splice(index, 1);
       this.handleRules("del", index);
       this.deleteField(row);
+      this.initInputEditable();
     },
     add() {
       const rule1 = new Promise((resolve, reject) => {