vxe-table 3.12.10-beta.2 → 3.12.10-beta.21
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +2 -1
- package/es/locale/lang/de-DE.js +2 -1
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/fr-FR.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +2 -1
- package/es/locale/lang/it-IT.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +4 -3
- package/es/locale/lang/th-TH.js +2 -1
- package/es/locale/lang/ug-CN.js +2 -1
- package/es/locale/lang/uk-UA.js +518 -517
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/edit/mixin.js +7 -7
- package/es/table/module/export/mixin.js +55 -32
- package/es/table/module/keyboard/mixin.js +68 -25
- package/es/table/module/menu/mixin.js +3 -1
- package/es/table/src/body.js +96 -64
- package/es/table/src/cell.js +3 -7
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/footer.js +31 -6
- package/es/table/src/header.js +45 -141
- package/es/table/src/methods.js +918 -456
- package/es/table/src/props.js +6 -2
- package/es/table/src/table.js +299 -149
- package/es/table/src/util.js +67 -57
- package/es/table/style.css +299 -191
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +20 -10
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +299 -191
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +1735 -1025
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +2 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/fr-FR.js +2 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/hy-AM.js +2 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +4 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +4 -3
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +518 -517
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +518 -517
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/mixin.js +12 -2
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +52 -27
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +73 -27
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +3 -1
- package/lib/table/src/body.js +89 -60
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +3 -5
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +2 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +26 -6
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +38 -153
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +1076 -551
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +6 -2
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +269 -129
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +80 -70
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +299 -191
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +20 -10
- 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/lib/vxe-table/style/style.css +299 -191
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +2 -1
- package/packages/locale/lang/de-DE.ts +2 -1
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/fr-FR.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +2 -1
- package/packages/locale/lang/it-IT.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +4 -3
- package/packages/locale/lang/th-TH.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +518 -517
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/edit/mixin.ts +7 -7
- package/packages/table/module/export/mixin.ts +50 -27
- package/packages/table/module/keyboard/mixin.ts +65 -24
- package/packages/table/module/menu/mixin.ts +4 -1
- package/packages/table/src/body.ts +102 -61
- package/packages/table/src/cell.ts +3 -7
- package/packages/table/src/column.ts +7 -2
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/footer.ts +31 -6
- package/packages/table/src/header.ts +45 -141
- package/packages/table/src/methods.ts +957 -461
- package/packages/table/src/props.ts +6 -2
- package/packages/table/src/table.ts +325 -149
- package/packages/table/src/util.ts +75 -62
- package/packages/ui/index.ts +21 -9
- package/styles/components/table.scss +352 -260
- package/styles/theme/base.scss +4 -6
- package/styles/theme/dark.scss +1 -0
- package/styles/theme/light.scss +1 -0
- package/styles/variable.scss +1 -0
- /package/es/{iconfont.1736736807414.ttf → iconfont.1737182271148.ttf} +0 -0
- /package/es/{iconfont.1736736807414.woff → iconfont.1737182271148.woff} +0 -0
- /package/es/{iconfont.1736736807414.woff2 → iconfont.1737182271148.woff2} +0 -0
- /package/lib/{iconfont.1736736807414.ttf → iconfont.1737182271148.ttf} +0 -0
- /package/lib/{iconfont.1736736807414.woff → iconfont.1737182271148.woff} +0 -0
- /package/lib/{iconfont.1736736807414.woff2 → iconfont.1737182271148.woff2} +0 -0
|
@@ -943,6 +943,48 @@ export function readLocalFile(options = {}) {
|
|
|
943
943
|
fileInput.click();
|
|
944
944
|
});
|
|
945
945
|
}
|
|
946
|
+
function handleFilterColumns(exportOpts, column, columns) {
|
|
947
|
+
return columns.some((item) => {
|
|
948
|
+
if (isColumnInfo(item)) {
|
|
949
|
+
return column.id === item.id;
|
|
950
|
+
}
|
|
951
|
+
else if (XEUtils.isString(item)) {
|
|
952
|
+
return column.field === item;
|
|
953
|
+
}
|
|
954
|
+
else {
|
|
955
|
+
const colid = item.id || item.colId;
|
|
956
|
+
const type = item.type;
|
|
957
|
+
const field = item.field;
|
|
958
|
+
if (colid) {
|
|
959
|
+
return column.id === colid;
|
|
960
|
+
}
|
|
961
|
+
else if (field && type) {
|
|
962
|
+
return column.field === field && column.type === type;
|
|
963
|
+
}
|
|
964
|
+
else if (field) {
|
|
965
|
+
return column.field === field;
|
|
966
|
+
}
|
|
967
|
+
else if (type) {
|
|
968
|
+
return column.type === type;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
return false;
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
function handleFilterFields(exportOpts, column, includeFields, excludeFields) {
|
|
975
|
+
if (excludeFields) {
|
|
976
|
+
if (XEUtils.includes(excludeFields, column.field)) {
|
|
977
|
+
return false;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
if (includeFields) {
|
|
981
|
+
if (XEUtils.includes(includeFields, column.field)) {
|
|
982
|
+
return true;
|
|
983
|
+
}
|
|
984
|
+
return false;
|
|
985
|
+
}
|
|
986
|
+
return exportOpts.original ? column.field : defaultFilterExportColumn(column);
|
|
987
|
+
}
|
|
946
988
|
function handleExportAndPrint($xeTable, options, isPrint) {
|
|
947
989
|
const props = $xeTable;
|
|
948
990
|
const reactData = $xeTable;
|
|
@@ -972,7 +1014,7 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
972
1014
|
const modes = defOpts.modes || [];
|
|
973
1015
|
const checkMethod = customOpts.checkMethod;
|
|
974
1016
|
const exportColumns = collectColumn.slice(0);
|
|
975
|
-
const { columns } = defOpts;
|
|
1017
|
+
const { columns, excludeFields, includeFields } = defOpts;
|
|
976
1018
|
// 处理类型
|
|
977
1019
|
const typeList = types.map((value) => {
|
|
978
1020
|
return {
|
|
@@ -995,38 +1037,19 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
995
1037
|
// 默认选中
|
|
996
1038
|
XEUtils.eachTree(exportColumns, (column, index, items, path, parent) => {
|
|
997
1039
|
const isColGroup = column.children && column.children.length;
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
else {
|
|
1008
|
-
const colid = item.id || item.colId;
|
|
1009
|
-
const type = item.type;
|
|
1010
|
-
const field = item.field;
|
|
1011
|
-
if (colid) {
|
|
1012
|
-
return column.id === colid;
|
|
1013
|
-
}
|
|
1014
|
-
else if (field && type) {
|
|
1015
|
-
return column.field === field && column.type === type;
|
|
1016
|
-
}
|
|
1017
|
-
else if (field) {
|
|
1018
|
-
return column.field === field;
|
|
1019
|
-
}
|
|
1020
|
-
else if (type) {
|
|
1021
|
-
return column.type === type;
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
return false;
|
|
1025
|
-
})
|
|
1026
|
-
: column.visible;
|
|
1027
|
-
column.halfChecked = false;
|
|
1028
|
-
column.disabled = (parent && parent.disabled) || (checkMethod ? !checkMethod({ column }) : false);
|
|
1040
|
+
let isChecked = false;
|
|
1041
|
+
if (columns && columns.length) {
|
|
1042
|
+
isChecked = handleFilterColumns(defOpts, column, columns);
|
|
1043
|
+
}
|
|
1044
|
+
else if (excludeFields || includeFields) {
|
|
1045
|
+
isChecked = handleFilterFields(defOpts, column, includeFields, excludeFields);
|
|
1046
|
+
}
|
|
1047
|
+
else {
|
|
1048
|
+
isChecked = column.visible && (isColGroup || defaultFilterExportColumn(column));
|
|
1029
1049
|
}
|
|
1050
|
+
column.checked = isChecked;
|
|
1051
|
+
column.halfChecked = false;
|
|
1052
|
+
column.disabled = (parent && parent.disabled) || (checkMethod ? !checkMethod({ column }) : false);
|
|
1030
1053
|
});
|
|
1031
1054
|
// 更新条件
|
|
1032
1055
|
Object.assign(exportStore, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
|
+
import { getRefElem } from '../../src/util';
|
|
2
3
|
import { browse, hasClass, getAbsolutePos, addClass, removeClass } from '../../../ui/src/dom';
|
|
3
4
|
function getTargetOffset(target, container) {
|
|
4
5
|
let offsetTop = 0;
|
|
@@ -22,36 +23,66 @@ function getTargetOffset(target, container) {
|
|
|
22
23
|
return { offsetTop, offsetLeft };
|
|
23
24
|
}
|
|
24
25
|
function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offsetClientTop, moveRange) {
|
|
26
|
+
const props = $xeTable;
|
|
25
27
|
const reactData = $xeTable;
|
|
26
28
|
const internalData = $xeTable;
|
|
29
|
+
const { showOverflow } = props;
|
|
30
|
+
const { fullAllDataRowIdData, isResizeCellHeight } = internalData;
|
|
31
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
32
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
33
|
+
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
34
|
+
const { row } = params;
|
|
27
35
|
let countHeight = 0;
|
|
28
36
|
let rangeRows = [];
|
|
29
37
|
let moveSize = 0;
|
|
30
38
|
const isDown = moveRange > 0;
|
|
31
|
-
const { scrollYLoad
|
|
39
|
+
const { scrollYLoad } = reactData;
|
|
32
40
|
const { afterFullData } = internalData;
|
|
41
|
+
if (isDown) {
|
|
42
|
+
moveSize = offsetClientTop + moveRange;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
moveSize = (trRect.height - offsetClientTop) + Math.abs(moveRange);
|
|
46
|
+
}
|
|
33
47
|
if (scrollYLoad) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
const _rowIndex = $xeTable.getVTRowIndex(row);
|
|
49
|
+
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
50
|
+
if (!isCustomCellHeight && showOverflow) {
|
|
51
|
+
if (isDown) {
|
|
52
|
+
rangeRows = afterFullData.slice(_rowIndex, _rowIndex + Math.ceil(moveSize / defaultRowHeight));
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
rangeRows = afterFullData.slice(_rowIndex - Math.floor(moveSize / defaultRowHeight), _rowIndex + 1);
|
|
56
|
+
}
|
|
43
57
|
}
|
|
44
58
|
else {
|
|
45
|
-
|
|
59
|
+
if (isDown) {
|
|
60
|
+
for (let i = _rowIndex; i < afterFullData.length; i++) {
|
|
61
|
+
const item = afterFullData[i];
|
|
62
|
+
const rowid = $xeTable.getRowid(item);
|
|
63
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
64
|
+
countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
65
|
+
rangeRows.push(item);
|
|
66
|
+
if (countHeight > moveSize) {
|
|
67
|
+
return rangeRows;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
for (let len = _rowIndex; len >= 0; len--) {
|
|
73
|
+
const item = afterFullData[len];
|
|
74
|
+
const rowid = $xeTable.getRowid(item);
|
|
75
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
76
|
+
countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
77
|
+
rangeRows.push(item);
|
|
78
|
+
if (countHeight > moveSize) {
|
|
79
|
+
return rangeRows;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
46
83
|
}
|
|
47
84
|
}
|
|
48
85
|
else {
|
|
49
|
-
if (isDown) {
|
|
50
|
-
moveSize = evnt.clientY - trRect.y;
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
moveSize = trRect.y - evnt.clientY + trRect.height;
|
|
54
|
-
}
|
|
55
86
|
const siblingProp = isDown ? 'next' : 'previous';
|
|
56
87
|
while (targetTrElem && countHeight < moveSize) {
|
|
57
88
|
const rowNodeRest = $xeTable.getRowNode(targetTrElem);
|
|
@@ -217,15 +248,27 @@ export default {
|
|
|
217
248
|
},
|
|
218
249
|
handleCheckboxRangeEvent(evnt, params) {
|
|
219
250
|
const $xeTable = this;
|
|
251
|
+
const internalData = $xeTable;
|
|
252
|
+
const { elemStore } = internalData;
|
|
253
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
254
|
+
const leftScrollElem = getRefElem(elemStore['left-body-scroll']);
|
|
255
|
+
const rightScrollElem = getRefElem(elemStore['right-body-scroll']);
|
|
220
256
|
const { column, cell } = params;
|
|
221
257
|
if (column.type === 'checkbox') {
|
|
222
|
-
|
|
258
|
+
let bodyWrapperElem = bodyScrollElem;
|
|
259
|
+
if (leftScrollElem && column.fixed === 'left') {
|
|
260
|
+
bodyWrapperElem = leftScrollElem;
|
|
261
|
+
}
|
|
262
|
+
else if (rightScrollElem && column.fixed === 'right') {
|
|
263
|
+
bodyWrapperElem = rightScrollElem;
|
|
264
|
+
}
|
|
265
|
+
if (!bodyWrapperElem) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
const el = $xeTable.$refs.refElem;
|
|
223
269
|
const disX = evnt.clientX;
|
|
224
270
|
const disY = evnt.clientY;
|
|
225
|
-
const bodyWrapperElem = elemStore[`${column.fixed || 'main'}-body-wrapper`] || elemStore['main-body-wrapper'];
|
|
226
271
|
const checkboxRangeElem = bodyWrapperElem.querySelector('.vxe-table--checkbox-range');
|
|
227
|
-
const domMousemove = document.onmousemove;
|
|
228
|
-
const domMouseup = document.onmouseup;
|
|
229
272
|
const trElem = cell.parentNode;
|
|
230
273
|
const selectRecords = this.getCheckboxRecords();
|
|
231
274
|
let lastRangeRows = [];
|
|
@@ -331,7 +374,7 @@ export default {
|
|
|
331
374
|
}
|
|
332
375
|
}, 50);
|
|
333
376
|
};
|
|
334
|
-
addClass(
|
|
377
|
+
addClass(el, 'drag--range');
|
|
335
378
|
document.onmousemove = evnt => {
|
|
336
379
|
evnt.preventDefault();
|
|
337
380
|
evnt.stopPropagation();
|
|
@@ -359,10 +402,10 @@ export default {
|
|
|
359
402
|
};
|
|
360
403
|
document.onmouseup = (evnt) => {
|
|
361
404
|
stopMouseScroll();
|
|
362
|
-
removeClass(
|
|
405
|
+
removeClass(el, 'drag--range');
|
|
363
406
|
checkboxRangeElem.removeAttribute('style');
|
|
364
|
-
document.onmousemove =
|
|
365
|
-
document.onmouseup =
|
|
407
|
+
document.onmousemove = null;
|
|
408
|
+
document.onmouseup = null;
|
|
366
409
|
triggerEvent('end', evnt);
|
|
367
410
|
};
|
|
368
411
|
triggerEvent('start', evnt);
|
|
@@ -57,6 +57,8 @@ export default {
|
|
|
57
57
|
* 快捷菜单事件处理
|
|
58
58
|
*/
|
|
59
59
|
handleGlobalContextmenuEvent(evnt) {
|
|
60
|
+
const $xeTable = this;
|
|
61
|
+
const internalData = $xeTable;
|
|
60
62
|
const { $refs, tId, editStore, menuConfig, contextMenu, ctxMenuStore, ctxMenuOpts, mouseConfig, mouseOpts } = this;
|
|
61
63
|
const { selected } = editStore;
|
|
62
64
|
const layoutList = ['header', 'body', 'footer'];
|
|
@@ -65,7 +67,7 @@ export default {
|
|
|
65
67
|
evnt.preventDefault();
|
|
66
68
|
return;
|
|
67
69
|
}
|
|
68
|
-
if (
|
|
70
|
+
if (internalData._keyCtx) {
|
|
69
71
|
const type = 'body';
|
|
70
72
|
const params = { type, $grid: this.$xegrid, $table: this, keyboard: true, columns: this.visibleColumn.slice(0), $event: evnt };
|
|
71
73
|
// 如果开启单元格区域
|
package/es/table/src/body.js
CHANGED
|
@@ -11,10 +11,10 @@ const isVMScrollProcess = ($xeTable) => {
|
|
|
11
11
|
const tableProps = $xeTable;
|
|
12
12
|
const tableReactData = $xeTable;
|
|
13
13
|
const { delayHover } = tableProps;
|
|
14
|
-
const { lastScrollTime,
|
|
15
|
-
return !!(
|
|
14
|
+
const { lastScrollTime, isDragResize } = tableReactData;
|
|
15
|
+
return !!(isDragResize || (lastScrollTime && Date.now() < lastScrollTime + delayHover));
|
|
16
16
|
};
|
|
17
|
-
function renderLine(h, _vm, params) {
|
|
17
|
+
function renderLine(h, _vm, params, cellHeight) {
|
|
18
18
|
const $xeTable = _vm.$parent;
|
|
19
19
|
const tableProps = $xeTable;
|
|
20
20
|
const tableInternalData = $xeTable;
|
|
@@ -33,18 +33,20 @@ function renderLine(h, _vm, params) {
|
|
|
33
33
|
let prevRow = null;
|
|
34
34
|
if (rest) {
|
|
35
35
|
rLevel = rest.level;
|
|
36
|
-
prevRow = rest.items[rest.
|
|
36
|
+
prevRow = rest.items[rest.treeIndex - 1];
|
|
37
37
|
}
|
|
38
38
|
const isFirstRow = $xeTable.eqRow(afterFullData[0], row);
|
|
39
39
|
if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
|
|
40
40
|
return [
|
|
41
41
|
h('div', {
|
|
42
|
+
key: 'tl',
|
|
42
43
|
class: 'vxe-tree--line-wrapper'
|
|
43
44
|
}, [
|
|
44
45
|
h('div', {
|
|
45
46
|
class: 'vxe-tree--line',
|
|
46
47
|
style: {
|
|
47
48
|
height: `${isFirstRow ? 1 : calcTreeLine(params, prevRow)}px`,
|
|
49
|
+
bottom: `-${Math.floor(cellHeight / 2)}px`,
|
|
48
50
|
left: `${(rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize($xeTable) : 0) + 16}px`
|
|
49
51
|
}
|
|
50
52
|
})
|
|
@@ -62,8 +64,8 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
62
64
|
const tableReactData = $xeTable;
|
|
63
65
|
const tableInternalData = $xeTable;
|
|
64
66
|
const { fullAllDataRowIdData } = tableInternalData;
|
|
65
|
-
const { columnKey, height, showOverflow: allColumnOverflow, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig } = tableProps;
|
|
66
|
-
const { tableData, overflowX, currentColumn, scrollXLoad, scrollYLoad,
|
|
67
|
+
const { columnKey, height, showOverflow: allColumnOverflow, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
68
|
+
const { tableData, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
67
69
|
const { afterFullData, scrollXStore, scrollYStore } = tableInternalData;
|
|
68
70
|
const cellOpts = $xeTable.computeCellOpts;
|
|
69
71
|
const validOpts = $xeTable.computeValidOpts;
|
|
@@ -73,15 +75,16 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
73
75
|
const rowOpts = $xeTable.computeRowOpts;
|
|
74
76
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
75
77
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
78
|
+
const currCellHeight = cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
76
79
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = rowDragOpts;
|
|
77
80
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
78
81
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
79
82
|
const areaOpts = $xeTable.computeAreaOpts;
|
|
80
83
|
const { selectCellToRow } = areaOpts;
|
|
81
|
-
const { type, cellRender, editRender, align, showOverflow, className, treeNode, slots } = column;
|
|
84
|
+
const { type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, slots } = column;
|
|
82
85
|
const { verticalAlign } = cellOpts;
|
|
83
86
|
const { actived } = editStore;
|
|
84
|
-
const
|
|
87
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
85
88
|
const colid = column.id;
|
|
86
89
|
const renderOpts = editRender || cellRender;
|
|
87
90
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
@@ -91,21 +94,22 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
91
94
|
const columnIndex = $xeTable.getColumnIndex(column);
|
|
92
95
|
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
93
96
|
const isEdit = isEnableConf(editRender);
|
|
97
|
+
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
94
98
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
99
|
+
const isPadding = allPadding === null ? cellOpts.padding : allPadding;
|
|
95
100
|
const cellOverflow = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? allColumnOverflow : showOverflow;
|
|
96
101
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
97
102
|
const showTitle = cellOverflow === 'title';
|
|
98
103
|
const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
99
104
|
// 如果表格加上 showOverflow 则不再支持列单独设置
|
|
100
|
-
const hasEllipsis = allColumnOverflow || showTitle || showTooltip || showEllipsis;
|
|
105
|
+
const hasEllipsis = allColumnOverflow || showTitle || showTooltip || showEllipsis || resizeHeight > 0;
|
|
101
106
|
let isDirty;
|
|
102
107
|
const tdOns = {};
|
|
103
|
-
const rest = fullAllDataRowIdData[rowid];
|
|
104
108
|
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
105
109
|
const errorValidItem = validErrorMaps[`${rowid}:${colid}`];
|
|
106
110
|
const showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? (height || tableData.length > 1) : validOpts.message === 'inline');
|
|
107
|
-
const
|
|
108
|
-
const
|
|
111
|
+
const tdAttrs = { colid };
|
|
112
|
+
const cellParams = {
|
|
109
113
|
$table: $xeTable,
|
|
110
114
|
$grid: $xeTable.xegrid,
|
|
111
115
|
isEdit: false,
|
|
@@ -133,7 +137,7 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
133
137
|
isRowDragCell = rowDragOpts.trigger === 'row' || (column.dragSort && rowDragOpts.trigger === 'cell');
|
|
134
138
|
}
|
|
135
139
|
if (isRowDragCell) {
|
|
136
|
-
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(
|
|
140
|
+
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
137
141
|
}
|
|
138
142
|
// hover 进入事件
|
|
139
143
|
if (showTitle || showTooltip || showAllTip || tooltipConfig) {
|
|
@@ -146,9 +150,9 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
146
150
|
}
|
|
147
151
|
else if (showTooltip || showAllTip) {
|
|
148
152
|
// 如果配置了显示 tooltip
|
|
149
|
-
$xeTable.triggerBodyTooltipEvent(evnt,
|
|
153
|
+
$xeTable.triggerBodyTooltipEvent(evnt, cellParams);
|
|
150
154
|
}
|
|
151
|
-
$xeTable.dispatchEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget },
|
|
155
|
+
$xeTable.dispatchEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
152
156
|
};
|
|
153
157
|
}
|
|
154
158
|
// hover 退出事件
|
|
@@ -160,13 +164,13 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
160
164
|
if (showTooltip || showAllTip) {
|
|
161
165
|
$xeTable.handleTargetLeaveEvent(evnt);
|
|
162
166
|
}
|
|
163
|
-
$xeTable.dispatchEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget },
|
|
167
|
+
$xeTable.dispatchEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
164
168
|
};
|
|
165
169
|
}
|
|
166
170
|
// 按下事件处理
|
|
167
171
|
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
168
172
|
tdOns.mousedown = (evnt) => {
|
|
169
|
-
$xeTable.triggerCellMousedownEvent(evnt,
|
|
173
|
+
$xeTable.triggerCellMousedownEvent(evnt, cellParams);
|
|
170
174
|
};
|
|
171
175
|
}
|
|
172
176
|
// 拖拽列事件
|
|
@@ -175,11 +179,11 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
175
179
|
}
|
|
176
180
|
// 点击事件处理
|
|
177
181
|
tdOns.click = (evnt) => {
|
|
178
|
-
$xeTable.triggerCellClickEvent(evnt,
|
|
182
|
+
$xeTable.triggerCellClickEvent(evnt, cellParams);
|
|
179
183
|
};
|
|
180
184
|
// 双击事件处理
|
|
181
185
|
tdOns.dblclick = (evnt) => {
|
|
182
|
-
$xeTable.triggerCellDblclickEvent(evnt,
|
|
186
|
+
$xeTable.triggerCellDblclickEvent(evnt, cellParams);
|
|
183
187
|
};
|
|
184
188
|
// 合并行或列
|
|
185
189
|
if (mergeList.length) {
|
|
@@ -190,29 +194,29 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
190
194
|
return null;
|
|
191
195
|
}
|
|
192
196
|
if (rowspan > 1) {
|
|
193
|
-
|
|
197
|
+
tdAttrs.rowspan = rowspan;
|
|
194
198
|
}
|
|
195
199
|
if (colspan > 1) {
|
|
196
|
-
|
|
200
|
+
tdAttrs.colspan = colspan;
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
203
|
}
|
|
200
204
|
else if (spanMethod) {
|
|
201
205
|
// 自定义合并行或列的方法
|
|
202
|
-
const { rowspan = 1, colspan = 1 } = spanMethod(
|
|
206
|
+
const { rowspan = 1, colspan = 1 } = spanMethod(cellParams) || {};
|
|
203
207
|
if (!rowspan || !colspan) {
|
|
204
208
|
return null;
|
|
205
209
|
}
|
|
206
210
|
if (rowspan > 1) {
|
|
207
|
-
|
|
211
|
+
tdAttrs.rowspan = rowspan;
|
|
208
212
|
}
|
|
209
213
|
if (colspan > 1) {
|
|
210
|
-
|
|
214
|
+
tdAttrs.colspan = colspan;
|
|
211
215
|
}
|
|
212
216
|
}
|
|
213
217
|
// 如果被合并不可隐藏
|
|
214
218
|
if (fixedHiddenColumn && mergeList) {
|
|
215
|
-
if (
|
|
219
|
+
if (tdAttrs.colspan > 1 || tdAttrs.rowspan > 1) {
|
|
216
220
|
fixedHiddenColumn = false;
|
|
217
221
|
}
|
|
218
222
|
}
|
|
@@ -220,39 +224,77 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
220
224
|
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
221
225
|
isDirty = $xeTable.isUpdateByRow(row, column.field);
|
|
222
226
|
}
|
|
227
|
+
const isVNAutoHeight = scrollYLoad && !hasEllipsis;
|
|
228
|
+
let cellHeight = currCellHeight;
|
|
229
|
+
const vnHeight = calcCellHeightFlag ? rowRest.height : 0;
|
|
230
|
+
if (resizeHeight) {
|
|
231
|
+
cellHeight = resizeHeight;
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
if (scrollYLoad) {
|
|
235
|
+
if (!hasEllipsis) {
|
|
236
|
+
cellHeight = vnHeight || currCellHeight;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
const isLastColumn = $columnIndex === columns.length - 1;
|
|
241
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
242
|
+
let isVNPreEmptyStatus = false;
|
|
243
|
+
if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
244
|
+
isVNPreEmptyStatus = true;
|
|
245
|
+
}
|
|
246
|
+
else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
247
|
+
isVNPreEmptyStatus = true;
|
|
248
|
+
}
|
|
249
|
+
const tcStyle = {};
|
|
250
|
+
if (hasEllipsis) {
|
|
251
|
+
tcStyle.height = `${cellHeight}px`;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
tcStyle.minHeight = `${cellHeight}px`;
|
|
255
|
+
}
|
|
223
256
|
const tdVNs = [];
|
|
224
257
|
if (fixedHiddenColumn && (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
225
258
|
tdVNs.push(h('div', {
|
|
259
|
+
key: 'tc',
|
|
226
260
|
class: ['vxe-cell', {
|
|
227
261
|
'c--title': showTitle,
|
|
228
262
|
'c--tooltip': showTooltip,
|
|
229
263
|
'c--ellipsis': showEllipsis
|
|
230
264
|
}],
|
|
231
|
-
style:
|
|
232
|
-
maxHeight: hasEllipsis && (customRHeight || defaultRowHeight) ? `${customRHeight || defaultRowHeight}px` : ''
|
|
233
|
-
}
|
|
265
|
+
style: tcStyle
|
|
234
266
|
}));
|
|
235
267
|
}
|
|
236
268
|
else {
|
|
237
269
|
// 渲染单元格
|
|
238
|
-
tdVNs.push(...renderLine(h, _vm,
|
|
270
|
+
tdVNs.push(...renderLine(h, _vm, cellParams, cellHeight), h('div', {
|
|
271
|
+
key: 'tc',
|
|
239
272
|
class: ['vxe-cell', {
|
|
240
273
|
'c--title': showTitle,
|
|
241
274
|
'c--tooltip': showTooltip,
|
|
242
275
|
'c--ellipsis': showEllipsis
|
|
243
276
|
}],
|
|
244
|
-
style:
|
|
245
|
-
maxHeight: hasEllipsis && (customRHeight || defaultRowHeight) ? `${customRHeight || defaultRowHeight}px` : ''
|
|
246
|
-
},
|
|
277
|
+
style: tcStyle,
|
|
247
278
|
attrs: {
|
|
248
279
|
title: showTitle ? $xeTable.getCellLabel(row, column) : null
|
|
249
280
|
}
|
|
250
|
-
},
|
|
281
|
+
}, isVNPreEmptyStatus
|
|
282
|
+
? []
|
|
283
|
+
: [
|
|
284
|
+
h('div', {
|
|
285
|
+
attrs: {
|
|
286
|
+
colid,
|
|
287
|
+
rowid
|
|
288
|
+
},
|
|
289
|
+
class: 'vxe-cell--wrapper'
|
|
290
|
+
}, column.renderCell(h, cellParams))
|
|
291
|
+
]));
|
|
251
292
|
if (showValidTip && errorValidItem) {
|
|
252
293
|
const errRule = errorValidItem.rule;
|
|
253
294
|
const validSlot = slots ? slots.valid : null;
|
|
254
|
-
const validParams = Object.assign(Object.assign(Object.assign({},
|
|
295
|
+
const validParams = Object.assign(Object.assign(Object.assign({}, cellParams), errorValidItem), { rule: errorValidItem });
|
|
255
296
|
tdVNs.push(h('div', {
|
|
297
|
+
key: 'tcv',
|
|
256
298
|
class: ['vxe-cell--valid-error-tip', getClass(validOpts.className, errorValidItem)],
|
|
257
299
|
style: errRule && errRule.maxWidth
|
|
258
300
|
? {
|
|
@@ -274,34 +316,24 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
274
316
|
]));
|
|
275
317
|
}
|
|
276
318
|
}
|
|
277
|
-
let cellHeight = '';
|
|
278
|
-
const vnHeight = isCalcCellHeight ? rest.height : 0;
|
|
279
|
-
if (hasEllipsis) {
|
|
280
|
-
if (customRHeight) {
|
|
281
|
-
cellHeight = `${customRHeight}px`;
|
|
282
|
-
}
|
|
283
|
-
else if (!isAllOverflow) {
|
|
284
|
-
cellHeight = `${vnHeight || defaultRowHeight || 18}px`;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
cellHeight = `${vnHeight || defaultRowHeight || 18}px`;
|
|
289
|
-
}
|
|
290
319
|
if (mouseConfig && mouseOpts.area && selectCellToRow) {
|
|
291
320
|
if ((!$columnIndex && selectCellToRow === true) ||
|
|
292
321
|
(selectCellToRow === column.field)) {
|
|
293
322
|
tdVNs.push(h('div', {
|
|
323
|
+
key: 'tca',
|
|
294
324
|
class: 'vxe-cell--area-status'
|
|
295
325
|
}));
|
|
296
326
|
}
|
|
297
327
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
328
|
+
if (rowResize && rowOpts.resizable) {
|
|
329
|
+
tdVNs.push(h('div', {
|
|
330
|
+
key: 'tcr',
|
|
331
|
+
class: 'vxe-cell--row-resizable',
|
|
332
|
+
on: {
|
|
333
|
+
mousedown: (evnt) => $xeTable.handleRowResizeMousedownEvent(evnt, cellParams),
|
|
334
|
+
dblclick: (evnt) => $xeTable.handleRowResizeDblclickEvent(evnt, cellParams)
|
|
335
|
+
}
|
|
336
|
+
}));
|
|
305
337
|
}
|
|
306
338
|
return h('td', {
|
|
307
339
|
class: [
|
|
@@ -311,12 +343,14 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
311
343
|
[`col--${cellAlign}`]: cellAlign,
|
|
312
344
|
[`col--vertical-${verticalAlign}`]: verticalAlign,
|
|
313
345
|
[`col--${type}`]: type,
|
|
314
|
-
'col--last':
|
|
346
|
+
'col--last': isLastColumn,
|
|
315
347
|
'col--tree-node': treeNode,
|
|
316
348
|
'col--edit': isEdit,
|
|
317
349
|
'col--ellipsis': hasEllipsis,
|
|
350
|
+
'col--auto-height': isVNAutoHeight,
|
|
318
351
|
'fixed--width': !isAutoCellWidth,
|
|
319
352
|
'fixed--hidden': fixedHiddenColumn,
|
|
353
|
+
'is--padding': isPadding,
|
|
320
354
|
'is--drag-cell': isRowDragCell && (isCrossDrag || isPeerDrag || !rowLevel),
|
|
321
355
|
'is--drag-disabled': isDisabledDrag,
|
|
322
356
|
'col--dirty': isDirty,
|
|
@@ -324,17 +358,15 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
324
358
|
'col--valid-error': !!errorValidItem,
|
|
325
359
|
'col--current': currentColumn === column
|
|
326
360
|
},
|
|
327
|
-
getClass(compCellClassName,
|
|
328
|
-
getClass(className,
|
|
329
|
-
getClass(allCellClassName,
|
|
361
|
+
getClass(compCellClassName, cellParams),
|
|
362
|
+
getClass(className, cellParams),
|
|
363
|
+
getClass(allCellClassName, cellParams)
|
|
330
364
|
],
|
|
331
365
|
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? column.id : $columnIndex,
|
|
332
|
-
attrs,
|
|
333
|
-
style: Object.assign({
|
|
334
|
-
height: cellHeight
|
|
335
|
-
}, XEUtils.isFunction(compCellStyle) ? compCellStyle(params) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(params) : cellStyle),
|
|
366
|
+
attrs: tdAttrs,
|
|
367
|
+
style: Object.assign({}, XEUtils.isFunction(compCellStyle) ? compCellStyle(cellParams) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(cellParams) : cellStyle),
|
|
336
368
|
on: tdOns
|
|
337
|
-
},
|
|
369
|
+
}, isOptimizeMode && fixedHiddenColumn ? [] : tdVNs);
|
|
338
370
|
}
|
|
339
371
|
function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
340
372
|
const $xeTable = _vm.$parent;
|
|
@@ -648,7 +680,7 @@ export default {
|
|
|
648
680
|
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
649
681
|
}
|
|
650
682
|
};
|
|
651
|
-
if (
|
|
683
|
+
if (leftFixedWidth || rightFixedWidth) {
|
|
652
684
|
ons.wheel = $xeTable.triggerBodyWheelEvent;
|
|
653
685
|
}
|
|
654
686
|
return h('div', {
|
package/es/table/src/cell.js
CHANGED
|
@@ -156,7 +156,7 @@ function renderTitleContent(h, params, content) {
|
|
|
156
156
|
const ons = {};
|
|
157
157
|
if (showTitle || showTooltip || showAllTip) {
|
|
158
158
|
ons.mouseenter = (evnt) => {
|
|
159
|
-
if (tableReactData.
|
|
159
|
+
if (tableReactData.isDragResize) {
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
if (showTitle) {
|
|
@@ -169,7 +169,7 @@ function renderTitleContent(h, params, content) {
|
|
|
169
169
|
}
|
|
170
170
|
if (showTooltip || showAllTip) {
|
|
171
171
|
ons.mouseleave = (evnt) => {
|
|
172
|
-
if (tableReactData.
|
|
172
|
+
if (tableReactData.isDragResize) {
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
175
|
if (showTooltip || showAllTip) {
|
|
@@ -386,11 +386,7 @@ export const Cell = {
|
|
|
386
386
|
return Cell.renderTreeIcon(h, params, Cell.renderDefaultCell.call(this, h, params));
|
|
387
387
|
},
|
|
388
388
|
renderDefaultFooter(h, params) {
|
|
389
|
-
return
|
|
390
|
-
h('span', {
|
|
391
|
-
class: 'vxe-cell--item'
|
|
392
|
-
}, getFooterContent(h, params))
|
|
393
|
-
];
|
|
389
|
+
return getFooterContent(h, params);
|
|
394
390
|
},
|
|
395
391
|
/**
|
|
396
392
|
* 树节点
|