chenrui  2 éve
szülő
commit
22ca2861d4
1 módosított fájl, 6 hozzáadás és 2 törlés
  1. 6 2
      src/components/Table/index.vue

+ 6 - 2
src/components/Table/index.vue

@@ -319,6 +319,7 @@
                         @change="changeSelect(item.columnName, item)"
                         placeholder="请选择"
                         clearable
+                        @clear="tableForm[item.columnName] = ''"
                       >
                         <el-option
                           v-for="item in tableOptions[item.columnName]"
@@ -742,6 +743,9 @@ export default {
     this.$refs["table"]?.doLayout();
   },
   methods: {
+    clearup(item) {
+      item = "";
+    },
     eledite() {
       this.flag = false;
       const arrbegin = _.cloneDeep(this.tableOptionscp);
@@ -775,7 +779,7 @@ export default {
         arrbegin.beginPosition.forEach((element) => {
           if (element.v === this.tableForm.beginPosition) {
             if (element.nodeCode !== this.tableForm.beginNode) {
-              this.tableForm.beginPosition = null;
+              this.tableForm.beginPosition = "";
             }
           }
         });
@@ -806,7 +810,7 @@ export default {
         arrbegin.endPosition.forEach((element) => {
           if (element.v === this.tableForm.endPosition) {
             if (element.nodeCode !== this.tableForm.endNode) {
-              this.tableForm.endPosition = null;
+              this.tableForm.endPosition = "";
             }
           }
         });