vxe-table 3.15.32 → 3.15.34
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/cell.js +31 -15
- package/es/table/src/methods.js +18 -2
- package/es/table/src/table.js +2 -2
- package/es/table/style.css +9 -3
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +3 -3
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +9 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +62 -20
- 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 +39 -12
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +17 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +2 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +9 -3
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +3 -3
- 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 +9 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/src/cell.ts +31 -16
- package/packages/table/src/methods.ts +17 -2
- package/packages/table/src/table.ts +2 -2
- package/packages/ui/index.ts +2 -2
- package/styles/components/table.scss +13 -9
- package/styles/theme/base.scss +0 -2
- package/styles/theme/dark.scss +4 -1
- package/styles/theme/light.scss +3 -0
- package/styles/variable.scss +3 -0
- /package/es/{iconfont.1748578557669.ttf → iconfont.1749092456241.ttf} +0 -0
- /package/es/{iconfont.1748578557669.woff → iconfont.1749092456241.woff} +0 -0
- /package/es/{iconfont.1748578557669.woff2 → iconfont.1749092456241.woff2} +0 -0
- /package/lib/{iconfont.1748578557669.ttf → iconfont.1749092456241.ttf} +0 -0
- /package/lib/{iconfont.1748578557669.woff → iconfont.1749092456241.woff} +0 -0
- /package/lib/{iconfont.1748578557669.woff2 → iconfont.1749092456241.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
|
|
|
2002
2002
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2003
2003
|
|
|
2004
2004
|
|
|
2005
|
-
const version = "3.15.
|
|
2005
|
+
const version = "3.15.34";
|
|
2006
2006
|
core_.VxeUI.version = version;
|
|
2007
2007
|
core_.VxeUI.tableVersion = version;
|
|
2008
2008
|
core_.VxeUI.setConfig({
|
|
@@ -2203,13 +2203,13 @@ core_.VxeUI.setConfig({
|
|
|
2203
2203
|
isReplace: true
|
|
2204
2204
|
},
|
|
2205
2205
|
virtualXConfig: {
|
|
2206
|
-
|
|
2206
|
+
enabled: true,
|
|
2207
2207
|
gt: 24,
|
|
2208
2208
|
preSize: 0,
|
|
2209
2209
|
oSize: 0
|
|
2210
2210
|
},
|
|
2211
2211
|
virtualYConfig: {
|
|
2212
|
-
|
|
2212
|
+
enabled: true,
|
|
2213
2213
|
gt: 100,
|
|
2214
2214
|
preSize: 1,
|
|
2215
2215
|
oSize: 0
|
|
@@ -2646,7 +2646,7 @@ function isNodeElement(elem) {
|
|
|
2646
2646
|
const {
|
|
2647
2647
|
log: log_log
|
|
2648
2648
|
} = core_.VxeUI;
|
|
2649
|
-
const log_version = `table v${"3.15.
|
|
2649
|
+
const log_version = `table v${"3.15.34"}`;
|
|
2650
2650
|
const warnLog = log_log.create('warn', log_version);
|
|
2651
2651
|
const errLog = log_log.create('error', log_version);
|
|
2652
2652
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3742,21 +3742,30 @@ function getDefaultCellLabel(params) {
|
|
|
3742
3742
|
function renderCellHandle(h, params) {
|
|
3743
3743
|
const {
|
|
3744
3744
|
column,
|
|
3745
|
+
row,
|
|
3745
3746
|
$table
|
|
3746
3747
|
} = params;
|
|
3747
3748
|
const tableProps = $table;
|
|
3749
|
+
const tableReactData = $table;
|
|
3748
3750
|
const {
|
|
3749
3751
|
editConfig
|
|
3750
3752
|
} = tableProps;
|
|
3753
|
+
const {
|
|
3754
|
+
isRowGroupStatus
|
|
3755
|
+
} = tableReactData;
|
|
3751
3756
|
const {
|
|
3752
3757
|
type,
|
|
3753
3758
|
treeNode,
|
|
3754
3759
|
rowGroupNode,
|
|
3755
3760
|
editRender
|
|
3756
3761
|
} = column;
|
|
3762
|
+
const rowGroupOpts = $table.computeRowGroupOpts;
|
|
3763
|
+
const {
|
|
3764
|
+
mode
|
|
3765
|
+
} = rowGroupOpts;
|
|
3757
3766
|
const checkboxOpts = $table.computeCheckboxOpts;
|
|
3758
3767
|
const editOpts = $table.computeEditOpts;
|
|
3759
|
-
const isDeepCell = treeNode || rowGroupNode;
|
|
3768
|
+
const isDeepCell = treeNode || isRowGroupStatus && row.isAggregate && (mode === 'column' ? column.field === row.groupField : rowGroupNode);
|
|
3760
3769
|
switch (type) {
|
|
3761
3770
|
case 'seq':
|
|
3762
3771
|
return isDeepCell ? Cell.renderDeepIndexCell(h, params) : Cell.renderSeqCell(h, params);
|
|
@@ -3876,6 +3885,7 @@ const Cell = {
|
|
|
3876
3885
|
isRowGroupStatus
|
|
3877
3886
|
} = tableReactData;
|
|
3878
3887
|
const {
|
|
3888
|
+
field,
|
|
3879
3889
|
slots,
|
|
3880
3890
|
editRender,
|
|
3881
3891
|
cellRender,
|
|
@@ -3897,36 +3907,46 @@ const Cell = {
|
|
|
3897
3907
|
}
|
|
3898
3908
|
}
|
|
3899
3909
|
let cellValue = '';
|
|
3900
|
-
if (isRowGroupStatus &&
|
|
3910
|
+
if (isRowGroupStatus && row.isAggregate) {
|
|
3901
3911
|
const {
|
|
3902
3912
|
fullColumnFieldData
|
|
3903
3913
|
} = tableInternalData;
|
|
3904
3914
|
const rowGroupOpts = $table.computeRowGroupOpts;
|
|
3905
3915
|
const {
|
|
3916
|
+
mode,
|
|
3906
3917
|
showTotal,
|
|
3907
3918
|
totalMethod,
|
|
3919
|
+
countFields,
|
|
3920
|
+
countMethod,
|
|
3908
3921
|
contentMethod,
|
|
3909
3922
|
mapChildrenField
|
|
3910
3923
|
} = rowGroupOpts;
|
|
3911
3924
|
const groupField = row.groupField;
|
|
3912
|
-
|
|
3925
|
+
const groupContent = row.groupContent;
|
|
3913
3926
|
const childList = mapChildrenField ? row[mapChildrenField] || [] : [];
|
|
3914
|
-
const totalValue =
|
|
3927
|
+
const totalValue = row.childCount;
|
|
3915
3928
|
const colRest = fullColumnFieldData[groupField] || {};
|
|
3916
3929
|
const params = {
|
|
3917
3930
|
$table,
|
|
3918
3931
|
groupField,
|
|
3919
3932
|
groupColumn: colRest ? colRest.column : null,
|
|
3920
3933
|
column,
|
|
3921
|
-
groupValue:
|
|
3934
|
+
groupValue: groupContent,
|
|
3922
3935
|
children: childList,
|
|
3923
3936
|
totalValue: totalValue
|
|
3924
3937
|
};
|
|
3925
|
-
if (
|
|
3926
|
-
cellValue =
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3938
|
+
if (mode === 'column' ? column.field === row.groupField : rowGroupNode) {
|
|
3939
|
+
cellValue = groupContent;
|
|
3940
|
+
if (contentMethod) {
|
|
3941
|
+
cellValue = `${contentMethod(params)}`;
|
|
3942
|
+
}
|
|
3943
|
+
if (showTotal) {
|
|
3944
|
+
cellValue = cell_getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(params) : totalValue, totalValue]);
|
|
3945
|
+
}
|
|
3946
|
+
} else if (countFields && countFields.includes(field)) {
|
|
3947
|
+
if (countMethod) {
|
|
3948
|
+
cellValue = `${countMethod(params)}`;
|
|
3949
|
+
}
|
|
3930
3950
|
}
|
|
3931
3951
|
} else if (!(isRowGroupStatus && row.isAggregate)) {
|
|
3932
3952
|
cellValue = $table.getCellLabel(row, column);
|
|
@@ -4079,14 +4099,21 @@ const Cell = {
|
|
|
4079
4099
|
*/
|
|
4080
4100
|
renderDeepNodeBtn(h, params, cellVNodes) {
|
|
4081
4101
|
const {
|
|
4102
|
+
$table,
|
|
4082
4103
|
row,
|
|
4083
4104
|
column
|
|
4084
4105
|
} = params;
|
|
4085
4106
|
const {
|
|
4086
4107
|
rowGroupNode
|
|
4087
4108
|
} = column;
|
|
4088
|
-
if (
|
|
4089
|
-
|
|
4109
|
+
if (row.isAggregate) {
|
|
4110
|
+
const rowGroupOpts = $table.computeRowGroupOpts;
|
|
4111
|
+
const {
|
|
4112
|
+
mode
|
|
4113
|
+
} = rowGroupOpts;
|
|
4114
|
+
if (mode === 'column' ? column.field === row.groupField : rowGroupNode) {
|
|
4115
|
+
return [Cell.renderRowGroupBtn(h, params, cellVNodes)];
|
|
4116
|
+
}
|
|
4090
4117
|
}
|
|
4091
4118
|
return [Cell.renderTreeNodeBtn(h, params, cellVNodes)];
|
|
4092
4119
|
},
|
|
@@ -5196,7 +5223,7 @@ function handleVirtualXVisible($xeTable) {
|
|
|
5196
5223
|
}
|
|
5197
5224
|
}
|
|
5198
5225
|
let visibleSize = 0;
|
|
5199
|
-
const toVisibleIndex = Math.max(0, leftIndex < visibleColumn.length ? leftIndex - 2 : 0);
|
|
5226
|
+
const toVisibleIndex = leftIndex === visibleColumn.length ? leftIndex : Math.max(0, leftIndex < visibleColumn.length ? leftIndex - 2 : 0);
|
|
5200
5227
|
for (let cIndex = toVisibleIndex, cLen = visibleColumn.length; cIndex < cLen; cIndex++) {
|
|
5201
5228
|
const column = visibleColumn[cIndex];
|
|
5202
5229
|
const colid = column.id;
|
|
@@ -7162,7 +7189,7 @@ function handleVirtualYVisible($xeTable) {
|
|
|
7162
7189
|
rightIndex = rIndex;
|
|
7163
7190
|
}
|
|
7164
7191
|
}
|
|
7165
|
-
toVisibleIndex = Math.max(0, leftIndex < afterFullData.length ? leftIndex - 2 : 0);
|
|
7192
|
+
toVisibleIndex = leftIndex === afterFullData.length ? leftIndex : Math.max(0, leftIndex < afterFullData.length ? leftIndex - 2 : 0);
|
|
7166
7193
|
for (let rIndex = toVisibleIndex, rLen = afterFullData.length; rIndex < rLen; rIndex++) {
|
|
7167
7194
|
const row = afterFullData[rIndex];
|
|
7168
7195
|
const rowid = handleGetRowId(row);
|
|
@@ -8227,6 +8254,7 @@ function handleGroupData($xeTable, list, rowGroups) {
|
|
|
8227
8254
|
const groupField = rgItem.field;
|
|
8228
8255
|
const groupColumn = $xeTable.getColumnByField(groupField);
|
|
8229
8256
|
const groupMaps = {};
|
|
8257
|
+
const groupList = [];
|
|
8230
8258
|
const rowkey = getRowkey($xeTable);
|
|
8231
8259
|
list.forEach(row => {
|
|
8232
8260
|
const cellValue = groupColumn ? $xeTable.getCellLabel(row, groupColumn) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, groupField);
|
|
@@ -8246,8 +8274,10 @@ function handleGroupData($xeTable, list, rowGroups) {
|
|
|
8246
8274
|
fullData: childFullData,
|
|
8247
8275
|
treeData: childTreeData
|
|
8248
8276
|
} = handleGroupData($xeTable, childList, rowGroups.slice(1));
|
|
8277
|
+
const childCount = 0;
|
|
8249
8278
|
const groupRow = {
|
|
8250
8279
|
isAggregate: true,
|
|
8280
|
+
childCount,
|
|
8251
8281
|
groupContent: groupValue,
|
|
8252
8282
|
groupField,
|
|
8253
8283
|
[rowField]: getRowUniqueId(),
|
|
@@ -8262,12 +8292,24 @@ function handleGroupData($xeTable, list, rowGroups) {
|
|
|
8262
8292
|
if (indeterminateField) {
|
|
8263
8293
|
groupRow[indeterminateField] = false;
|
|
8264
8294
|
}
|
|
8295
|
+
groupList.push(groupRow);
|
|
8265
8296
|
treeData.push(groupRow);
|
|
8266
8297
|
fullData.push(groupRow);
|
|
8267
8298
|
if (childFullData.length) {
|
|
8268
8299
|
fullData.push(...childFullData);
|
|
8269
8300
|
}
|
|
8270
8301
|
});
|
|
8302
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(groupList, groupItem => {
|
|
8303
|
+
let count = 0;
|
|
8304
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(groupItem[childrenField], row => {
|
|
8305
|
+
if (row.isAggregate) {
|
|
8306
|
+
count += row[childrenField] ? row[childrenField].length : 0;
|
|
8307
|
+
} else {
|
|
8308
|
+
count++;
|
|
8309
|
+
}
|
|
8310
|
+
});
|
|
8311
|
+
groupItem.childCount = count;
|
|
8312
|
+
});
|
|
8271
8313
|
}
|
|
8272
8314
|
}
|
|
8273
8315
|
return {
|
|
@@ -27701,12 +27743,12 @@ function renderBody(h, $xeTable) {
|
|
|
27701
27743
|
computeVirtualXOpts() {
|
|
27702
27744
|
const $xeTable = this;
|
|
27703
27745
|
const props = $xeTable;
|
|
27704
|
-
return Object.assign({}, table_getConfig().table.
|
|
27746
|
+
return Object.assign({}, table_getConfig().table.virtualXConfig || table_getConfig().table.scrollX, props.virtualXConfig || props.scrollX);
|
|
27705
27747
|
},
|
|
27706
27748
|
computeVirtualYOpts() {
|
|
27707
27749
|
const $xeTable = this;
|
|
27708
27750
|
const props = $xeTable;
|
|
27709
|
-
return Object.assign({}, table_getConfig().table.
|
|
27751
|
+
return Object.assign({}, table_getConfig().table.virtualYConfig || table_getConfig().table.scrollY, props.virtualYConfig || props.scrollY);
|
|
27710
27752
|
},
|
|
27711
27753
|
computeScrollbarOpts() {
|
|
27712
27754
|
const $xeTable = this;
|