vxe-table 4.7.62 → 4.7.64
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 +20 -8
- package/es/table/src/util.js +4 -3
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +28 -12
- 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 +21 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +4 -3
- 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 +19 -8
- package/packages/table/src/util.ts +4 -3
- /package/es/{iconfont.1723041277531.ttf → iconfont.1723218795604.ttf} +0 -0
- /package/es/{iconfont.1723041277531.woff → iconfont.1723218795604.woff} +0 -0
- /package/es/{iconfont.1723041277531.woff2 → iconfont.1723218795604.woff2} +0 -0
- /package/lib/{iconfont.1723041277531.ttf → iconfont.1723218795604.ttf} +0 -0
- /package/lib/{iconfont.1723041277531.woff → iconfont.1723218795604.woff} +0 -0
- /package/lib/{iconfont.1723041277531.woff2 → iconfont.1723218795604.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -1951,9 +1951,9 @@ function eqEmptyValue(cellValue) {
|
|
|
1951
1951
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
1952
1952
|
|
|
1953
1953
|
|
|
1954
|
-
const version = "4.7.
|
|
1954
|
+
const version = "4.7.64";
|
|
1955
1955
|
core_.VxeUI.version = version;
|
|
1956
|
-
core_.VxeUI.tableVersion = "4.7.
|
|
1956
|
+
core_.VxeUI.tableVersion = "4.7.64";
|
|
1957
1957
|
core_.VxeUI.setConfig({
|
|
1958
1958
|
emptyCell: ' ',
|
|
1959
1959
|
table: {
|
|
@@ -2332,7 +2332,7 @@ var es_array_push = __webpack_require__(4114);
|
|
|
2332
2332
|
const {
|
|
2333
2333
|
log: log_log
|
|
2334
2334
|
} = core_.VxeUI;
|
|
2335
|
-
const log_version = `table v${"4.7.
|
|
2335
|
+
const log_version = `table v${"4.7.64"}`;
|
|
2336
2336
|
const warnLog = log_log.create('warn', log_version);
|
|
2337
2337
|
const errLog = log_log.create('error', log_version);
|
|
2338
2338
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3109,7 +3109,7 @@ function rowToVisible($xeTable, row) {
|
|
|
3109
3109
|
} else {
|
|
3110
3110
|
// 如果是虚拟渲染跨行滚动
|
|
3111
3111
|
if (scrollYLoad) {
|
|
3112
|
-
return $xeTable.scrollTo(null, (
|
|
3112
|
+
return $xeTable.scrollTo(null, ($xeTable.findRowIndexOf(afterFullData, row) - 1) * scrollYStore.rowHeight);
|
|
3113
3113
|
}
|
|
3114
3114
|
}
|
|
3115
3115
|
}
|
|
@@ -3152,10 +3152,11 @@ function colToVisible($xeTable, column) {
|
|
|
3152
3152
|
if (scrollXLoad) {
|
|
3153
3153
|
let scrollLeft = 0;
|
|
3154
3154
|
for (let index = 0; index < visibleColumn.length; index++) {
|
|
3155
|
-
|
|
3155
|
+
const currCol = visibleColumn[index];
|
|
3156
|
+
if (currCol === column || currCol.id === column.id) {
|
|
3156
3157
|
break;
|
|
3157
3158
|
}
|
|
3158
|
-
scrollLeft +=
|
|
3159
|
+
scrollLeft += currCol.renderWidth;
|
|
3159
3160
|
}
|
|
3160
3161
|
return $xeTable.scrollTo(scrollLeft);
|
|
3161
3162
|
}
|
|
@@ -8344,6 +8345,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
8344
8345
|
resizeList: [],
|
|
8345
8346
|
pxList: [],
|
|
8346
8347
|
pxMinList: [],
|
|
8348
|
+
autoMinList: [],
|
|
8347
8349
|
scaleList: [],
|
|
8348
8350
|
scaleMinList: [],
|
|
8349
8351
|
autoList: [],
|
|
@@ -8711,7 +8713,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
8711
8713
|
const {
|
|
8712
8714
|
visibleColumn
|
|
8713
8715
|
} = internalData;
|
|
8714
|
-
|
|
8716
|
+
const {
|
|
8717
|
+
tableColumn
|
|
8718
|
+
} = reactData;
|
|
8719
|
+
return tableColumn.length || visibleColumn.length ? visibleColumn.filter(column => column.width === 'auto' || column.minWidth === 'auto') : [];
|
|
8715
8720
|
});
|
|
8716
8721
|
const computeFixedColumnSize = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
8717
8722
|
const {
|
|
@@ -9349,11 +9354,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9349
9354
|
const cellStyle = getComputedStyle(firstCellEl);
|
|
9350
9355
|
paddingSize = Math.floor(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingLeft) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingRight)) + 2;
|
|
9351
9356
|
}
|
|
9352
|
-
let colWidth = column.renderAutoWidth - paddingSize
|
|
9357
|
+
let colWidth = column.renderAutoWidth - paddingSize;
|
|
9353
9358
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(cellElList, cellEl => {
|
|
9354
9359
|
const labelEl = cellEl.firstChild;
|
|
9355
9360
|
if (labelEl) {
|
|
9356
|
-
colWidth = Math.max(colWidth, labelEl.offsetWidth);
|
|
9361
|
+
colWidth = Math.max(colWidth, Math.ceil(labelEl.offsetWidth) + 4);
|
|
9357
9362
|
}
|
|
9358
9363
|
});
|
|
9359
9364
|
column.renderAutoWidth = colWidth + paddingSize;
|
|
@@ -9393,6 +9398,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9393
9398
|
const {
|
|
9394
9399
|
resizeList,
|
|
9395
9400
|
pxMinList,
|
|
9401
|
+
autoMinList,
|
|
9396
9402
|
pxList,
|
|
9397
9403
|
scaleList,
|
|
9398
9404
|
scaleMinList,
|
|
@@ -9405,6 +9411,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9405
9411
|
tableWidth += minWidth;
|
|
9406
9412
|
column.renderWidth = minWidth;
|
|
9407
9413
|
});
|
|
9414
|
+
// 最小自适应
|
|
9415
|
+
autoMinList.forEach(column => {
|
|
9416
|
+
const scaleWidth = Math.max(60, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(column.renderAutoWidth));
|
|
9417
|
+
tableWidth += scaleWidth;
|
|
9418
|
+
column.renderWidth = scaleWidth;
|
|
9419
|
+
});
|
|
9408
9420
|
// 最小百分比
|
|
9409
9421
|
scaleMinList.forEach(column => {
|
|
9410
9422
|
const scaleWidth = Math.floor(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(column.minWidth) * meanWidth);
|
|
@@ -9436,10 +9448,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9436
9448
|
column.renderWidth = width;
|
|
9437
9449
|
});
|
|
9438
9450
|
remainWidth -= tableWidth;
|
|
9439
|
-
meanWidth = remainWidth > 0 ? Math.floor(remainWidth / (scaleMinList.length + pxMinList.length + remainList.length)) : 0;
|
|
9451
|
+
meanWidth = remainWidth > 0 ? Math.floor(remainWidth / (scaleMinList.length + pxMinList.length + autoMinList.length + remainList.length)) : 0;
|
|
9440
9452
|
if (fit) {
|
|
9441
9453
|
if (remainWidth > 0) {
|
|
9442
|
-
scaleMinList.concat(pxMinList).forEach(column => {
|
|
9454
|
+
scaleMinList.concat(pxMinList).concat(autoMinList).forEach(column => {
|
|
9443
9455
|
tableWidth += meanWidth;
|
|
9444
9456
|
column.renderWidth += meanWidth;
|
|
9445
9457
|
});
|
|
@@ -9458,7 +9470,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9458
9470
|
* 偏移量算法
|
|
9459
9471
|
* 如果所有列足够放的情况下,从最后动态列开始分配
|
|
9460
9472
|
*/
|
|
9461
|
-
const dynamicList = scaleList.concat(scaleMinList).concat(pxMinList).concat(remainList);
|
|
9473
|
+
const dynamicList = scaleList.concat(scaleMinList).concat(pxMinList).concat(autoMinList).concat(remainList);
|
|
9462
9474
|
let dynamicSize = dynamicList.length - 1;
|
|
9463
9475
|
if (dynamicSize > 0) {
|
|
9464
9476
|
let odiffer = bodyWidth - tableWidth;
|
|
@@ -14509,6 +14521,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14509
14521
|
const resizeList = [];
|
|
14510
14522
|
const pxList = [];
|
|
14511
14523
|
const pxMinList = [];
|
|
14524
|
+
const autoMinList = [];
|
|
14512
14525
|
const scaleList = [];
|
|
14513
14526
|
const scaleMinList = [];
|
|
14514
14527
|
const autoList = [];
|
|
@@ -14531,6 +14544,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14531
14544
|
scaleList.push(column);
|
|
14532
14545
|
} else if (isPx(column.minWidth)) {
|
|
14533
14546
|
pxMinList.push(column);
|
|
14547
|
+
} else if (column.minWidth === 'auto') {
|
|
14548
|
+
autoMinList.push(column);
|
|
14534
14549
|
} else if (isScale(column.minWidth)) {
|
|
14535
14550
|
scaleMinList.push(column);
|
|
14536
14551
|
} else {
|
|
@@ -14542,6 +14557,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14542
14557
|
resizeList,
|
|
14543
14558
|
pxList,
|
|
14544
14559
|
pxMinList,
|
|
14560
|
+
autoMinList,
|
|
14545
14561
|
scaleList,
|
|
14546
14562
|
scaleMinList,
|
|
14547
14563
|
autoList,
|