vxe-table 3.14.0 → 3.14.1
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/es/style.css +1 -1
- package/es/table/module/edit/mixin.js +92 -63
- package/es/table/module/validator/mixin.js +2 -5
- package/es/table/src/body.js +6 -7
- package/es/table/src/methods.js +291 -278
- package/es/table/src/table.js +15 -15
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +478 -484
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +106 -98
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +3 -9
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/src/body.js +6 -7
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +343 -348
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +15 -15
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/mixin.ts +125 -87
- package/packages/table/module/validator/mixin.ts +3 -6
- package/packages/table/src/body.ts +6 -7
- package/packages/table/src/methods.ts +334 -293
- package/packages/table/src/table.ts +18 -18
- package/packages/table/src/util.ts +2 -2
- /package/es/{iconfont.1742955973002.ttf → iconfont.1743045564244.ttf} +0 -0
- /package/es/{iconfont.1742955973002.woff → iconfont.1743045564244.woff} +0 -0
- /package/es/{iconfont.1742955973002.woff2 → iconfont.1743045564244.woff2} +0 -0
- /package/lib/{iconfont.1742955973002.ttf → iconfont.1743045564244.ttf} +0 -0
- /package/lib/{iconfont.1742955973002.woff → iconfont.1743045564244.woff} +0 -0
- /package/lib/{iconfont.1742955973002.woff2 → iconfont.1743045564244.woff2} +0 -0
|
@@ -44,18 +44,20 @@ function syncActivedCell($xeTable) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function insertTreeRow(
|
|
48
|
-
const
|
|
47
|
+
function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
48
|
+
const internalData = $xeTable;
|
|
49
|
+
const { tableFullTreeData, afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
50
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
49
51
|
const { rowField, parentField, mapChildrenField } = treeOpts;
|
|
50
52
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
51
53
|
const funcName = isAppend ? 'push' : 'unshift';
|
|
52
54
|
newRecords.forEach((item) => {
|
|
53
55
|
const parentRowId = item[parentField];
|
|
54
|
-
const rowid = getRowid(
|
|
56
|
+
const rowid = getRowid($xeTable, item);
|
|
55
57
|
const matchObj = parentRowId ? XEUtils.findTree(tableFullTreeData, (item) => parentRowId === item[rowField], { children: mapChildrenField }) : null;
|
|
56
58
|
if (matchObj) {
|
|
57
59
|
const { item: parentRow } = matchObj;
|
|
58
|
-
const parentRest = fullAllDataRowIdData[getRowid(
|
|
60
|
+
const parentRest = fullAllDataRowIdData[getRowid($xeTable, parentRow)];
|
|
59
61
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
60
62
|
let parentChilds = parentRow[childrenField];
|
|
61
63
|
let mapChilds = parentRow[mapChildrenField];
|
|
@@ -90,8 +92,8 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
90
92
|
const reactData = $xeTable;
|
|
91
93
|
const internalData = $xeTable;
|
|
92
94
|
const { treeConfig } = props;
|
|
93
|
-
const { mergeList
|
|
94
|
-
const { tableFullTreeData, afterFullData, tableFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
95
|
+
const { mergeList } = reactData;
|
|
96
|
+
const { tableFullTreeData, afterFullData, tableFullData, fullDataRowIdData, fullAllDataRowIdData, insertRowMaps } = internalData;
|
|
95
97
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
96
98
|
const { transform, rowField, mapChildrenField } = treeOpts;
|
|
97
99
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
@@ -238,11 +240,11 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
238
240
|
}
|
|
239
241
|
}
|
|
240
242
|
}
|
|
241
|
-
const { insertMaps } = editStore;
|
|
242
243
|
newRecords.forEach(newRow => {
|
|
243
244
|
const rowid = getRowid($xeTable, newRow);
|
|
244
|
-
|
|
245
|
+
insertRowMaps[rowid] = newRow;
|
|
245
246
|
});
|
|
247
|
+
reactData.insertRowFlag++;
|
|
246
248
|
$xeTable.cacheRowMap(false);
|
|
247
249
|
$xeTable.updateScrollYStatus();
|
|
248
250
|
$xeTable.handleTableData(treeConfig && transform);
|
|
@@ -251,7 +253,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
251
253
|
}
|
|
252
254
|
$xeTable.updateFooter();
|
|
253
255
|
$xeTable.checkSelectionStatus();
|
|
254
|
-
if (
|
|
256
|
+
if (reactData.scrollYLoad) {
|
|
255
257
|
$xeTable.updateScrollYSpace();
|
|
256
258
|
}
|
|
257
259
|
return $xeTable.$nextTick().then(() => {
|
|
@@ -493,13 +495,12 @@ export default {
|
|
|
493
495
|
const internalData = $xeTable;
|
|
494
496
|
const { treeConfig } = props;
|
|
495
497
|
const { mergeList, editStore } = reactData;
|
|
496
|
-
const { tableFullTreeData, selectCheckboxMaps, afterFullData, tableFullData, pendingRowMaps } = internalData;
|
|
498
|
+
const { tableFullTreeData, selectCheckboxMaps, afterFullData, tableFullData, pendingRowMaps, insertRowMaps, removeRowMaps } = internalData;
|
|
497
499
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
498
500
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
499
501
|
const { transform, mapChildrenField } = treeOpts;
|
|
500
502
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
501
|
-
const { actived
|
|
502
|
-
const insertDataRowMaps = Object.assign({}, editStore.insertMaps);
|
|
503
|
+
const { actived } = editStore;
|
|
503
504
|
const { checkField } = checkboxOpts;
|
|
504
505
|
let delList = [];
|
|
505
506
|
if (!rows) {
|
|
@@ -512,7 +513,7 @@ export default {
|
|
|
512
513
|
rows.forEach(row => {
|
|
513
514
|
if (!$xeTable.isInsertByRow(row)) {
|
|
514
515
|
const rowid = getRowid($xeTable, row);
|
|
515
|
-
|
|
516
|
+
removeRowMaps[rowid] = row;
|
|
516
517
|
}
|
|
517
518
|
});
|
|
518
519
|
// 如果绑定了多选属性,则更新状态
|
|
@@ -583,14 +584,15 @@ export default {
|
|
|
583
584
|
// 从新增中移除已删除的数据
|
|
584
585
|
rows.forEach((row) => {
|
|
585
586
|
const rowid = getRowid($xeTable, row);
|
|
586
|
-
if (
|
|
587
|
-
delete
|
|
587
|
+
if (insertRowMaps[rowid]) {
|
|
588
|
+
delete insertRowMaps[rowid];
|
|
588
589
|
}
|
|
589
590
|
if (pendingRowMaps[rowid]) {
|
|
590
591
|
delete pendingRowMaps[rowid];
|
|
591
592
|
}
|
|
592
593
|
});
|
|
593
|
-
|
|
594
|
+
reactData.removeRowFlag++;
|
|
595
|
+
reactData.insertRowFlag++;
|
|
594
596
|
reactData.pendingRowFlag++;
|
|
595
597
|
$xeTable.updateFooter();
|
|
596
598
|
$xeTable.cacheRowMap(false);
|
|
@@ -661,13 +663,10 @@ export default {
|
|
|
661
663
|
*/
|
|
662
664
|
_getInsertRecords() {
|
|
663
665
|
const $xeTable = this;
|
|
664
|
-
const reactData = $xeTable;
|
|
665
666
|
const internalData = $xeTable;
|
|
666
|
-
const {
|
|
667
|
-
const { fullAllDataRowIdData } = internalData;
|
|
668
|
-
const { insertMaps } = editStore;
|
|
667
|
+
const { fullAllDataRowIdData, insertRowMaps } = internalData;
|
|
669
668
|
const insertRecords = [];
|
|
670
|
-
XEUtils.each(
|
|
669
|
+
XEUtils.each(insertRowMaps, (row, rowid) => {
|
|
671
670
|
if (fullAllDataRowIdData[rowid]) {
|
|
672
671
|
insertRecords.push(row);
|
|
673
672
|
}
|
|
@@ -679,11 +678,10 @@ export default {
|
|
|
679
678
|
*/
|
|
680
679
|
_getRemoveRecords() {
|
|
681
680
|
const $xeTable = this;
|
|
682
|
-
const
|
|
683
|
-
const {
|
|
684
|
-
const { removeMaps } = editStore;
|
|
681
|
+
const internalData = $xeTable;
|
|
682
|
+
const { removeRowMaps } = internalData;
|
|
685
683
|
const removeRecords = [];
|
|
686
|
-
XEUtils.each(
|
|
684
|
+
XEUtils.each(removeRowMaps, (row) => {
|
|
687
685
|
removeRecords.push(row);
|
|
688
686
|
});
|
|
689
687
|
return removeRecords;
|
|
@@ -695,17 +693,17 @@ export default {
|
|
|
695
693
|
*/
|
|
696
694
|
_getUpdateRecords() {
|
|
697
695
|
const $xeTable = this;
|
|
698
|
-
const
|
|
696
|
+
const props = $xeTable;
|
|
697
|
+
const internalData = $xeTable;
|
|
698
|
+
const { keepSource, treeConfig } = props;
|
|
699
|
+
const { tableFullData } = internalData;
|
|
700
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
699
701
|
if (keepSource) {
|
|
700
|
-
|
|
701
|
-
const { row, column } = actived;
|
|
702
|
-
if (row || column) {
|
|
703
|
-
syncActivedCell($xeTable);
|
|
704
|
-
}
|
|
702
|
+
syncActivedCell($xeTable);
|
|
705
703
|
if (treeConfig) {
|
|
706
|
-
return XEUtils.filterTree(tableFullData, row => isUpdateByRow(row), treeOpts);
|
|
704
|
+
return XEUtils.filterTree(tableFullData, row => $xeTable.isUpdateByRow(row), treeOpts);
|
|
707
705
|
}
|
|
708
|
-
return tableFullData.filter((row) => isUpdateByRow(row));
|
|
706
|
+
return tableFullData.filter((row) => $xeTable.isUpdateByRow(row));
|
|
709
707
|
}
|
|
710
708
|
return [];
|
|
711
709
|
},
|
|
@@ -754,42 +752,52 @@ export default {
|
|
|
754
752
|
return handleClearEdit($xeTable, evnt, targetRow);
|
|
755
753
|
},
|
|
756
754
|
_getActiveRecord() {
|
|
755
|
+
const $xeTable = this;
|
|
757
756
|
if (process.env.NODE_ENV === 'development') {
|
|
758
757
|
warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
|
|
759
758
|
}
|
|
760
759
|
// 即将废弃
|
|
761
|
-
return
|
|
760
|
+
return $xeTable.getEditRecord();
|
|
762
761
|
},
|
|
763
762
|
_getEditRecord() {
|
|
764
|
-
const
|
|
765
|
-
const
|
|
766
|
-
const
|
|
767
|
-
|
|
763
|
+
const $xeTable = this;
|
|
764
|
+
const reactData = $xeTable;
|
|
765
|
+
const internalData = $xeTable;
|
|
766
|
+
const { editStore } = reactData;
|
|
767
|
+
const { afterFullData } = internalData;
|
|
768
|
+
const el = $xeTable.$refs.refElem;
|
|
769
|
+
const { args, row } = editStore.actived;
|
|
770
|
+
if (args && $xeTable.findRowIndexOf(afterFullData, row) > -1 && el.querySelectorAll('.vxe-body--column.col--active').length) {
|
|
768
771
|
return Object.assign({}, args);
|
|
769
772
|
}
|
|
770
773
|
return null;
|
|
771
774
|
},
|
|
772
775
|
_isActiveByRow(row) {
|
|
776
|
+
const $xeTable = this;
|
|
773
777
|
if (process.env.NODE_ENV === 'development') {
|
|
774
778
|
warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
|
|
775
779
|
}
|
|
776
780
|
// 即将废弃
|
|
777
|
-
return
|
|
781
|
+
return $xeTable.isEditByRow(row);
|
|
778
782
|
},
|
|
779
783
|
/**
|
|
780
784
|
* 判断行是否为激活编辑状态
|
|
781
785
|
* @param {Row} row 行对象
|
|
782
786
|
*/
|
|
783
787
|
_isEditByRow(row) {
|
|
784
|
-
|
|
788
|
+
const $xeTable = this;
|
|
789
|
+
const reactData = $xeTable;
|
|
790
|
+
const { editStore } = reactData;
|
|
791
|
+
return editStore.actived.row === row;
|
|
785
792
|
},
|
|
786
793
|
/**
|
|
787
794
|
* 处理聚焦
|
|
788
795
|
*/
|
|
789
796
|
handleFocus(params) {
|
|
790
|
-
const
|
|
797
|
+
const $xeTable = this;
|
|
791
798
|
const { row, column, cell } = params;
|
|
792
799
|
const { editRender } = column;
|
|
800
|
+
const editOpts = $xeTable.computeEditOpts;
|
|
793
801
|
if (isEnableConf(editRender)) {
|
|
794
802
|
const compRender = renderer.get(editRender.name);
|
|
795
803
|
let autoFocus = editRender.autofocus || editRender.autoFocus;
|
|
@@ -805,7 +813,7 @@ export default {
|
|
|
805
813
|
}
|
|
806
814
|
// 如果指定了聚焦 class
|
|
807
815
|
if (XEUtils.isFunction(autoFocus)) {
|
|
808
|
-
inputElem = autoFocus.call(
|
|
816
|
+
inputElem = autoFocus.call($xeTable, params);
|
|
809
817
|
}
|
|
810
818
|
else if (autoFocus) {
|
|
811
819
|
if (autoFocus === true) {
|
|
@@ -838,18 +846,19 @@ export default {
|
|
|
838
846
|
if (editOpts.autoPos) {
|
|
839
847
|
if (!column.fixed) {
|
|
840
848
|
// 显示到可视区中
|
|
841
|
-
|
|
849
|
+
$xeTable.scrollToRow(row, column);
|
|
842
850
|
}
|
|
843
851
|
}
|
|
844
852
|
}
|
|
845
853
|
}
|
|
846
854
|
},
|
|
847
855
|
_setActiveRow(row) {
|
|
856
|
+
const $xeTable = this;
|
|
848
857
|
if (process.env.NODE_ENV === 'development') {
|
|
849
858
|
warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
|
|
850
859
|
}
|
|
851
860
|
// 即将废弃
|
|
852
|
-
return
|
|
861
|
+
return $xeTable.setEditRow(row);
|
|
853
862
|
},
|
|
854
863
|
/**
|
|
855
864
|
* 激活行编辑
|
|
@@ -861,7 +870,7 @@ export default {
|
|
|
861
870
|
if (fieldOrColumn) {
|
|
862
871
|
isPos = true;
|
|
863
872
|
if (fieldOrColumn !== true) {
|
|
864
|
-
column = XEUtils.isString(fieldOrColumn) ?
|
|
873
|
+
column = XEUtils.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
865
874
|
}
|
|
866
875
|
}
|
|
867
876
|
return handleEditCell($xeTable, row, column, isPos);
|
|
@@ -884,24 +893,38 @@ export default {
|
|
|
884
893
|
* 只对 trigger=dblclick 有效,选中单元格
|
|
885
894
|
*/
|
|
886
895
|
_setSelectCell(row, fieldOrColumn) {
|
|
887
|
-
const
|
|
888
|
-
const
|
|
896
|
+
const $xeTable = this;
|
|
897
|
+
const reactData = $xeTable;
|
|
898
|
+
const { tableData } = reactData;
|
|
899
|
+
const editOpts = $xeTable.computeEditOpts;
|
|
900
|
+
const column = XEUtils.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
889
901
|
if (row && column && editOpts.trigger !== 'manual') {
|
|
890
|
-
const rowIndex =
|
|
902
|
+
const rowIndex = $xeTable.findRowIndexOf(tableData, row);
|
|
891
903
|
if (rowIndex > -1) {
|
|
892
|
-
const cell =
|
|
893
|
-
const params = {
|
|
894
|
-
|
|
904
|
+
const cell = $xeTable.getCellElement(row, column);
|
|
905
|
+
const params = {
|
|
906
|
+
row,
|
|
907
|
+
rowIndex,
|
|
908
|
+
column,
|
|
909
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
910
|
+
cell
|
|
911
|
+
};
|
|
912
|
+
$xeTable.handleSelected(params, {});
|
|
895
913
|
}
|
|
896
914
|
}
|
|
897
|
-
return
|
|
915
|
+
return $xeTable.$nextTick();
|
|
898
916
|
},
|
|
899
917
|
/**
|
|
900
918
|
* 处理选中源
|
|
901
919
|
*/
|
|
902
920
|
handleSelected(params, evnt) {
|
|
903
921
|
const $xeTable = this;
|
|
904
|
-
const
|
|
922
|
+
const props = $xeTable;
|
|
923
|
+
const reactData = $xeTable;
|
|
924
|
+
const { mouseConfig } = props;
|
|
925
|
+
const { editStore } = reactData;
|
|
926
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
927
|
+
const editOpts = $xeTable.computeEditOpts;
|
|
905
928
|
const { actived, selected } = editStore;
|
|
906
929
|
const { row, column } = params;
|
|
907
930
|
const isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
@@ -909,22 +932,24 @@ export default {
|
|
|
909
932
|
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
910
933
|
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
911
934
|
handleClearEdit($xeTable, evnt);
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
935
|
+
$xeTable.clearSelected();
|
|
936
|
+
if ($xeTable.clearCellAreas) {
|
|
937
|
+
$xeTable.clearCellAreas();
|
|
938
|
+
$xeTable.clearCopyCellArea();
|
|
939
|
+
}
|
|
915
940
|
selected.args = params;
|
|
916
941
|
selected.row = row;
|
|
917
942
|
selected.column = column;
|
|
918
943
|
if (isMouseSelected) {
|
|
919
944
|
this.addCellSelectedClass();
|
|
920
945
|
}
|
|
921
|
-
|
|
946
|
+
$xeTable.focus();
|
|
922
947
|
if (evnt) {
|
|
923
|
-
|
|
948
|
+
$xeTable.dispatchEvent('cell-selected', params, evnt);
|
|
924
949
|
}
|
|
925
950
|
}
|
|
926
951
|
}
|
|
927
|
-
return
|
|
952
|
+
return $xeTable.$nextTick();
|
|
928
953
|
};
|
|
929
954
|
return selectMethod();
|
|
930
955
|
},
|
|
@@ -932,7 +957,10 @@ export default {
|
|
|
932
957
|
* 获取选中的单元格
|
|
933
958
|
*/
|
|
934
959
|
_getSelectedCell() {
|
|
935
|
-
const
|
|
960
|
+
const $xeTable = this;
|
|
961
|
+
const reactData = $xeTable;
|
|
962
|
+
const { editStore } = reactData;
|
|
963
|
+
const { args, column } = editStore.selected;
|
|
936
964
|
if (args && column) {
|
|
937
965
|
return Object.assign({}, args);
|
|
938
966
|
}
|
|
@@ -943,12 +971,13 @@ export default {
|
|
|
943
971
|
*/
|
|
944
972
|
_clearSelected() {
|
|
945
973
|
const $xeTable = this;
|
|
946
|
-
const
|
|
974
|
+
const reactData = $xeTable;
|
|
975
|
+
const { editStore } = reactData;
|
|
976
|
+
const { selected } = editStore;
|
|
947
977
|
selected.row = null;
|
|
948
978
|
selected.column = null;
|
|
949
|
-
this.reColTitleSdCls();
|
|
950
979
|
removeCellSelectedClass($xeTable);
|
|
951
|
-
return
|
|
980
|
+
return $xeTable.$nextTick();
|
|
952
981
|
},
|
|
953
982
|
reColTitleSdCls() {
|
|
954
983
|
const headerElem = this.elemStore['main-header-list'];
|
|
@@ -149,13 +149,10 @@ export default {
|
|
|
149
149
|
beginValidate(rows, cols, cb, isFull) {
|
|
150
150
|
const $xeTable = this;
|
|
151
151
|
const props = $xeTable;
|
|
152
|
-
const reactData = $xeTable;
|
|
153
152
|
const internalData = $xeTable;
|
|
154
153
|
const validRest = {};
|
|
155
154
|
const { editRules, treeConfig } = props;
|
|
156
|
-
const {
|
|
157
|
-
const { afterFullData, pendingRowMaps } = internalData;
|
|
158
|
-
const { removeMaps } = editStore;
|
|
155
|
+
const { afterFullData, pendingRowMaps, removeRowMaps } = internalData;
|
|
159
156
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
160
157
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
161
158
|
let validList;
|
|
@@ -183,7 +180,7 @@ export default {
|
|
|
183
180
|
const handleVaild = (row) => {
|
|
184
181
|
const rowid = getRowid($xeTable, row);
|
|
185
182
|
// 是否删除
|
|
186
|
-
if (
|
|
183
|
+
if (removeRowMaps[rowid]) {
|
|
187
184
|
return;
|
|
188
185
|
}
|
|
189
186
|
// 是否标记删除
|
package/es/table/src/body.js
CHANGED
|
@@ -417,9 +417,12 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
417
417
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
418
418
|
tableData.forEach((row, $rowIndex) => {
|
|
419
419
|
const trOn = {};
|
|
420
|
+
const rowid = handleGetRowId(row);
|
|
421
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
420
422
|
let rowIndex = $rowIndex;
|
|
421
|
-
|
|
422
|
-
|
|
423
|
+
let rowLevel = 0;
|
|
424
|
+
let seq = -1;
|
|
425
|
+
let _rowIndex = -1;
|
|
423
426
|
// 当前行事件
|
|
424
427
|
if (rowOpts.isHover || highlightHoverRow) {
|
|
425
428
|
trOn.mouseenter = (evnt) => {
|
|
@@ -435,11 +438,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
435
438
|
$xeTable.clearHoverRow();
|
|
436
439
|
};
|
|
437
440
|
}
|
|
438
|
-
const rowid = handleGetRowId(row);
|
|
439
|
-
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
440
|
-
let rowLevel = 0;
|
|
441
|
-
let seq = -1;
|
|
442
|
-
let _rowIndex = 0;
|
|
443
441
|
if (rowRest) {
|
|
444
442
|
rowLevel = rowRest.level;
|
|
445
443
|
if (treeConfig && transform && seqMode === 'increasing') {
|
|
@@ -448,6 +446,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
448
446
|
else {
|
|
449
447
|
seq = rowRest.seq;
|
|
450
448
|
}
|
|
449
|
+
rowIndex = rowRest.index;
|
|
451
450
|
_rowIndex = rowRest._index;
|
|
452
451
|
}
|
|
453
452
|
const params = { $table: $xeTable, seq, rowid, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex, _rowIndex };
|