luolei 4 rokov pred
rodič
commit
35be61b674
1 zmenil súbory, kde vykonal 6 pridanie a 1 odobranie
  1. 6 1
      src/components/basicKnow/AddTerm.vue

+ 6 - 1
src/components/basicKnow/AddTerm.vue

@@ -64,6 +64,7 @@
                   filterable
                   clearable
                   placeholder="请选择"
+                  @clear="clearDataCi"
                   size="small"
                   @change="selectType"
                 >
@@ -136,6 +137,7 @@
                     filterable
                     placeholder="请选择"
                     size="small"
+                    @clear="clearDataCi"
                     @change="selectType"
                   >
                     <el-option-group v-for="group in options" :key="group.label">
@@ -407,6 +409,9 @@ export default {
     }
   },
   methods: {
+    clearDataCi(){
+      this.data.code = ''
+    },
     dragAdd(ev) {
       utils.dragBox('dragModalWrap', 'dragModalTitle', 'add');
     },
@@ -762,7 +767,7 @@ export default {
         this.warning('请输入标准词');
         return;
       }
-      if (!this.data.code && !this.unfit || !this.data.type) {
+      if (!this.data.code && !this.unfit && !this.data.type) {
         this.warning('请选择术语类型');
         return;
       }