Browse Source

删除分组bug

zhouna 4 years ago
parent
commit
ec2a643e59
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/components/knowledgeExtra/DiagBaseType.vue

+ 6 - 2
src/components/knowledgeExtra/DiagBaseType.vue

@@ -100,8 +100,12 @@
                       this.data.groupVO.push(temp);
                       this.$emit('setRules');
                   },
-                  delGroup(){
-                      this.data.groupVO.splice(this.inx,1);
+                  delGroup(i){
+                      if(i===0&&this.data.groupVO.length===1){
+                          this.$emit("delDiag",this.inx);
+                          return;
+                      }
+                      this.data.groupVO.splice(i,1);
                   }
               },
               components:{