Browse Source

调整表单修改

duy 1 year ago
parent
commit
98ed49b793
1 changed files with 16 additions and 10 deletions
  1. 16 10
      src/views/manager/projectinfo/treeTemplate/template/setInputTPT.vue

+ 16 - 10
src/views/manager/projectinfo/treeTemplate/template/setInputTPT.vue

@@ -201,7 +201,21 @@ export default {
         // this.from.type = '';
         this.setInputTable = [];
       }
-    }
+    },
+    checkNameList: {
+      handler (vla,val) {
+        let iCan=val.some(e => e.name === "警告")
+        if(iCan||this.htmlData.name==='警告'){
+          this.$message({
+            type: "warning",
+            message: "当前选中的元素未进行匹配,不能设置输入框格式"
+          });
+          
+          return;
+        }
+      },
+      deep: true
+    },
   },
   data() {
     return {
@@ -241,15 +255,7 @@ export default {
       this.setInputTable.splice(key, 1)
     },
     saveType() {//保存设置按钮
-    let iCan=this.checkNameList.some(e => e.name === "警告")
-      if(iCan||this.htmlData.name==='警告'){
-        this.$message({
-          type: "warning",
-          message: "当前选中的元素未进行匹配,不能设置输入框格式"
-        });
-        
-        return;
-      }
+
       if (this.htmlData.tr === ''&&this.checkList.length==0 || this.htmlData.td === ''&&this.checkList.length==0) {
         this.$message({
           type: "warning",