vxe-table 4.10.1-beta.0 → 4.10.1-beta.2
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/src/body.js +9 -6
- package/es/table/src/table.js +35 -9
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +44 -17
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +7 -5
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +35 -10
- 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/src/body.ts +7 -5
- package/packages/table/src/table.ts +36 -9
- /package/es/{iconfont.1735796333193.ttf → iconfont.1735882021616.ttf} +0 -0
- /package/es/{iconfont.1735796333193.woff → iconfont.1735882021616.woff} +0 -0
- /package/es/{iconfont.1735796333193.woff2 → iconfont.1735882021616.woff2} +0 -0
- /package/lib/{iconfont.1735796333193.ttf → iconfont.1735882021616.ttf} +0 -0
- /package/lib/{iconfont.1735796333193.woff → iconfont.1735882021616.woff} +0 -0
- /package/lib/{iconfont.1735796333193.woff2 → iconfont.1735882021616.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -1322,12 +1322,25 @@ export default defineComponent({
|
|
|
1322
1322
|
tablePrivateMethods.checkScrolling();
|
|
1323
1323
|
}
|
|
1324
1324
|
};
|
|
1325
|
+
// const updateCellOffset = () => {
|
|
1326
|
+
// const { chTimeout, chRunTime } = internalData
|
|
1327
|
+
// if (chTimeout) {
|
|
1328
|
+
// clearTimeout(chTimeout)
|
|
1329
|
+
// }
|
|
1330
|
+
// if (!chRunTime || chRunTime + 10 < Date.now()) {
|
|
1331
|
+
// internalData.chRunTime = Date.now()
|
|
1332
|
+
// }
|
|
1333
|
+
// internalData.chTimeout = setTimeout(() => {
|
|
1334
|
+
// internalData.chRunTime = undefined
|
|
1335
|
+
// internalData.chTimeout = undefined
|
|
1336
|
+
// }, 80)
|
|
1337
|
+
// }
|
|
1325
1338
|
const calcCellHeight = () => {
|
|
1326
1339
|
const { showOverflow } = props;
|
|
1327
|
-
const { tableData, scrollXLoad
|
|
1340
|
+
const { tableData, scrollXLoad } = reactData;
|
|
1328
1341
|
const { fullAllDataRowIdData } = internalData;
|
|
1329
1342
|
const el = refElem.value;
|
|
1330
|
-
if (!showOverflow &&
|
|
1343
|
+
if (!showOverflow && el) {
|
|
1331
1344
|
let paddingTop = 0;
|
|
1332
1345
|
let paddingBottom = 0;
|
|
1333
1346
|
let calcPadding = false;
|
|
@@ -1358,6 +1371,7 @@ export default defineComponent({
|
|
|
1358
1371
|
}
|
|
1359
1372
|
});
|
|
1360
1373
|
}
|
|
1374
|
+
// updateCellOffset()
|
|
1361
1375
|
};
|
|
1362
1376
|
const getOrderField = (column) => {
|
|
1363
1377
|
const { sortBy, sortType } = column;
|
|
@@ -2371,7 +2385,9 @@ export default defineComponent({
|
|
|
2371
2385
|
scrollXStore.offsetSize = offsetXSize;
|
|
2372
2386
|
scrollXStore.visibleSize = visibleXSize;
|
|
2373
2387
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
|
|
2374
|
-
tablePrivateMethods.updateScrollXData()
|
|
2388
|
+
tablePrivateMethods.updateScrollXData().then(() => {
|
|
2389
|
+
loadScrollXData();
|
|
2390
|
+
});
|
|
2375
2391
|
}
|
|
2376
2392
|
else {
|
|
2377
2393
|
tablePrivateMethods.updateScrollXSpace();
|
|
@@ -2387,7 +2403,9 @@ export default defineComponent({
|
|
|
2387
2403
|
scrollYStore.offsetSize = offsetYSize;
|
|
2388
2404
|
scrollYStore.visibleSize = visibleYSize;
|
|
2389
2405
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
2390
|
-
tablePrivateMethods.updateScrollYData()
|
|
2406
|
+
tablePrivateMethods.updateScrollYData().then(() => {
|
|
2407
|
+
loadScrollYData();
|
|
2408
|
+
});
|
|
2391
2409
|
}
|
|
2392
2410
|
else {
|
|
2393
2411
|
tablePrivateMethods.updateScrollYSpace();
|
|
@@ -2397,7 +2415,7 @@ export default defineComponent({
|
|
|
2397
2415
|
};
|
|
2398
2416
|
const handleRecalculateLayout = (reFull) => {
|
|
2399
2417
|
const el = refElem.value;
|
|
2400
|
-
internalData.
|
|
2418
|
+
internalData.rceRunTime = Date.now();
|
|
2401
2419
|
if (!el || !el.clientWidth) {
|
|
2402
2420
|
return nextTick();
|
|
2403
2421
|
}
|
|
@@ -3070,10 +3088,14 @@ export default defineComponent({
|
|
|
3070
3088
|
internalData.inFooterScroll = false;
|
|
3071
3089
|
internalData.bodyScrollType = '';
|
|
3072
3090
|
if (isRollX && scrollXLoad) {
|
|
3073
|
-
tablePrivateMethods.updateScrollXData()
|
|
3091
|
+
tablePrivateMethods.updateScrollXData().then(() => {
|
|
3092
|
+
loadScrollXData();
|
|
3093
|
+
});
|
|
3074
3094
|
}
|
|
3075
3095
|
if (isRollY && scrollYLoad) {
|
|
3076
|
-
tablePrivateMethods.updateScrollYData()
|
|
3096
|
+
tablePrivateMethods.updateScrollYData().then(() => {
|
|
3097
|
+
loadScrollYData();
|
|
3098
|
+
});
|
|
3077
3099
|
}
|
|
3078
3100
|
tableMethods.updateCellAreas();
|
|
3079
3101
|
}, 200);
|
|
@@ -3999,7 +4021,7 @@ export default defineComponent({
|
|
|
3999
4021
|
*/
|
|
4000
4022
|
recalculate(reFull) {
|
|
4001
4023
|
return new Promise(resolve => {
|
|
4002
|
-
const { rceTimeout,
|
|
4024
|
+
const { rceTimeout, rceRunTime } = internalData;
|
|
4003
4025
|
const resizeOpts = computeResizeOpts.value;
|
|
4004
4026
|
const refreshDelay = resizeOpts.refreshDelay || 20;
|
|
4005
4027
|
const el = refElem.value;
|
|
@@ -4008,7 +4030,7 @@ export default defineComponent({
|
|
|
4008
4030
|
}
|
|
4009
4031
|
if (rceTimeout) {
|
|
4010
4032
|
clearTimeout(rceTimeout);
|
|
4011
|
-
if (
|
|
4033
|
+
if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
|
|
4012
4034
|
resolve(handleRecalculateLayout(!!reFull));
|
|
4013
4035
|
}
|
|
4014
4036
|
else {
|
|
@@ -6412,6 +6434,10 @@ export default defineComponent({
|
|
|
6412
6434
|
const isCustomVisible = isAllCustom || storageOpts.visible;
|
|
6413
6435
|
const isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
6414
6436
|
const isCustomSort = isAllCustom || storageOpts.sort;
|
|
6437
|
+
if (type !== 'reset') {
|
|
6438
|
+
// fix:修复拖动列宽,重置按钮无法点击的问题
|
|
6439
|
+
reactData.isCustomStatus = true;
|
|
6440
|
+
}
|
|
6415
6441
|
if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
6416
6442
|
if (!tableId) {
|
|
6417
6443
|
errLog('vxe.error.reqProp', ['id']);
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.10.1-beta.
|
|
3141
|
+
const version = "4.10.1-beta.2";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3558,7 +3558,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3558
3558
|
const {
|
|
3559
3559
|
log: log_log
|
|
3560
3560
|
} = core_.VxeUI;
|
|
3561
|
-
const log_version = `table v${"4.10.1-beta.
|
|
3561
|
+
const log_version = `table v${"4.10.1-beta.2"}`;
|
|
3562
3562
|
const warnLog = log_log.create('warn', log_version);
|
|
3563
3563
|
const errLog = log_log.create('error', log_version);
|
|
3564
3564
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -6421,12 +6421,14 @@ const lineOffsetSizes = {
|
|
|
6421
6421
|
}
|
|
6422
6422
|
}
|
|
6423
6423
|
let cellHeight = '';
|
|
6424
|
-
if (hasEllipsis
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
if (!
|
|
6428
|
-
cellHeight = `${rest.height ||
|
|
6424
|
+
if (hasEllipsis) {
|
|
6425
|
+
if (scrollYRHeight || rowHeight) {
|
|
6426
|
+
cellHeight = `${scrollYRHeight || rowHeight}px`;
|
|
6427
|
+
} else if (!isAllOverflow) {
|
|
6428
|
+
cellHeight = `${rest.height || 18}px`;
|
|
6429
6429
|
}
|
|
6430
|
+
} else {
|
|
6431
|
+
cellHeight = `${rest.height || 18}px`;
|
|
6430
6432
|
}
|
|
6431
6433
|
if (mouseConfig && mouseOpts.area && selectCellToRow) {
|
|
6432
6434
|
if (!$columnIndex && selectCellToRow === true || selectCellToRow === column.field) {
|
|
@@ -11858,20 +11860,32 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11858
11860
|
tablePrivateMethods.checkScrolling();
|
|
11859
11861
|
}
|
|
11860
11862
|
};
|
|
11863
|
+
// const updateCellOffset = () => {
|
|
11864
|
+
// const { chTimeout, chRunTime } = internalData
|
|
11865
|
+
// if (chTimeout) {
|
|
11866
|
+
// clearTimeout(chTimeout)
|
|
11867
|
+
// }
|
|
11868
|
+
// if (!chRunTime || chRunTime + 10 < Date.now()) {
|
|
11869
|
+
// internalData.chRunTime = Date.now()
|
|
11870
|
+
// }
|
|
11871
|
+
// internalData.chTimeout = setTimeout(() => {
|
|
11872
|
+
// internalData.chRunTime = undefined
|
|
11873
|
+
// internalData.chTimeout = undefined
|
|
11874
|
+
// }, 80)
|
|
11875
|
+
// }
|
|
11861
11876
|
const calcCellHeight = () => {
|
|
11862
11877
|
const {
|
|
11863
11878
|
showOverflow
|
|
11864
11879
|
} = props;
|
|
11865
11880
|
const {
|
|
11866
11881
|
tableData,
|
|
11867
|
-
scrollXLoad
|
|
11868
|
-
scrollYLoad
|
|
11882
|
+
scrollXLoad
|
|
11869
11883
|
} = reactData;
|
|
11870
11884
|
const {
|
|
11871
11885
|
fullAllDataRowIdData
|
|
11872
11886
|
} = internalData;
|
|
11873
11887
|
const el = refElem.value;
|
|
11874
|
-
if (!showOverflow &&
|
|
11888
|
+
if (!showOverflow && el) {
|
|
11875
11889
|
let paddingTop = 0;
|
|
11876
11890
|
let paddingBottom = 0;
|
|
11877
11891
|
let calcPadding = false;
|
|
@@ -11902,6 +11916,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11902
11916
|
}
|
|
11903
11917
|
});
|
|
11904
11918
|
}
|
|
11919
|
+
// updateCellOffset()
|
|
11905
11920
|
};
|
|
11906
11921
|
const getOrderField = column => {
|
|
11907
11922
|
const {
|
|
@@ -13183,7 +13198,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13183
13198
|
scrollXStore.offsetSize = offsetXSize;
|
|
13184
13199
|
scrollXStore.visibleSize = visibleXSize;
|
|
13185
13200
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
|
|
13186
|
-
tablePrivateMethods.updateScrollXData()
|
|
13201
|
+
tablePrivateMethods.updateScrollXData().then(() => {
|
|
13202
|
+
loadScrollXData();
|
|
13203
|
+
});
|
|
13187
13204
|
} else {
|
|
13188
13205
|
tablePrivateMethods.updateScrollXSpace();
|
|
13189
13206
|
}
|
|
@@ -13200,7 +13217,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13200
13217
|
scrollYStore.offsetSize = offsetYSize;
|
|
13201
13218
|
scrollYStore.visibleSize = visibleYSize;
|
|
13202
13219
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
13203
|
-
tablePrivateMethods.updateScrollYData()
|
|
13220
|
+
tablePrivateMethods.updateScrollYData().then(() => {
|
|
13221
|
+
loadScrollYData();
|
|
13222
|
+
});
|
|
13204
13223
|
} else {
|
|
13205
13224
|
tablePrivateMethods.updateScrollYSpace();
|
|
13206
13225
|
}
|
|
@@ -13209,7 +13228,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13209
13228
|
};
|
|
13210
13229
|
const handleRecalculateLayout = reFull => {
|
|
13211
13230
|
const el = refElem.value;
|
|
13212
|
-
internalData.
|
|
13231
|
+
internalData.rceRunTime = Date.now();
|
|
13213
13232
|
if (!el || !el.clientWidth) {
|
|
13214
13233
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
13215
13234
|
}
|
|
@@ -14000,10 +14019,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14000
14019
|
internalData.inFooterScroll = false;
|
|
14001
14020
|
internalData.bodyScrollType = '';
|
|
14002
14021
|
if (isRollX && scrollXLoad) {
|
|
14003
|
-
tablePrivateMethods.updateScrollXData()
|
|
14022
|
+
tablePrivateMethods.updateScrollXData().then(() => {
|
|
14023
|
+
loadScrollXData();
|
|
14024
|
+
});
|
|
14004
14025
|
}
|
|
14005
14026
|
if (isRollY && scrollYLoad) {
|
|
14006
|
-
tablePrivateMethods.updateScrollYData()
|
|
14027
|
+
tablePrivateMethods.updateScrollYData().then(() => {
|
|
14028
|
+
loadScrollYData();
|
|
14029
|
+
});
|
|
14007
14030
|
}
|
|
14008
14031
|
tableMethods.updateCellAreas();
|
|
14009
14032
|
}, 200);
|
|
@@ -15042,7 +15065,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
15042
15065
|
return new Promise(resolve => {
|
|
15043
15066
|
const {
|
|
15044
15067
|
rceTimeout,
|
|
15045
|
-
|
|
15068
|
+
rceRunTime
|
|
15046
15069
|
} = internalData;
|
|
15047
15070
|
const resizeOpts = computeResizeOpts.value;
|
|
15048
15071
|
const refreshDelay = resizeOpts.refreshDelay || 20;
|
|
@@ -15052,7 +15075,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
15052
15075
|
}
|
|
15053
15076
|
if (rceTimeout) {
|
|
15054
15077
|
clearTimeout(rceTimeout);
|
|
15055
|
-
if (
|
|
15078
|
+
if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
|
|
15056
15079
|
resolve(handleRecalculateLayout(!!reFull));
|
|
15057
15080
|
} else {
|
|
15058
15081
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
@@ -17786,6 +17809,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17786
17809
|
const isCustomVisible = isAllCustom || storageOpts.visible;
|
|
17787
17810
|
const isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
17788
17811
|
const isCustomSort = isAllCustom || storageOpts.sort;
|
|
17812
|
+
if (type !== 'reset') {
|
|
17813
|
+
// fix:修复拖动列宽,重置按钮无法点击的问题
|
|
17814
|
+
reactData.isCustomStatus = true;
|
|
17815
|
+
}
|
|
17789
17816
|
if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
17790
17817
|
if (!tableId) {
|
|
17791
17818
|
errLog('vxe.error.reqProp', ['id']);
|