vxe-table 4.7.87 → 4.7.90
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 +29 -10
- package/es/table/src/util.js +24 -13
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +54 -29
- 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 +29 -16
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +27 -12
- 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 +29 -10
- package/packages/table/src/util.ts +24 -13
- package/styles/theme/base.scss +1 -0
- /package/es/{iconfont.1728483552005.ttf → iconfont.1729062364672.ttf} +0 -0
- /package/es/{iconfont.1728483552005.woff → iconfont.1729062364672.woff} +0 -0
- /package/es/{iconfont.1728483552005.woff2 → iconfont.1729062364672.woff2} +0 -0
- /package/lib/{iconfont.1728483552005.ttf → iconfont.1729062364672.ttf} +0 -0
- /package/lib/{iconfont.1728483552005.woff → iconfont.1729062364672.woff} +0 -0
- /package/lib/{iconfont.1728483552005.woff2 → iconfont.1729062364672.woff2} +0 -0
package/es/ui/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
import { getFuncText } from './src/utils';
|
|
3
|
-
export const version = "4.7.
|
|
3
|
+
export const version = "4.7.90";
|
|
4
4
|
VxeUI.version = version;
|
|
5
|
-
VxeUI.tableVersion = "4.7.
|
|
5
|
+
VxeUI.tableVersion = "4.7.90";
|
|
6
6
|
VxeUI.setConfig({
|
|
7
7
|
emptyCell: ' ',
|
|
8
8
|
table: {
|
package/es/ui/src/log.js
CHANGED
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.90";
|
|
2002
2002
|
core_.VxeUI.version = version;
|
|
2003
|
-
core_.VxeUI.tableVersion = "4.7.
|
|
2003
|
+
core_.VxeUI.tableVersion = "4.7.90";
|
|
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.90"}`;
|
|
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,33 +3176,45 @@ 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
|
-
const
|
|
3194
|
-
//
|
|
3195
|
-
if (tdOffsetLeft < bodySrcollLeft
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
// 向右定位
|
|
3200
|
-
return $xeTable.scrollTo(bodySrcollLeft + tdWidth);
|
|
3206
|
+
const cellWidth = tdElem.clientWidth;
|
|
3207
|
+
// 检测是否在可视区中
|
|
3208
|
+
if (tdOffsetLeft < bodySrcollLeft + offsetFixedLeft) {
|
|
3209
|
+
return $xeTable.scrollTo(tdOffsetLeft - offsetFixedLeft - 1);
|
|
3210
|
+
} else if (tdOffsetLeft + cellWidth - bodySrcollLeft > bodyWidth - offsetFixedRight) {
|
|
3211
|
+
return $xeTable.scrollTo(tdOffsetLeft + cellWidth - (bodyWidth - offsetFixedRight - 1));
|
|
3201
3212
|
}
|
|
3202
3213
|
} else {
|
|
3203
|
-
//
|
|
3214
|
+
// 检测是否在虚拟渲染可视区中
|
|
3204
3215
|
if (scrollXLoad) {
|
|
3205
3216
|
let scrollLeft = 0;
|
|
3217
|
+
const cellWidth = column.renderWidth;
|
|
3206
3218
|
for (let index = 0; index < visibleColumn.length; index++) {
|
|
3207
3219
|
const currCol = visibleColumn[index];
|
|
3208
3220
|
if (currCol === column || currCol.id === column.id) {
|
|
@@ -3210,7 +3222,10 @@ function colToVisible($xeTable, column) {
|
|
|
3210
3222
|
}
|
|
3211
3223
|
scrollLeft += currCol.renderWidth;
|
|
3212
3224
|
}
|
|
3213
|
-
|
|
3225
|
+
if (scrollLeft < bodySrcollLeft) {
|
|
3226
|
+
return $xeTable.scrollTo(scrollLeft - offsetFixedLeft - 1);
|
|
3227
|
+
}
|
|
3228
|
+
return $xeTable.scrollTo(scrollLeft + cellWidth - (bodyWidth - offsetFixedRight - 1));
|
|
3214
3229
|
}
|
|
3215
3230
|
}
|
|
3216
3231
|
}
|
|
@@ -9210,7 +9225,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9210
9225
|
visibleSize: 8
|
|
9211
9226
|
};
|
|
9212
9227
|
};
|
|
9213
|
-
const
|
|
9228
|
+
const calculateMergerOffsetIndex = (list, offsetItem, type) => {
|
|
9214
9229
|
for (let mcIndex = 0, len = list.length; mcIndex < len; mcIndex++) {
|
|
9215
9230
|
const mergeItem = list[mcIndex];
|
|
9216
9231
|
const {
|
|
@@ -9593,7 +9608,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9593
9608
|
});
|
|
9594
9609
|
} else {
|
|
9595
9610
|
const labelEl = cellEl.firstChild;
|
|
9596
|
-
|
|
9611
|
+
if (labelEl) {
|
|
9612
|
+
titleWidth = labelEl.offsetWidth;
|
|
9613
|
+
}
|
|
9597
9614
|
}
|
|
9598
9615
|
if (titleWidth) {
|
|
9599
9616
|
colWidth = Math.max(colWidth, Math.ceil(titleWidth) + 4);
|
|
@@ -9873,6 +9890,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9873
9890
|
treeExpandedMaps
|
|
9874
9891
|
} = reactData;
|
|
9875
9892
|
const treeOpts = computeTreeOpts.value;
|
|
9893
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
9876
9894
|
if (treeConfig && treeOpts.transform) {
|
|
9877
9895
|
const fullData = [];
|
|
9878
9896
|
const expandMaps = {};
|
|
@@ -9884,7 +9902,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9884
9902
|
fullData.push(row);
|
|
9885
9903
|
}
|
|
9886
9904
|
}, {
|
|
9887
|
-
children:
|
|
9905
|
+
children: childrenField
|
|
9888
9906
|
});
|
|
9889
9907
|
internalData.afterFullData = fullData;
|
|
9890
9908
|
updateScrollYStatus(fullData);
|
|
@@ -9908,6 +9926,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9908
9926
|
const filterOpts = computeFilterOpts.value;
|
|
9909
9927
|
const sortOpts = computeSortOpts.value;
|
|
9910
9928
|
const treeOpts = computeTreeOpts.value;
|
|
9929
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
9911
9930
|
const {
|
|
9912
9931
|
transform
|
|
9913
9932
|
} = treeOpts;
|
|
@@ -10023,8 +10042,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
10023
10042
|
if (treeConfig && transform) {
|
|
10024
10043
|
// 筛选虚拟树
|
|
10025
10044
|
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData, handleFilter, {
|
|
10026
|
-
|
|
10027
|
-
|
|
10045
|
+
original: true,
|
|
10046
|
+
isEvery: true,
|
|
10047
|
+
children: treeOpts.mapChildrenField,
|
|
10048
|
+
mapChildren: childrenField
|
|
10028
10049
|
});
|
|
10029
10050
|
tableData = tableTree;
|
|
10030
10051
|
} else {
|
|
@@ -10035,8 +10056,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
10035
10056
|
if (treeConfig && transform) {
|
|
10036
10057
|
// 还原虚拟树
|
|
10037
10058
|
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData, () => true, {
|
|
10038
|
-
|
|
10039
|
-
|
|
10059
|
+
original: true,
|
|
10060
|
+
isEvery: true,
|
|
10061
|
+
children: treeOpts.mapChildrenField,
|
|
10062
|
+
mapChildren: childrenField
|
|
10040
10063
|
});
|
|
10041
10064
|
tableData = tableTree;
|
|
10042
10065
|
} else {
|
|
@@ -10084,8 +10107,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
10084
10107
|
if (treeConfig && transform) {
|
|
10085
10108
|
// 还原虚拟树
|
|
10086
10109
|
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData, () => true, {
|
|
10087
|
-
|
|
10088
|
-
|
|
10110
|
+
original: true,
|
|
10111
|
+
isEvery: true,
|
|
10112
|
+
children: treeOpts.mapChildrenField,
|
|
10113
|
+
mapChildren: childrenField
|
|
10089
10114
|
});
|
|
10090
10115
|
tableData = tableTree;
|
|
10091
10116
|
} else {
|
|
@@ -11185,7 +11210,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11185
11210
|
startIndex: Math.max(0, toVisibleIndex - 1 - offsetSize),
|
|
11186
11211
|
endIndex: toVisibleIndex + visibleSize + offsetSize
|
|
11187
11212
|
};
|
|
11188
|
-
|
|
11213
|
+
calculateMergerOffsetIndex(mergeList.concat(mergeFooterList), offsetItem, 'col');
|
|
11189
11214
|
const {
|
|
11190
11215
|
startIndex: offsetStartIndex,
|
|
11191
11216
|
endIndex: offsetEndIndex
|
|
@@ -11521,7 +11546,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11521
11546
|
startIndex: Math.max(0, toVisibleIndex - 1 - offsetSize),
|
|
11522
11547
|
endIndex: toVisibleIndex + visibleSize + offsetSize
|
|
11523
11548
|
};
|
|
11524
|
-
|
|
11549
|
+
calculateMergerOffsetIndex(mergeList, offsetItem, 'row');
|
|
11525
11550
|
const {
|
|
11526
11551
|
startIndex: offsetStartIndex,
|
|
11527
11552
|
endIndex: offsetEndIndex
|
|
@@ -14983,7 +15008,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14983
15008
|
const {
|
|
14984
15009
|
selectCheckboxMaps
|
|
14985
15010
|
} = reactData;
|
|
14986
|
-
const selectRowMaps = Object.assign({}, selectCheckboxMaps);
|
|
14987
15011
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
14988
15012
|
const {
|
|
14989
15013
|
checkField,
|
|
@@ -15015,6 +15039,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
15015
15039
|
}, value, isForce);
|
|
15016
15040
|
});
|
|
15017
15041
|
} else {
|
|
15042
|
+
const selectRowMaps = Object.assign({}, selectCheckboxMaps);
|
|
15018
15043
|
rows.forEach(row => {
|
|
15019
15044
|
const rowid = getRowid($xeTable, row);
|
|
15020
15045
|
if (isForce || !checkMethod || checkMethod({
|
|
@@ -15032,9 +15057,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
15032
15057
|
handleCheckboxReserveRow(row, value);
|
|
15033
15058
|
}
|
|
15034
15059
|
});
|
|
15060
|
+
reactData.selectCheckboxMaps = selectRowMaps;
|
|
15035
15061
|
}
|
|
15036
15062
|
}
|
|
15037
|
-
reactData.selectCheckboxMaps = selectRowMaps;
|
|
15038
15063
|
},
|
|
15039
15064
|
/**
|
|
15040
15065
|
* 单行
|
|
@@ -25430,7 +25455,7 @@ core_.VxeUI.setTheme('light');
|
|
|
25430
25455
|
;// CONCATENATED MODULE: ./index.ts
|
|
25431
25456
|
|
|
25432
25457
|
|
|
25433
|
-
if (typeof window !== 'undefined' && window.
|
|
25458
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
25434
25459
|
if (!window.VxeUITable) {
|
|
25435
25460
|
window.VxeUITable = components_namespaceObject;
|
|
25436
25461
|
}
|