vxe-table 4.7.87 → 4.7.88
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/style.min.css +1 -1
- package/es/table/src/table.js +27 -8
- package/es/table/src/util.js +22 -12
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +50 -26
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/table.js +27 -14
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +25 -11
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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/src/table.ts +27 -8
- package/packages/table/src/util.ts +22 -12
- package/styles/theme/base.scss +1 -0
- /package/es/{iconfont.1728483552005.ttf → iconfont.1729047473391.ttf} +0 -0
- /package/es/{iconfont.1728483552005.woff → iconfont.1729047473391.woff} +0 -0
- /package/es/{iconfont.1728483552005.woff2 → iconfont.1729047473391.woff2} +0 -0
- /package/lib/{iconfont.1728483552005.ttf → iconfont.1729047473391.ttf} +0 -0
- /package/lib/{iconfont.1728483552005.woff → iconfont.1729047473391.woff} +0 -0
- /package/lib/{iconfont.1728483552005.woff2 → iconfont.1729047473391.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -1998,9 +1998,9 @@ function eqEmptyValue(cellValue) {
|
|
|
1998
1998
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
1999
1999
|
|
|
2000
2000
|
|
|
2001
|
-
const version = "4.7.
|
|
2001
|
+
const version = "4.7.88";
|
|
2002
2002
|
core_.VxeUI.version = version;
|
|
2003
|
-
core_.VxeUI.tableVersion = "4.7.
|
|
2003
|
+
core_.VxeUI.tableVersion = "4.7.88";
|
|
2004
2004
|
core_.VxeUI.setConfig({
|
|
2005
2005
|
emptyCell: ' ',
|
|
2006
2006
|
table: {
|
|
@@ -2384,7 +2384,7 @@ var es_array_push = __webpack_require__(4114);
|
|
|
2384
2384
|
const {
|
|
2385
2385
|
log: log_log
|
|
2386
2386
|
} = core_.VxeUI;
|
|
2387
|
-
const log_version = `table v${"4.7.
|
|
2387
|
+
const log_version = `table v${"4.7.88"}`;
|
|
2388
2388
|
const warnLog = log_log.create('warn', log_version);
|
|
2389
2389
|
const errLog = log_log.create('error', log_version);
|
|
2390
2390
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3176,31 +3176,42 @@ function colToVisible($xeTable, column) {
|
|
|
3176
3176
|
refTableBody
|
|
3177
3177
|
} = $xeTable.getRefMaps();
|
|
3178
3178
|
const {
|
|
3179
|
+
columnStore,
|
|
3179
3180
|
scrollXLoad
|
|
3180
3181
|
} = reactData;
|
|
3181
3182
|
const {
|
|
3182
3183
|
visibleColumn
|
|
3183
3184
|
} = internalData;
|
|
3185
|
+
const {
|
|
3186
|
+
leftList,
|
|
3187
|
+
rightList
|
|
3188
|
+
} = columnStore;
|
|
3184
3189
|
const tableBody = refTableBody.value;
|
|
3185
3190
|
const bodyElem = tableBody ? tableBody.$el : null;
|
|
3191
|
+
let offsetFixedLeft = 0;
|
|
3192
|
+
leftList.forEach(item => {
|
|
3193
|
+
offsetFixedLeft += item.renderWidth;
|
|
3194
|
+
});
|
|
3195
|
+
let offsetFixedRight = 0;
|
|
3196
|
+
rightList.forEach(item => {
|
|
3197
|
+
offsetFixedRight += item.renderWidth;
|
|
3198
|
+
});
|
|
3186
3199
|
if (bodyElem) {
|
|
3200
|
+
const bodyWidth = bodyElem.clientWidth;
|
|
3201
|
+
const bodySrcollLeft = bodyElem.scrollLeft;
|
|
3187
3202
|
const tdElem = bodyElem.querySelector(`.${column.id}`);
|
|
3188
3203
|
if (tdElem) {
|
|
3189
|
-
const bodyWidth = bodyElem.clientWidth;
|
|
3190
|
-
const bodySrcollLeft = bodyElem.scrollLeft;
|
|
3191
3204
|
const tdOffsetParent = tdElem.offsetParent;
|
|
3192
3205
|
const tdOffsetLeft = tdElem.offsetLeft + (tdOffsetParent ? tdOffsetParent.offsetLeft : 0);
|
|
3193
3206
|
const tdWidth = tdElem.clientWidth;
|
|
3194
|
-
//
|
|
3195
|
-
if (tdOffsetLeft < bodySrcollLeft
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
// 向右定位
|
|
3200
|
-
return $xeTable.scrollTo(bodySrcollLeft + tdWidth);
|
|
3207
|
+
// 检测是否在可视区中
|
|
3208
|
+
if (tdOffsetLeft < bodySrcollLeft + offsetFixedLeft) {
|
|
3209
|
+
return $xeTable.scrollTo(tdOffsetLeft - offsetFixedLeft - 1);
|
|
3210
|
+
} else if (tdOffsetLeft + tdWidth >= bodyWidth + bodySrcollLeft - offsetFixedRight) {
|
|
3211
|
+
return $xeTable.scrollTo(tdOffsetLeft - offsetFixedLeft - offsetFixedRight + 1);
|
|
3201
3212
|
}
|
|
3202
3213
|
} else {
|
|
3203
|
-
//
|
|
3214
|
+
// 检测是否在虚拟渲染可视区中
|
|
3204
3215
|
if (scrollXLoad) {
|
|
3205
3216
|
let scrollLeft = 0;
|
|
3206
3217
|
for (let index = 0; index < visibleColumn.length; index++) {
|
|
@@ -3210,7 +3221,10 @@ function colToVisible($xeTable, column) {
|
|
|
3210
3221
|
}
|
|
3211
3222
|
scrollLeft += currCol.renderWidth;
|
|
3212
3223
|
}
|
|
3213
|
-
|
|
3224
|
+
if (scrollLeft < bodySrcollLeft) {
|
|
3225
|
+
return $xeTable.scrollTo(scrollLeft - offsetFixedLeft - 1);
|
|
3226
|
+
}
|
|
3227
|
+
return $xeTable.scrollTo(scrollLeft - offsetFixedLeft - offsetFixedRight + 1);
|
|
3214
3228
|
}
|
|
3215
3229
|
}
|
|
3216
3230
|
}
|
|
@@ -9210,7 +9224,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9210
9224
|
visibleSize: 8
|
|
9211
9225
|
};
|
|
9212
9226
|
};
|
|
9213
|
-
const
|
|
9227
|
+
const calculateMergerOffsetIndex = (list, offsetItem, type) => {
|
|
9214
9228
|
for (let mcIndex = 0, len = list.length; mcIndex < len; mcIndex++) {
|
|
9215
9229
|
const mergeItem = list[mcIndex];
|
|
9216
9230
|
const {
|
|
@@ -9593,7 +9607,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9593
9607
|
});
|
|
9594
9608
|
} else {
|
|
9595
9609
|
const labelEl = cellEl.firstChild;
|
|
9596
|
-
|
|
9610
|
+
if (labelEl) {
|
|
9611
|
+
titleWidth = labelEl.offsetWidth;
|
|
9612
|
+
}
|
|
9597
9613
|
}
|
|
9598
9614
|
if (titleWidth) {
|
|
9599
9615
|
colWidth = Math.max(colWidth, Math.ceil(titleWidth) + 4);
|
|
@@ -9873,6 +9889,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9873
9889
|
treeExpandedMaps
|
|
9874
9890
|
} = reactData;
|
|
9875
9891
|
const treeOpts = computeTreeOpts.value;
|
|
9892
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
9876
9893
|
if (treeConfig && treeOpts.transform) {
|
|
9877
9894
|
const fullData = [];
|
|
9878
9895
|
const expandMaps = {};
|
|
@@ -9884,7 +9901,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9884
9901
|
fullData.push(row);
|
|
9885
9902
|
}
|
|
9886
9903
|
}, {
|
|
9887
|
-
children:
|
|
9904
|
+
children: childrenField
|
|
9888
9905
|
});
|
|
9889
9906
|
internalData.afterFullData = fullData;
|
|
9890
9907
|
updateScrollYStatus(fullData);
|
|
@@ -9908,6 +9925,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9908
9925
|
const filterOpts = computeFilterOpts.value;
|
|
9909
9926
|
const sortOpts = computeSortOpts.value;
|
|
9910
9927
|
const treeOpts = computeTreeOpts.value;
|
|
9928
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
9911
9929
|
const {
|
|
9912
9930
|
transform
|
|
9913
9931
|
} = treeOpts;
|
|
@@ -10023,8 +10041,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
10023
10041
|
if (treeConfig && transform) {
|
|
10024
10042
|
// 筛选虚拟树
|
|
10025
10043
|
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData, handleFilter, {
|
|
10026
|
-
|
|
10027
|
-
|
|
10044
|
+
original: true,
|
|
10045
|
+
isEvery: true,
|
|
10046
|
+
children: treeOpts.mapChildrenField,
|
|
10047
|
+
mapChildren: childrenField
|
|
10028
10048
|
});
|
|
10029
10049
|
tableData = tableTree;
|
|
10030
10050
|
} else {
|
|
@@ -10035,8 +10055,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
10035
10055
|
if (treeConfig && transform) {
|
|
10036
10056
|
// 还原虚拟树
|
|
10037
10057
|
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData, () => true, {
|
|
10038
|
-
|
|
10039
|
-
|
|
10058
|
+
original: true,
|
|
10059
|
+
isEvery: true,
|
|
10060
|
+
children: treeOpts.mapChildrenField,
|
|
10061
|
+
mapChildren: childrenField
|
|
10040
10062
|
});
|
|
10041
10063
|
tableData = tableTree;
|
|
10042
10064
|
} else {
|
|
@@ -10084,8 +10106,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
10084
10106
|
if (treeConfig && transform) {
|
|
10085
10107
|
// 还原虚拟树
|
|
10086
10108
|
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData, () => true, {
|
|
10087
|
-
|
|
10088
|
-
|
|
10109
|
+
original: true,
|
|
10110
|
+
isEvery: true,
|
|
10111
|
+
children: treeOpts.mapChildrenField,
|
|
10112
|
+
mapChildren: childrenField
|
|
10089
10113
|
});
|
|
10090
10114
|
tableData = tableTree;
|
|
10091
10115
|
} else {
|
|
@@ -11185,7 +11209,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11185
11209
|
startIndex: Math.max(0, toVisibleIndex - 1 - offsetSize),
|
|
11186
11210
|
endIndex: toVisibleIndex + visibleSize + offsetSize
|
|
11187
11211
|
};
|
|
11188
|
-
|
|
11212
|
+
calculateMergerOffsetIndex(mergeList.concat(mergeFooterList), offsetItem, 'col');
|
|
11189
11213
|
const {
|
|
11190
11214
|
startIndex: offsetStartIndex,
|
|
11191
11215
|
endIndex: offsetEndIndex
|
|
@@ -11521,7 +11545,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11521
11545
|
startIndex: Math.max(0, toVisibleIndex - 1 - offsetSize),
|
|
11522
11546
|
endIndex: toVisibleIndex + visibleSize + offsetSize
|
|
11523
11547
|
};
|
|
11524
|
-
|
|
11548
|
+
calculateMergerOffsetIndex(mergeList, offsetItem, 'row');
|
|
11525
11549
|
const {
|
|
11526
11550
|
startIndex: offsetStartIndex,
|
|
11527
11551
|
endIndex: offsetEndIndex
|
|
@@ -25430,7 +25454,7 @@ core_.VxeUI.setTheme('light');
|
|
|
25430
25454
|
;// CONCATENATED MODULE: ./index.ts
|
|
25431
25455
|
|
|
25432
25456
|
|
|
25433
|
-
if (typeof window !== 'undefined' && window.
|
|
25457
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
25434
25458
|
if (!window.VxeUITable) {
|
|
25435
25459
|
window.VxeUITable = components_namespaceObject;
|
|
25436
25460
|
}
|