meixioacomponent 0.2.69 → 0.2.72
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/meixioacomponent.common.js +227 -201
- package/lib/meixioacomponent.umd.js +227 -201
- package/lib/meixioacomponent.umd.min.js +16 -16
- package/package.json +1 -1
- package/packages/components/proPageTable/oa_pro-table-search.vue +1 -4
- package/packages/components/proPageTable/oa_pro_screen_item.vue +7 -4
- package/packages/components/proPageTable/oa_pro_table.vue +51 -30
package/package.json
CHANGED
|
@@ -184,10 +184,7 @@ export default {
|
|
|
184
184
|
type: "info",
|
|
185
185
|
plain: true,
|
|
186
186
|
click: () => {
|
|
187
|
-
this.$parent.cleanProscreenCondition();
|
|
188
|
-
this.$nextTick(() => {
|
|
189
|
-
this.$parent.refreshData();
|
|
190
|
-
});
|
|
187
|
+
this.$parent.cleanProscreenCondition(true);
|
|
191
188
|
},
|
|
192
189
|
},
|
|
193
190
|
];
|
|
@@ -119,10 +119,13 @@ export default {
|
|
|
119
119
|
|
|
120
120
|
deleteProscreen() {
|
|
121
121
|
const { config } = this.$props;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
if (config) {
|
|
123
|
+
let index = config.findIndex((configItem) => {
|
|
124
|
+
return configItem.key == this.item.key;
|
|
125
|
+
});
|
|
126
|
+
config[index].isCheck = false;
|
|
127
|
+
}
|
|
128
|
+
|
|
126
129
|
this.$emit("deleteProscreenItem");
|
|
127
130
|
},
|
|
128
131
|
trigerCheck(index, params) {
|
|
@@ -232,6 +232,9 @@ export default {
|
|
|
232
232
|
|
|
233
233
|
// 是否开启表格横向条纹
|
|
234
234
|
borderRow: true,
|
|
235
|
+
|
|
236
|
+
// 倒计时
|
|
237
|
+
triggerDown: null,
|
|
235
238
|
};
|
|
236
239
|
},
|
|
237
240
|
created() {
|
|
@@ -243,6 +246,7 @@ export default {
|
|
|
243
246
|
},
|
|
244
247
|
beforeDestroy() {
|
|
245
248
|
componentConfig.eventBus.$off("handleTableBorder", this.handleTableBorder);
|
|
249
|
+
clearTimeout(this.triggerDown);
|
|
246
250
|
},
|
|
247
251
|
computed: {
|
|
248
252
|
config() {
|
|
@@ -448,19 +452,21 @@ export default {
|
|
|
448
452
|
cellMouseEnter(row, column, cell, event) {
|
|
449
453
|
let content = row[`${column.property}`];
|
|
450
454
|
this.tooltip.show = false;
|
|
451
|
-
if (
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
455
|
+
if (typeof content == "number" || typeof content == "string") {
|
|
456
|
+
const { tooltip } = this;
|
|
457
|
+
let style = event.target;
|
|
458
|
+
let position = style.getBoundingClientRect();
|
|
459
|
+
const { top, left } = position;
|
|
460
|
+
const { clientWidth, clientHeight } = style;
|
|
461
|
+
tooltip.width = clientWidth;
|
|
462
|
+
tooltip.height = clientHeight;
|
|
463
|
+
tooltip.top = top;
|
|
464
|
+
tooltip.left = left;
|
|
465
|
+
tooltip.content = content;
|
|
466
|
+
this.$nextTick(() => {
|
|
467
|
+
tooltip.show = true;
|
|
468
|
+
});
|
|
469
|
+
}
|
|
464
470
|
},
|
|
465
471
|
|
|
466
472
|
cellMouseLeave() {
|
|
@@ -649,6 +655,7 @@ export default {
|
|
|
649
655
|
this.loading = true;
|
|
650
656
|
this.defaultSvg = false;
|
|
651
657
|
this.cleanCheckValue();
|
|
658
|
+
clearTimeout(this.triggerDown);
|
|
652
659
|
if (init) {
|
|
653
660
|
this.$props.pageProps[this.$props.pageConfig.page] = 1;
|
|
654
661
|
}
|
|
@@ -659,19 +666,14 @@ export default {
|
|
|
659
666
|
});
|
|
660
667
|
},
|
|
661
668
|
// 设置表格数据
|
|
662
|
-
setTableData(data) {
|
|
669
|
+
setTableData(data, immediately = true) {
|
|
663
670
|
this.tableData = [];
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
this.computedTotalList();
|
|
671
|
-
this.$nextTick(() => {
|
|
672
|
-
this.scrollToTop();
|
|
673
|
-
});
|
|
674
|
-
}, 1000);
|
|
671
|
+
this.tableData = data;
|
|
672
|
+
if (immediately) {
|
|
673
|
+
this.tableDataCompleted();
|
|
674
|
+
} else {
|
|
675
|
+
this.setTriggerDown();
|
|
676
|
+
}
|
|
675
677
|
},
|
|
676
678
|
|
|
677
679
|
// 表格如果有滚动条将滚动条拉到顶部
|
|
@@ -689,11 +691,14 @@ export default {
|
|
|
689
691
|
});
|
|
690
692
|
},
|
|
691
693
|
// 清空高级筛选的条件
|
|
692
|
-
cleanProscreenCondition() {
|
|
694
|
+
cleanProscreenCondition(flag = false) {
|
|
693
695
|
if (this.proScreenList.length <= 0) return;
|
|
694
696
|
this.proScreenList.forEach((item) => {
|
|
695
697
|
item.value = null;
|
|
696
698
|
});
|
|
699
|
+
if (flag) {
|
|
700
|
+
this.refreshData(true);
|
|
701
|
+
}
|
|
697
702
|
},
|
|
698
703
|
// 自定义表格的列
|
|
699
704
|
setTableHeaderConfig(configList) {
|
|
@@ -710,7 +715,7 @@ export default {
|
|
|
710
715
|
label: "",
|
|
711
716
|
key: "noData",
|
|
712
717
|
lock: false,
|
|
713
|
-
width:
|
|
718
|
+
width: 30,
|
|
714
719
|
show: true,
|
|
715
720
|
template: false,
|
|
716
721
|
});
|
|
@@ -765,10 +770,26 @@ export default {
|
|
|
765
770
|
handleTableBorder(params) {
|
|
766
771
|
this[`${params.key}`] = params.value;
|
|
767
772
|
},
|
|
773
|
+
|
|
774
|
+
setTriggerDown() {
|
|
775
|
+
clearTimeout(this.triggerDown);
|
|
776
|
+
this.triggerDown = setTimeout(() => {
|
|
777
|
+
this.tableDataCompleted();
|
|
778
|
+
}, 1000);
|
|
779
|
+
},
|
|
780
|
+
|
|
781
|
+
tableDataCompleted() {
|
|
782
|
+
if (this.tableData.length == 0) {
|
|
783
|
+
this.defaultSvg = true;
|
|
784
|
+
}
|
|
785
|
+
this.loading = false;
|
|
786
|
+
this.computedTotalList();
|
|
787
|
+
this.$nextTick(() => {
|
|
788
|
+
this.scrollToTop();
|
|
789
|
+
});
|
|
790
|
+
},
|
|
768
791
|
},
|
|
769
|
-
watch: {
|
|
770
|
-
fixedList(newValue, oldValue) {},
|
|
771
|
-
},
|
|
792
|
+
watch: {},
|
|
772
793
|
};
|
|
773
794
|
</script>
|
|
774
795
|
|