Просмотр исходного кода

1、修改edit-table组件
2、修改multi-select组件

周兴 2 лет назад
Родитель
Сommit
834d5ea3f6

+ 0 - 1
src/components/base/dk-modal/dk-modal.vue

@@ -356,7 +356,6 @@ export default {
      * @date   : 2022/7/23 17:36
      */
     async modalOk() {
-      console.log('44', this.$refs.modal.$slots,this.$refs)
       if (this.$refs.modal && this.$refs.modal.$slots && this.$refs.modal.$slots.default
         && this.$refs.modal.$slots.default.length > 0
         && this.$refs.modal.$slots.default[0].componentInstance) {

+ 6 - 6
src/components/base/edit-table/edit-table.vue

@@ -2711,12 +2711,12 @@ export default {
      * @date   : 2022/4/19 9:21
      */
     handleScroll(e) {
-      // if (!this.isScroll) {
-      //   if (e.isY) {
-      //     this.$refs[this.name].clearActived(); //关闭行激活状态
-      //   }
-      //   this.$refs[this.name].$el.click(); //关闭表头的pop
-      // }
+      if (!this.isScroll) {
+        if (e.isY) {
+          this.$refs[this.name].clearActived(); //关闭行激活状态
+        }
+        this.$refs[this.name].$el.click(); //关闭表头的pop
+      }
     },
     /**
      * @desc   : 移动行

+ 16 - 7
src/components/business/multi-select/multi-select.vue

@@ -425,14 +425,23 @@ export default {
      * @date   : 2022/6/21 16:16
      */
     setCheckRow(it, row) {
-      console.log( 'setCheckRow',it, row)
-      if (!this.batchKeysPage.includes(it[this.selectKey])) {
-        this.batchKeysPage.push(it[this.selectKey]);
-        this.batchRowsPage.push(it)
-        this.$refs['table-select'].batchKeys = this.batchKeysPage;
-        this.$refs['table-select'].batchRows = [...this.batchRowsPage];
+      if(typeof it !== 'object'){
+        if (!this.batchKeysPage.includes(it)) {
+          this.batchKeysPage.push(it);
+          this.batchRowsPage.push(row)
+          this.$refs['table-select'].batchKeys = this.batchKeysPage;
+          this.$refs['table-select'].batchRows = [...this.batchRowsPage];
+        }
+        this.$refs['table-select'].setCheckboxRow(row);
+      }else{
+        if (!this.batchKeysPage.includes(it[this.selectKey])) {
+          this.batchKeysPage.push(it[this.selectKey]);
+          this.batchRowsPage.push(it)
+          this.$refs['table-select'].batchKeys = this.batchKeysPage;
+          this.$refs['table-select'].batchRows = [...this.batchRowsPage];
+        }
+        this.$refs['table-select'].setCheckboxRow(row);
       }
-      this.$refs['table-select'].$refs['table'].setCheckboxRow(row, true);
     },
     /**
      * @desc   : 放大镜点击事件