eoss-ui 0.4.49 → 0.4.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/data-table.js +16 -11
- package/lib/eoss-ui.common.js +19 -14
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/packages/data-table/src/main.vue +11 -5
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -517,6 +517,7 @@ export default {
|
|
|
517
517
|
handler(val) {
|
|
518
518
|
if (this.tableHeight != 'auto' && this.display) {
|
|
519
519
|
this.resetHeight();
|
|
520
|
+
this.doLayout();
|
|
520
521
|
}
|
|
521
522
|
}
|
|
522
523
|
},
|
|
@@ -524,11 +525,12 @@ export default {
|
|
|
524
525
|
handler(val) {
|
|
525
526
|
if (this.tableHeight != 'auto' && this.display) {
|
|
526
527
|
this.resetHeight();
|
|
528
|
+
this.doLayout();
|
|
527
529
|
}
|
|
528
530
|
}
|
|
529
531
|
},
|
|
530
532
|
checked(newVal) {
|
|
531
|
-
this.checkSelect(newVal);
|
|
533
|
+
this.datas.length && this.checkSelect(newVal);
|
|
532
534
|
},
|
|
533
535
|
thead: {
|
|
534
536
|
immediate: true,
|
|
@@ -579,6 +581,7 @@ export default {
|
|
|
579
581
|
display(val) {
|
|
580
582
|
if (val) {
|
|
581
583
|
this.resetHeight();
|
|
584
|
+
this.doLayout();
|
|
582
585
|
}
|
|
583
586
|
}
|
|
584
587
|
},
|
|
@@ -586,7 +589,7 @@ export default {
|
|
|
586
589
|
this.immediate && this.getTableData();
|
|
587
590
|
},
|
|
588
591
|
mounted() {
|
|
589
|
-
this.checkSelect(this.checked);
|
|
592
|
+
this.datas.length && this.checkSelect(this.checked);
|
|
590
593
|
this.resetHeight();
|
|
591
594
|
},
|
|
592
595
|
methods: {
|
|
@@ -697,7 +700,7 @@ export default {
|
|
|
697
700
|
});
|
|
698
701
|
},
|
|
699
702
|
checkSelect(newVal) {
|
|
700
|
-
|
|
703
|
+
this.$nextTick(() => {
|
|
701
704
|
if (util.getObjectType(newVal) === 'array') {
|
|
702
705
|
newVal.forEach((row) => {
|
|
703
706
|
if (util.isObject(row)) {
|
|
@@ -713,8 +716,7 @@ export default {
|
|
|
713
716
|
} else if (newVal === true) {
|
|
714
717
|
this.toggleAllSelection();
|
|
715
718
|
}
|
|
716
|
-
|
|
717
|
-
}
|
|
719
|
+
});
|
|
718
720
|
},
|
|
719
721
|
getTheads() {
|
|
720
722
|
util
|
|
@@ -789,6 +791,10 @@ export default {
|
|
|
789
791
|
this.list = results.data || results.records || results.list || [];
|
|
790
792
|
this.config.totalCount =
|
|
791
793
|
results.count || results.total || results.totalCount;
|
|
794
|
+
this.checked &&
|
|
795
|
+
this.$nextTick(() => {
|
|
796
|
+
this.checkSelect(this.checked);
|
|
797
|
+
});
|
|
792
798
|
} else {
|
|
793
799
|
this.list = [];
|
|
794
800
|
let msg = res.msg || '系统错误,请联系管理员!';
|