vxe-table 4.7.48 → 4.7.50
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/grid/src/grid.js +3 -3
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/cell.js +51 -11
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +2 -0
- package/es/table/src/table.js +63 -13
- package/es/table/style.css +8 -6
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +8 -6
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +3 -3
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +127 -30
- 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/cell.js +48 -11
- 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 +2 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +69 -13
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +8 -6
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +8 -6
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +3 -3
- package/packages/table/src/cell.ts +59 -12
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +2 -0
- package/packages/table/src/table.ts +72 -19
- package/styles/components/table.scss +14 -6
- /package/es/{iconfont.1720698597734.ttf → iconfont.1720872721039.ttf} +0 -0
- /package/es/{iconfont.1720698597734.woff → iconfont.1720872721039.woff} +0 -0
- /package/es/{iconfont.1720698597734.woff2 → iconfont.1720872721039.woff2} +0 -0
- /package/lib/{iconfont.1720698597734.ttf → iconfont.1720872721039.ttf} +0 -0
- /package/lib/{iconfont.1720698597734.woff → iconfont.1720872721039.woff} +0 -0
- /package/lib/{iconfont.1720698597734.woff2 → iconfont.1720872721039.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.50";
|
|
1955
1955
|
core_.VxeUI.version = version;
|
|
1956
|
-
core_.VxeUI.tableVersion = "4.7.
|
|
1956
|
+
core_.VxeUI.tableVersion = "4.7.50";
|
|
1957
1957
|
core_.VxeUI.setConfig({
|
|
1958
1958
|
emptyCell: ' ',
|
|
1959
1959
|
table: {
|
|
@@ -2331,7 +2331,7 @@ var es_array_push = __webpack_require__(4114);
|
|
|
2331
2331
|
const {
|
|
2332
2332
|
log: log_log
|
|
2333
2333
|
} = core_.VxeUI;
|
|
2334
|
-
const log_version = `table v${"4.7.
|
|
2334
|
+
const log_version = `table v${"4.7.50"}`;
|
|
2335
2335
|
const warnLog = log_log.create('warn', log_version);
|
|
2336
2336
|
const errLog = log_log.create('error', log_version);
|
|
2337
2337
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -2419,6 +2419,7 @@ class ColumnInfo {
|
|
|
2419
2419
|
headerClassName: _vm.headerClassName,
|
|
2420
2420
|
footerClassName: _vm.footerClassName,
|
|
2421
2421
|
formatter: formatter,
|
|
2422
|
+
footerFormatter: _vm.footerFormatter,
|
|
2422
2423
|
sortable: _vm.sortable,
|
|
2423
2424
|
sortBy: _vm.sortBy,
|
|
2424
2425
|
sortType: _vm.sortType,
|
|
@@ -2469,6 +2470,7 @@ class ColumnInfo {
|
|
|
2469
2470
|
renderWidth: 0,
|
|
2470
2471
|
renderHeight: 0,
|
|
2471
2472
|
renderResizeWidth: 0,
|
|
2473
|
+
renderAutoWidth: 0,
|
|
2472
2474
|
resizeWidth: 0,
|
|
2473
2475
|
renderLeft: 0,
|
|
2474
2476
|
renderArgs: [],
|
|
@@ -3180,7 +3182,8 @@ function getSlotVNs(vns) {
|
|
|
3180
3182
|
const {
|
|
3181
3183
|
getI18n: cell_getI18n,
|
|
3182
3184
|
getIcon: cell_getIcon,
|
|
3183
|
-
renderer: cell_renderer
|
|
3185
|
+
renderer: cell_renderer,
|
|
3186
|
+
formats: cell_formats
|
|
3184
3187
|
} = core_.VxeUI;
|
|
3185
3188
|
function renderTitlePrefixIcon(params) {
|
|
3186
3189
|
const {
|
|
@@ -3270,6 +3273,18 @@ function renderTitleContent(params, content) {
|
|
|
3270
3273
|
...ons
|
|
3271
3274
|
}, getSlotVNs(content))];
|
|
3272
3275
|
}
|
|
3276
|
+
function formatFooterLabel(footerFormatter, params) {
|
|
3277
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerFormatter)) {
|
|
3278
|
+
return footerFormatter(params);
|
|
3279
|
+
}
|
|
3280
|
+
const isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(footerFormatter);
|
|
3281
|
+
const gFormatOpts = isArr ? cell_formats.get(footerFormatter[0]) : cell_formats.get(footerFormatter);
|
|
3282
|
+
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
3283
|
+
if (footerFormatMethod) {
|
|
3284
|
+
return isArr ? footerFormatMethod(params, ...footerFormatter.slice(1)) : footerFormatMethod(params);
|
|
3285
|
+
}
|
|
3286
|
+
return '';
|
|
3287
|
+
}
|
|
3273
3288
|
function getFooterContent(params) {
|
|
3274
3289
|
const {
|
|
3275
3290
|
$table,
|
|
@@ -3281,7 +3296,8 @@ function getFooterContent(params) {
|
|
|
3281
3296
|
const {
|
|
3282
3297
|
slots,
|
|
3283
3298
|
editRender,
|
|
3284
|
-
cellRender
|
|
3299
|
+
cellRender,
|
|
3300
|
+
footerFormatter
|
|
3285
3301
|
} = column;
|
|
3286
3302
|
const renderOpts = editRender || cellRender;
|
|
3287
3303
|
const footerSlot = slots ? slots.footer : null;
|
|
@@ -3297,11 +3313,26 @@ function getFooterContent(params) {
|
|
|
3297
3313
|
}
|
|
3298
3314
|
}
|
|
3299
3315
|
}
|
|
3316
|
+
let itemValue = '';
|
|
3300
3317
|
// 兼容老模式
|
|
3301
3318
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(items)) {
|
|
3302
|
-
|
|
3319
|
+
itemValue = items[_columnIndex];
|
|
3320
|
+
return [footerFormatter ? formatFooterLabel(footerFormatter, {
|
|
3321
|
+
itemValue,
|
|
3322
|
+
column,
|
|
3323
|
+
row,
|
|
3324
|
+
items,
|
|
3325
|
+
_columnIndex
|
|
3326
|
+
}) : formatText(itemValue, 1)];
|
|
3303
3327
|
}
|
|
3304
|
-
|
|
3328
|
+
itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
3329
|
+
return [footerFormatter ? formatFooterLabel(footerFormatter, {
|
|
3330
|
+
itemValue,
|
|
3331
|
+
column,
|
|
3332
|
+
row,
|
|
3333
|
+
items,
|
|
3334
|
+
_columnIndex
|
|
3335
|
+
}) : formatText(itemValue, 1)];
|
|
3305
3336
|
}
|
|
3306
3337
|
function getDefaultCellLabel(params) {
|
|
3307
3338
|
const {
|
|
@@ -3466,7 +3497,8 @@ const Cell = {
|
|
|
3466
3497
|
isHidden
|
|
3467
3498
|
} = params;
|
|
3468
3499
|
const {
|
|
3469
|
-
reactData
|
|
3500
|
+
reactData,
|
|
3501
|
+
internalData
|
|
3470
3502
|
} = $table;
|
|
3471
3503
|
const {
|
|
3472
3504
|
computeTreeOpts
|
|
@@ -3475,6 +3507,9 @@ const Cell = {
|
|
|
3475
3507
|
treeExpandedMaps,
|
|
3476
3508
|
treeExpandLazyLoadedMaps
|
|
3477
3509
|
} = reactData;
|
|
3510
|
+
const {
|
|
3511
|
+
fullAllDataRowIdData
|
|
3512
|
+
} = internalData;
|
|
3478
3513
|
const treeOpts = computeTreeOpts.value;
|
|
3479
3514
|
const {
|
|
3480
3515
|
row,
|
|
@@ -3496,9 +3531,11 @@ const Cell = {
|
|
|
3496
3531
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
3497
3532
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
3498
3533
|
const rowChilds = row[childrenField];
|
|
3534
|
+
const hasChild = rowChilds && rowChilds.length;
|
|
3499
3535
|
const iconSlot = slots ? slots.icon : null;
|
|
3500
3536
|
let hasLazyChilds = false;
|
|
3501
3537
|
let isAceived = false;
|
|
3538
|
+
let isLazyLoading = false;
|
|
3502
3539
|
let isLazyLoaded = false;
|
|
3503
3540
|
const ons = {};
|
|
3504
3541
|
if (iconSlot) {
|
|
@@ -3508,8 +3545,10 @@ const Cell = {
|
|
|
3508
3545
|
const rowid = getRowid($table, row);
|
|
3509
3546
|
isAceived = !!treeExpandedMaps[rowid];
|
|
3510
3547
|
if (lazy) {
|
|
3511
|
-
|
|
3548
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
3549
|
+
isLazyLoading = !!treeExpandLazyLoadedMaps[rowid];
|
|
3512
3550
|
hasLazyChilds = row[hasChildField];
|
|
3551
|
+
isLazyLoaded = !!rest.treeLoaded;
|
|
3513
3552
|
}
|
|
3514
3553
|
}
|
|
3515
3554
|
if (!trigger || trigger === 'default') {
|
|
@@ -3524,11 +3563,11 @@ const Cell = {
|
|
|
3524
3563
|
style: {
|
|
3525
3564
|
paddingLeft: `${level * indent}px`
|
|
3526
3565
|
}
|
|
3527
|
-
}, [showIcon && (
|
|
3566
|
+
}, [showIcon && (lazy ? isLazyLoaded ? hasChild : hasLazyChilds : hasChild) ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3528
3567
|
class: 'vxe-tree--btn-wrapper',
|
|
3529
3568
|
...ons
|
|
3530
3569
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
3531
|
-
class: ['vxe-tree--node-btn',
|
|
3570
|
+
class: ['vxe-tree--node-btn', isLazyLoading ? iconLoaded || cell_getIcon().TABLE_TREE_LOADED : isAceived ? iconOpen || cell_getIcon().TABLE_TREE_OPEN : iconClose || cell_getIcon().TABLE_TREE_CLOSE]
|
|
3532
3571
|
})])] : null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3533
3572
|
class: 'vxe-tree-cell'
|
|
3534
3573
|
}, cellVNodes)])];
|
|
@@ -3962,7 +4001,7 @@ const Cell = {
|
|
|
3962
4001
|
const defaultSlot = slots ? slots.default : null;
|
|
3963
4002
|
const iconSlot = slots ? slots.icon : null;
|
|
3964
4003
|
let isAceived = false;
|
|
3965
|
-
let
|
|
4004
|
+
let isLazyLoading = false;
|
|
3966
4005
|
if (iconSlot) {
|
|
3967
4006
|
return $table.callSlot(iconSlot, params);
|
|
3968
4007
|
}
|
|
@@ -3970,7 +4009,7 @@ const Cell = {
|
|
|
3970
4009
|
const rowid = getRowid($table, row);
|
|
3971
4010
|
isAceived = !!rowExpandedMaps[rowid];
|
|
3972
4011
|
if (lazy) {
|
|
3973
|
-
|
|
4012
|
+
isLazyLoading = !!rowExpandLazyLoadedMaps[rowid];
|
|
3974
4013
|
}
|
|
3975
4014
|
}
|
|
3976
4015
|
return [showIcon && (!visibleMethod || visibleMethod(params)) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
@@ -3981,7 +4020,7 @@ const Cell = {
|
|
|
3981
4020
|
$table.triggerRowExpandEvent(evnt, params);
|
|
3982
4021
|
}
|
|
3983
4022
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
3984
|
-
class: ['vxe-table--expand-btn',
|
|
4023
|
+
class: ['vxe-table--expand-btn', isLazyLoading ? iconLoaded || cell_getIcon().TABLE_EXPAND_LOADED : isAceived ? iconOpen || cell_getIcon().TABLE_EXPAND_OPEN : iconClose || cell_getIcon().TABLE_EXPAND_CLOSE]
|
|
3985
4024
|
})]) : null, defaultSlot || labelField ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
3986
4025
|
class: 'vxe-table--expand-label'
|
|
3987
4026
|
}, defaultSlot ? $table.callSlot(defaultSlot, params) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, labelField)) : null];
|
|
@@ -4304,6 +4343,8 @@ const columnProps = {
|
|
|
4304
4343
|
footerClassName: [String, Function],
|
|
4305
4344
|
// 格式化显示内容
|
|
4306
4345
|
formatter: [Function, Array, String],
|
|
4346
|
+
// 格式化表尾显示内容
|
|
4347
|
+
footerFormatter: [Function, Array, String],
|
|
4307
4348
|
// 是否允许排序
|
|
4308
4349
|
sortable: Boolean,
|
|
4309
4350
|
// 自定义排序的属性
|
|
@@ -8215,6 +8256,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
8215
8256
|
computeSize
|
|
8216
8257
|
} = useFns.useSize(props);
|
|
8217
8258
|
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
8259
|
+
isCalcColumn: false,
|
|
8218
8260
|
// 低性能的静态列
|
|
8219
8261
|
staticColumns: [],
|
|
8220
8262
|
// 渲染的列分组
|
|
@@ -8327,7 +8369,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
8327
8369
|
pxMinList: [],
|
|
8328
8370
|
scaleList: [],
|
|
8329
8371
|
scaleMinList: [],
|
|
8330
|
-
autoList: []
|
|
8372
|
+
autoList: [],
|
|
8373
|
+
remainList: []
|
|
8331
8374
|
},
|
|
8332
8375
|
// 存放快捷菜单的信息
|
|
8333
8376
|
ctxMenuStore: {
|
|
@@ -8672,6 +8715,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
8672
8715
|
const computeCustomOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
8673
8716
|
return Object.assign({}, table_getConfig().table.customConfig, props.customConfig);
|
|
8674
8717
|
});
|
|
8718
|
+
const computeAutoWidthColumnList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
8719
|
+
const {
|
|
8720
|
+
visibleColumn
|
|
8721
|
+
} = internalData;
|
|
8722
|
+
return visibleColumn.filter(column => column.width === 'auto');
|
|
8723
|
+
});
|
|
8675
8724
|
const computeFixedColumnSize = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
8676
8725
|
const {
|
|
8677
8726
|
collectColumn
|
|
@@ -9063,7 +9112,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9063
9112
|
const val = props[key];
|
|
9064
9113
|
let num = 0;
|
|
9065
9114
|
if (val) {
|
|
9066
|
-
if (val === 'auto') {
|
|
9115
|
+
if (val === '100%' || val === 'auto') {
|
|
9067
9116
|
num = parentHeight;
|
|
9068
9117
|
} else {
|
|
9069
9118
|
const excludeHeight = $xeTable.getExcludeHeight();
|
|
@@ -9286,6 +9335,41 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9286
9335
|
internalData.customMinHeight = calcHeight('minHeight');
|
|
9287
9336
|
internalData.customMaxHeight = calcHeight('maxHeight');
|
|
9288
9337
|
};
|
|
9338
|
+
const calcCellWidth = () => {
|
|
9339
|
+
const {
|
|
9340
|
+
tableData
|
|
9341
|
+
} = reactData;
|
|
9342
|
+
const autoWidthColumnList = computeAutoWidthColumnList.value;
|
|
9343
|
+
if (!tableData.length || !autoWidthColumnList.length) {
|
|
9344
|
+
reactData.isCalcColumn = false;
|
|
9345
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
9346
|
+
}
|
|
9347
|
+
reactData.isCalcColumn = true;
|
|
9348
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
9349
|
+
const el = refElem.value;
|
|
9350
|
+
if (el) {
|
|
9351
|
+
autoWidthColumnList.forEach(column => {
|
|
9352
|
+
const cellElList = el.querySelectorAll(`.vxe-body--column.${column.id}>.vxe-cell`);
|
|
9353
|
+
const firstCellEl = cellElList[0];
|
|
9354
|
+
let paddingSize = 0;
|
|
9355
|
+
if (firstCellEl) {
|
|
9356
|
+
const cellStyle = getComputedStyle(firstCellEl);
|
|
9357
|
+
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;
|
|
9358
|
+
}
|
|
9359
|
+
let colWidth = column.renderAutoWidth - paddingSize + 2;
|
|
9360
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(cellElList, cellEl => {
|
|
9361
|
+
const labelEl = cellEl.firstChild;
|
|
9362
|
+
if (labelEl) {
|
|
9363
|
+
colWidth = Math.max(colWidth, labelEl.offsetWidth);
|
|
9364
|
+
}
|
|
9365
|
+
});
|
|
9366
|
+
column.renderAutoWidth = colWidth + paddingSize;
|
|
9367
|
+
});
|
|
9368
|
+
tablePrivateMethods.analyColumnWidth();
|
|
9369
|
+
}
|
|
9370
|
+
reactData.isCalcColumn = false;
|
|
9371
|
+
});
|
|
9372
|
+
};
|
|
9289
9373
|
/**
|
|
9290
9374
|
* 列宽算法
|
|
9291
9375
|
* 支持 px、%、固定 混合分配
|
|
@@ -9319,7 +9403,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9319
9403
|
pxList,
|
|
9320
9404
|
scaleList,
|
|
9321
9405
|
scaleMinList,
|
|
9322
|
-
autoList
|
|
9406
|
+
autoList,
|
|
9407
|
+
remainList
|
|
9323
9408
|
} = columnStore;
|
|
9324
9409
|
// 最小宽
|
|
9325
9410
|
pxMinList.forEach(column => {
|
|
@@ -9345,6 +9430,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9345
9430
|
tableWidth += width;
|
|
9346
9431
|
column.renderWidth = width;
|
|
9347
9432
|
});
|
|
9433
|
+
// 自适应宽
|
|
9434
|
+
autoList.forEach(column => {
|
|
9435
|
+
const width = Math.max(60, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(column.renderAutoWidth));
|
|
9436
|
+
tableWidth += width;
|
|
9437
|
+
column.renderWidth = width;
|
|
9438
|
+
});
|
|
9348
9439
|
// 调整了列宽
|
|
9349
9440
|
resizeList.forEach(column => {
|
|
9350
9441
|
const width = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(column.resizeWidth);
|
|
@@ -9352,7 +9443,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9352
9443
|
column.renderWidth = width;
|
|
9353
9444
|
});
|
|
9354
9445
|
remainWidth -= tableWidth;
|
|
9355
|
-
meanWidth = remainWidth > 0 ? Math.floor(remainWidth / (scaleMinList.length + pxMinList.length +
|
|
9446
|
+
meanWidth = remainWidth > 0 ? Math.floor(remainWidth / (scaleMinList.length + pxMinList.length + remainList.length)) : 0;
|
|
9356
9447
|
if (fit) {
|
|
9357
9448
|
if (remainWidth > 0) {
|
|
9358
9449
|
scaleMinList.concat(pxMinList).forEach(column => {
|
|
@@ -9363,8 +9454,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9363
9454
|
} else {
|
|
9364
9455
|
meanWidth = minCellWidth;
|
|
9365
9456
|
}
|
|
9366
|
-
//
|
|
9367
|
-
|
|
9457
|
+
// 剩余均分
|
|
9458
|
+
remainList.forEach(column => {
|
|
9368
9459
|
const width = Math.max(meanWidth, minCellWidth);
|
|
9369
9460
|
column.renderWidth = width;
|
|
9370
9461
|
tableWidth += width;
|
|
@@ -9374,7 +9465,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
9374
9465
|
* 偏移量算法
|
|
9375
9466
|
* 如果所有列足够放的情况下,从最后动态列开始分配
|
|
9376
9467
|
*/
|
|
9377
|
-
const dynamicList = scaleList.concat(scaleMinList).concat(pxMinList).concat(
|
|
9468
|
+
const dynamicList = scaleList.concat(scaleMinList).concat(pxMinList).concat(remainList);
|
|
9378
9469
|
let dynamicSize = dynamicList.length - 1;
|
|
9379
9470
|
if (dynamicSize > 0) {
|
|
9380
9471
|
let odiffer = bodyWidth - tableWidth;
|
|
@@ -10490,10 +10581,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
10490
10581
|
const rowid = getRowid($xeTable, row);
|
|
10491
10582
|
const rest = fullAllDataRowIdData[rowid];
|
|
10492
10583
|
treeExpandLazyLoadedMaps[rowid] = row;
|
|
10493
|
-
loadMethod({
|
|
10584
|
+
Promise.resolve(loadMethod({
|
|
10494
10585
|
$table: $xeTable,
|
|
10495
10586
|
row
|
|
10496
|
-
}).then(childRecords => {
|
|
10587
|
+
})).then(childRecords => {
|
|
10497
10588
|
rest.treeLoaded = true;
|
|
10498
10589
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
10499
10590
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
@@ -12162,6 +12253,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
12162
12253
|
* 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
|
|
12163
12254
|
*/
|
|
12164
12255
|
recalculate(refull) {
|
|
12256
|
+
calcCellWidth();
|
|
12165
12257
|
autoCellWidth();
|
|
12166
12258
|
if (refull === true) {
|
|
12167
12259
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
@@ -14152,7 +14244,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14152
14244
|
/**
|
|
14153
14245
|
* 处理显示 tooltip
|
|
14154
14246
|
* @param {Event} evnt 事件
|
|
14155
|
-
* @param {ColumnInfo} column 列配置
|
|
14156
14247
|
* @param {Row} row 行对象
|
|
14157
14248
|
*/
|
|
14158
14249
|
const handleTooltip = (evnt, cell, overflowElem, tipElem, params) => {
|
|
@@ -14229,7 +14320,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14229
14320
|
const el = refElem.value;
|
|
14230
14321
|
if (el) {
|
|
14231
14322
|
const parentElem = el.parentNode;
|
|
14232
|
-
const parentPaddingSize = height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0;
|
|
14323
|
+
const parentPaddingSize = height === 'fill' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0;
|
|
14233
14324
|
return Math.floor($xeGrid ? $xeGrid.getParentHeight() : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(parentElem).height) - parentPaddingSize);
|
|
14234
14325
|
}
|
|
14235
14326
|
return 0;
|
|
@@ -14431,6 +14522,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14431
14522
|
const scaleList = [];
|
|
14432
14523
|
const scaleMinList = [];
|
|
14433
14524
|
const autoList = [];
|
|
14525
|
+
const remainList = [];
|
|
14434
14526
|
tableFullColumn.forEach(column => {
|
|
14435
14527
|
if (defaultWidth && !column.width) {
|
|
14436
14528
|
column.width = defaultWidth;
|
|
@@ -14441,6 +14533,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14441
14533
|
if (column.visible) {
|
|
14442
14534
|
if (column.resizeWidth) {
|
|
14443
14535
|
resizeList.push(column);
|
|
14536
|
+
} else if (column.width === 'auto') {
|
|
14537
|
+
autoList.push(column);
|
|
14444
14538
|
} else if (isPx(column.width)) {
|
|
14445
14539
|
pxList.push(column);
|
|
14446
14540
|
} else if (isScale(column.width)) {
|
|
@@ -14450,7 +14544,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14450
14544
|
} else if (isScale(column.minWidth)) {
|
|
14451
14545
|
scaleMinList.push(column);
|
|
14452
14546
|
} else {
|
|
14453
|
-
|
|
14547
|
+
remainList.push(column);
|
|
14454
14548
|
}
|
|
14455
14549
|
}
|
|
14456
14550
|
});
|
|
@@ -14460,7 +14554,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14460
14554
|
pxMinList,
|
|
14461
14555
|
scaleList,
|
|
14462
14556
|
scaleMinList,
|
|
14463
|
-
autoList
|
|
14557
|
+
autoList,
|
|
14558
|
+
remainList
|
|
14464
14559
|
});
|
|
14465
14560
|
},
|
|
14466
14561
|
saveCustomStore(type) {
|
|
@@ -16108,6 +16203,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16108
16203
|
editRules
|
|
16109
16204
|
} = props;
|
|
16110
16205
|
const {
|
|
16206
|
+
isCalcColumn,
|
|
16111
16207
|
isGroup,
|
|
16112
16208
|
overflowX,
|
|
16113
16209
|
overflowY,
|
|
@@ -16155,6 +16251,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16155
16251
|
'row--highlight': rowOpts.isHover || highlightHoverRow,
|
|
16156
16252
|
'column--highlight': columnOpts.isHover || highlightHoverColumn,
|
|
16157
16253
|
'checkbox--range': checkboxOpts.range,
|
|
16254
|
+
'column--calc': isCalcColumn,
|
|
16158
16255
|
'is--header': showHeader,
|
|
16159
16256
|
'is--footer': showFooter,
|
|
16160
16257
|
'is--group': isGroup,
|
|
@@ -22684,9 +22781,9 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
|
|
|
22684
22781
|
const tableProps = Object.assign({}, tableExtendProps);
|
|
22685
22782
|
if (isZMax) {
|
|
22686
22783
|
if (tableExtendProps.maxHeight) {
|
|
22687
|
-
tableProps.maxHeight = '
|
|
22784
|
+
tableProps.maxHeight = '100%';
|
|
22688
22785
|
} else {
|
|
22689
|
-
tableProps.height = '
|
|
22786
|
+
tableProps.height = '100%';
|
|
22690
22787
|
}
|
|
22691
22788
|
}
|
|
22692
22789
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
@@ -23793,7 +23890,7 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
|
|
|
23793
23890
|
const topWrapper = refTopWrapper.value;
|
|
23794
23891
|
const bottomWrapper = refBottomWrapper.value;
|
|
23795
23892
|
const pagerWrapper = refPagerWrapper.value;
|
|
23796
|
-
const parentPaddingSize = isZMax || height
|
|
23893
|
+
const parentPaddingSize = isZMax || !(height === 'auto' || height === '100%') ? 0 : getPaddingTopBottomSize(el.parentNode);
|
|
23797
23894
|
return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
|
|
23798
23895
|
},
|
|
23799
23896
|
getParentHeight() {
|