meixioacomponent 2.0.50 → 2.0.52
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/package.json
CHANGED
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
<t-enhanced-table
|
|
77
77
|
ref="enhancedTableRef"
|
|
78
78
|
:row-key="rowKey"
|
|
79
|
+
:dragSort="dragSort"
|
|
79
80
|
:expanded-row-keys="expandRowKeys"
|
|
80
81
|
:columns="showTableHeader"
|
|
81
82
|
:data="tableData"
|
|
@@ -95,6 +96,7 @@
|
|
|
95
96
|
:selected-row-keys="tableCheckboxConfig.value"
|
|
96
97
|
@sort-change="sortChange"
|
|
97
98
|
@expand-change="rehandleExpandChange"
|
|
99
|
+
@drag-sort="onDragSort"
|
|
98
100
|
>
|
|
99
101
|
|
|
100
102
|
|
|
@@ -315,6 +317,12 @@ export default {
|
|
|
315
317
|
},
|
|
316
318
|
|
|
317
319
|
props: {
|
|
320
|
+
|
|
321
|
+
dragSort: {
|
|
322
|
+
type: String,
|
|
323
|
+
default: ''
|
|
324
|
+
},
|
|
325
|
+
|
|
318
326
|
// 树形结构传入的判断子节点与最后一级
|
|
319
327
|
treeProps: {
|
|
320
328
|
type: Object,
|
|
@@ -325,6 +333,8 @@ export default {
|
|
|
325
333
|
};
|
|
326
334
|
},
|
|
327
335
|
},
|
|
336
|
+
|
|
337
|
+
|
|
328
338
|
// 网络请求
|
|
329
339
|
httpRequire: {
|
|
330
340
|
type: Function,
|
|
@@ -509,7 +519,12 @@ export default {
|
|
|
509
519
|
// 使用序号下标
|
|
510
520
|
useIndex: {
|
|
511
521
|
type: Boolean,
|
|
512
|
-
default:
|
|
522
|
+
default: false
|
|
523
|
+
},
|
|
524
|
+
|
|
525
|
+
indexDefaultValue: {
|
|
526
|
+
type: Number,
|
|
527
|
+
default: 0
|
|
513
528
|
},
|
|
514
529
|
|
|
515
530
|
expandId: {
|
|
@@ -636,19 +651,19 @@ export default {
|
|
|
636
651
|
},
|
|
637
652
|
mixins: [tableSectionMixins],
|
|
638
653
|
methods: {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
654
|
+
/**
|
|
655
|
+
* 初始化表格下标
|
|
656
|
+
*/
|
|
657
|
+
initTableIndex() {
|
|
658
|
+
if (this.$props.useIndex) {
|
|
659
|
+
this.tableConfigColumnList.unshift({
|
|
660
|
+
key: ColIndexStr,
|
|
661
|
+
colKey: ColIndexStr,
|
|
662
|
+
label: '序号',
|
|
663
|
+
title: '序号',
|
|
664
|
+
})
|
|
665
|
+
}
|
|
666
|
+
},
|
|
652
667
|
rehandleExpandChange(value, params) {
|
|
653
668
|
this.$emit('rehandleExpandChange', value)
|
|
654
669
|
},
|
|
@@ -1008,7 +1023,7 @@ export default {
|
|
|
1008
1023
|
if (this.$props.useIndex) {
|
|
1009
1024
|
const size = this.$props.pageProps[this.$props.pageConfig.size];
|
|
1010
1025
|
data.forEach((item, index) => {
|
|
1011
|
-
item[`${ColIndexStr}`] = (((pageNum - 1) * size) + (index+
|
|
1026
|
+
item[`${ColIndexStr}`] = (((pageNum - 1) * size) + (index + this.$props.indexDefaultValue))
|
|
1012
1027
|
})
|
|
1013
1028
|
}
|
|
1014
1029
|
this.tableData = [];
|
|
@@ -1195,7 +1210,9 @@ export default {
|
|
|
1195
1210
|
this.$emit("handleSelectionChange", checkValue);
|
|
1196
1211
|
},
|
|
1197
1212
|
|
|
1198
|
-
|
|
1213
|
+
onDragSort(eve) {
|
|
1214
|
+
this.$emit('onDragSort', eve);
|
|
1215
|
+
}
|
|
1199
1216
|
},
|
|
1200
1217
|
watch: {
|
|
1201
1218
|
tableConfig() {
|