vxe-table 3.21.3 → 3.21.4
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/locale/lang/ar-EG.js +2 -2
- package/es/locale/lang/de-DE.js +1 -1
- package/es/locale/lang/en-US.js +1 -1
- package/es/locale/lang/fr-FR.js +2 -2
- package/es/locale/lang/hu-HU.js +1 -1
- package/es/locale/lang/hy-AM.js +1 -1
- package/es/locale/lang/id-ID.js +2 -2
- package/es/locale/lang/it-IT.js +1 -1
- package/es/locale/lang/ko-KR.js +1 -1
- package/es/locale/lang/ms-MY.js +2 -2
- package/es/locale/lang/nb-NO.js +2 -2
- package/es/locale/lang/pt-BR.js +2 -2
- package/es/locale/lang/th-TH.js +1 -1
- package/es/locale/lang/ug-CN.js +1 -1
- package/es/locale/lang/uk-UA.js +1 -1
- package/es/locale/lang/uz-UZ.js +1 -1
- package/es/style.css +1 -1
- package/es/table/module/export/mixin.js +71 -11
- package/es/table/src/cell.js +7 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +112 -33
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -2
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +2 -2
- package/lib/locale/lang/de-DE.js +1 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +1 -1
- package/lib/locale/lang/en-US.js +1 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -1
- package/lib/locale/lang/fr-FR.js +2 -2
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +2 -2
- package/lib/locale/lang/hu-HU.js +1 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -1
- package/lib/locale/lang/hy-AM.js +1 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +1 -1
- package/lib/locale/lang/id-ID.js +2 -2
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +2 -2
- package/lib/locale/lang/it-IT.js +1 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +1 -1
- package/lib/locale/lang/ko-KR.js +1 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -1
- package/lib/locale/lang/ms-MY.js +2 -2
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +2 -2
- package/lib/locale/lang/nb-NO.js +2 -2
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +2 -2
- package/lib/locale/lang/pt-BR.js +2 -2
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -2
- package/lib/locale/lang/th-TH.js +1 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +1 -1
- package/lib/locale/lang/ug-CN.js +1 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +1 -1
- package/lib/locale/lang/uk-UA.js +1 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -1
- package/lib/locale/lang/uz-UZ.js +1 -1
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/export/mixin.js +104 -30
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/cell.js +6 -1
- package/lib/table/src/cell.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 +1 -1
- package/packages/locale/lang/ar-EG.ts +850 -850
- package/packages/locale/lang/de-DE.ts +850 -850
- package/packages/locale/lang/en-US.ts +850 -850
- package/packages/locale/lang/es-ES.ts +850 -850
- package/packages/locale/lang/fr-FR.ts +850 -850
- package/packages/locale/lang/hu-HU.ts +850 -850
- package/packages/locale/lang/hy-AM.ts +850 -850
- package/packages/locale/lang/id-ID.ts +850 -850
- package/packages/locale/lang/it-IT.ts +850 -850
- package/packages/locale/lang/ja-JP.ts +850 -850
- package/packages/locale/lang/ko-KR.ts +850 -850
- package/packages/locale/lang/ms-MY.ts +850 -850
- package/packages/locale/lang/nb-NO.ts +850 -850
- package/packages/locale/lang/pt-BR.ts +850 -850
- package/packages/locale/lang/ru-RU.ts +850 -850
- package/packages/locale/lang/th-TH.ts +850 -850
- package/packages/locale/lang/ug-CN.ts +850 -850
- package/packages/locale/lang/uk-UA.ts +850 -850
- package/packages/locale/lang/uz-UZ.ts +850 -850
- package/packages/locale/lang/vi-VN.ts +850 -850
- package/packages/locale/lang/zh-CHT.ts +850 -850
- package/packages/table/module/export/mixin.ts +70 -12
- package/packages/table/src/cell.ts +6 -1
- /package/es/{iconfont.1779843521280.ttf → iconfont.1779936730544.ttf} +0 -0
- /package/es/{iconfont.1779843521280.woff → iconfont.1779936730544.woff} +0 -0
- /package/es/{iconfont.1779843521280.woff2 → iconfont.1779936730544.woff2} +0 -0
- /package/lib/{iconfont.1779843521280.ttf → iconfont.1779936730544.ttf} +0 -0
- /package/lib/{iconfont.1779843521280.woff → iconfont.1779936730544.woff} +0 -0
- /package/lib/{iconfont.1779843521280.woff2 → iconfont.1779936730544.woff2} +0 -0
|
@@ -48,9 +48,11 @@ const toStringValue = (cellValue) => {
|
|
|
48
48
|
function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
49
49
|
const props = $xeTable;
|
|
50
50
|
const reactData = $xeTable;
|
|
51
|
-
const
|
|
51
|
+
const internalData = $xeTable;
|
|
52
|
+
const { isTreeAllExpanded, isRowGroupAllExpanded, mode: expMode } = opts;
|
|
52
53
|
const { treeConfig } = props;
|
|
53
54
|
const { isRowGroupStatus } = reactData;
|
|
55
|
+
const { fullColumnFieldData } = internalData;
|
|
54
56
|
const radioOpts = $xeTable.computeRadioOpts;
|
|
55
57
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
56
58
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
@@ -62,8 +64,7 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
62
64
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
63
65
|
if (isRowGroupStatus) {
|
|
64
66
|
// 如果是数据分组
|
|
65
|
-
|
|
66
|
-
const { mapChildrenField } = aggregateOpts;
|
|
67
|
+
const { mode: aggMode, showTotal, totalMethod, countFields, contentMethod, formatValuesMethod, mapChildrenField } = aggregateOpts;
|
|
67
68
|
const rest = [];
|
|
68
69
|
const expandMaps = {};
|
|
69
70
|
const useMaps = {};
|
|
@@ -84,8 +85,9 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
84
85
|
_expand: hasRowChild && $xeTable.isRowExpandByRow(row)
|
|
85
86
|
};
|
|
86
87
|
columns.forEach((column, $columnIndex) => {
|
|
88
|
+
const { field, editRender, cellRender, aggFunc, rowGroupNode } = column;
|
|
87
89
|
let cellValue = '';
|
|
88
|
-
const renderOpts =
|
|
90
|
+
const renderOpts = editRender || cellRender;
|
|
89
91
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
90
92
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
91
93
|
const compConf = renderer.get(renderOpts.name);
|
|
@@ -103,21 +105,77 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
103
105
|
switch (column.type) {
|
|
104
106
|
case 'seq': {
|
|
105
107
|
const seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
106
|
-
cellValue =
|
|
108
|
+
cellValue = expMode === 'all' ? seqVal : getSeq($xeTable, seqVal, row, $rowIndex, column, $columnIndex);
|
|
107
109
|
break;
|
|
108
110
|
}
|
|
109
|
-
case 'checkbox':
|
|
111
|
+
case 'checkbox': {
|
|
110
112
|
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
111
113
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : '';
|
|
112
114
|
item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
|
|
113
115
|
break;
|
|
114
|
-
|
|
116
|
+
}
|
|
117
|
+
case 'radio': {
|
|
115
118
|
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
116
119
|
item._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : '';
|
|
117
120
|
item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
|
|
118
121
|
break;
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
}
|
|
123
|
+
default: {
|
|
124
|
+
if (field && row.isAggregate) {
|
|
125
|
+
const aggRow = row;
|
|
126
|
+
const aggData = aggRow.aggData;
|
|
127
|
+
const currAggData = aggData ? aggData[field] : null;
|
|
128
|
+
const groupField = aggRow.groupField;
|
|
129
|
+
const groupContent = aggRow.groupContent;
|
|
130
|
+
const childList = mapChildrenField ? (aggRow[mapChildrenField] || []) : [];
|
|
131
|
+
const childCount = aggRow.childCount;
|
|
132
|
+
const colRest = fullColumnFieldData[groupField] || {};
|
|
133
|
+
const ctParams = {
|
|
134
|
+
$table: $xeTable,
|
|
135
|
+
groupField,
|
|
136
|
+
groupColumn: (colRest ? colRest.column : null),
|
|
137
|
+
column,
|
|
138
|
+
groupValue: groupContent,
|
|
139
|
+
childList,
|
|
140
|
+
childCount,
|
|
141
|
+
aggValue: null,
|
|
142
|
+
/**
|
|
143
|
+
* 已废弃
|
|
144
|
+
* @deprecated
|
|
145
|
+
*/
|
|
146
|
+
children: childList,
|
|
147
|
+
/**
|
|
148
|
+
* 已废弃
|
|
149
|
+
* @deprecated
|
|
150
|
+
*/
|
|
151
|
+
totalValue: childCount
|
|
152
|
+
};
|
|
153
|
+
if (aggMode === 'column' ? field === aggRow.groupField : rowGroupNode) {
|
|
154
|
+
cellValue = groupContent;
|
|
155
|
+
if (contentMethod) {
|
|
156
|
+
cellValue = `${contentMethod(ctParams)}`;
|
|
157
|
+
}
|
|
158
|
+
if (showTotal) {
|
|
159
|
+
cellValue = getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
else if ($xeTable.getPivotTableAggregateCellAggValue) {
|
|
163
|
+
const aggParams = {
|
|
164
|
+
$table: $xeTable,
|
|
165
|
+
row,
|
|
166
|
+
column
|
|
167
|
+
};
|
|
168
|
+
cellValue = $xeTable.getPivotTableAggregateCellAggValue(aggParams);
|
|
169
|
+
}
|
|
170
|
+
else if (aggFunc === true || (countFields && countFields.includes(field))) {
|
|
171
|
+
cellValue = currAggData ? currAggData.value : childCount;
|
|
172
|
+
ctParams.aggValue = cellValue;
|
|
173
|
+
if (formatValuesMethod) {
|
|
174
|
+
cellValue = formatValuesMethod(ctParams);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else if (opts.original) {
|
|
121
179
|
cellValue = getCellValue(row, column);
|
|
122
180
|
}
|
|
123
181
|
else {
|
|
@@ -133,6 +191,8 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
133
191
|
}
|
|
134
192
|
}
|
|
135
193
|
}
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
136
196
|
}
|
|
137
197
|
}
|
|
138
198
|
item[column.id] = toStringValue(cellValue);
|
|
@@ -188,7 +248,7 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
188
248
|
switch (column.type) {
|
|
189
249
|
case 'seq': {
|
|
190
250
|
const seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
191
|
-
cellValue =
|
|
251
|
+
cellValue = expMode === 'all' ? seqVal : getSeq($xeTable, seqVal, row, $rowIndex, column, $columnIndex);
|
|
192
252
|
break;
|
|
193
253
|
}
|
|
194
254
|
case 'checkbox':
|
|
@@ -252,7 +312,7 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
252
312
|
switch (column.type) {
|
|
253
313
|
case 'seq': {
|
|
254
314
|
const seqValue = $rowIndex + 1;
|
|
255
|
-
cellValue =
|
|
315
|
+
cellValue = expMode === 'all' ? seqValue : getSeq($xeTable, seqValue, row, $rowIndex, column, $columnIndex);
|
|
256
316
|
break;
|
|
257
317
|
}
|
|
258
318
|
case 'checkbox':
|
package/es/table/src/cell.js
CHANGED
|
@@ -602,7 +602,13 @@ export const Cell = {
|
|
|
602
602
|
if (rowGroupList.length) {
|
|
603
603
|
const aggregateOpts = $table.computeAggregateOpts;
|
|
604
604
|
const { mode } = aggregateOpts;
|
|
605
|
-
if (mode === 'column'
|
|
605
|
+
if (mode === 'column') {
|
|
606
|
+
if (row.groupField && column.field === row.groupField) {
|
|
607
|
+
return [Cell.renderRowGroupBtn(h, params, cellVNodes)];
|
|
608
|
+
}
|
|
609
|
+
return cellVNodes;
|
|
610
|
+
}
|
|
611
|
+
else if (rowGroupNode) {
|
|
606
612
|
return [Cell.renderRowGroupBtn(h, params, cellVNodes)];
|
|
607
613
|
}
|
|
608
614
|
}
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -3311,7 +3311,7 @@ function getClass(property, params) {
|
|
|
3311
3311
|
/* unused harmony import specifier */ var VxeUI;
|
|
3312
3312
|
|
|
3313
3313
|
|
|
3314
|
-
const version = "3.21.
|
|
3314
|
+
const version = "3.21.4";
|
|
3315
3315
|
core_.VxeUI.version = version;
|
|
3316
3316
|
core_.VxeUI.tableVersion = version;
|
|
3317
3317
|
core_.VxeUI.setConfig({
|
|
@@ -3842,7 +3842,7 @@ var es_iterator_some = __webpack_require__(3579);
|
|
|
3842
3842
|
const {
|
|
3843
3843
|
log: log_log
|
|
3844
3844
|
} = core_.VxeUI;
|
|
3845
|
-
const log_version = `table v${"3.21.
|
|
3845
|
+
const log_version = `table v${"3.21.4"}`;
|
|
3846
3846
|
const warnLog = log_log.create('warn', log_version);
|
|
3847
3847
|
const errLog = log_log.create('error', log_version);
|
|
3848
3848
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -6123,7 +6123,12 @@ const Cell = {
|
|
|
6123
6123
|
const {
|
|
6124
6124
|
mode
|
|
6125
6125
|
} = aggregateOpts;
|
|
6126
|
-
if (mode === 'column'
|
|
6126
|
+
if (mode === 'column') {
|
|
6127
|
+
if (row.groupField && column.field === row.groupField) {
|
|
6128
|
+
return [Cell.renderRowGroupBtn(h, params, cellVNodes)];
|
|
6129
|
+
}
|
|
6130
|
+
return cellVNodes;
|
|
6131
|
+
} else if (rowGroupNode) {
|
|
6127
6132
|
return [Cell.renderRowGroupBtn(h, params, cellVNodes)];
|
|
6128
6133
|
}
|
|
6129
6134
|
}
|
|
@@ -16016,10 +16021,11 @@ const toStringValue = cellValue => {
|
|
|
16016
16021
|
function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
16017
16022
|
const props = $xeTable;
|
|
16018
16023
|
const reactData = $xeTable;
|
|
16024
|
+
const internalData = $xeTable;
|
|
16019
16025
|
const {
|
|
16020
16026
|
isTreeAllExpanded,
|
|
16021
16027
|
isRowGroupAllExpanded,
|
|
16022
|
-
mode
|
|
16028
|
+
mode: expMode
|
|
16023
16029
|
} = opts;
|
|
16024
16030
|
const {
|
|
16025
16031
|
treeConfig
|
|
@@ -16027,6 +16033,9 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
16027
16033
|
const {
|
|
16028
16034
|
isRowGroupStatus
|
|
16029
16035
|
} = reactData;
|
|
16036
|
+
const {
|
|
16037
|
+
fullColumnFieldData
|
|
16038
|
+
} = internalData;
|
|
16030
16039
|
const radioOpts = $xeTable.computeRadioOpts;
|
|
16031
16040
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
16032
16041
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
@@ -16039,9 +16048,14 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
16039
16048
|
handleGetRowId
|
|
16040
16049
|
} = createHandleGetRowId($xeTable);
|
|
16041
16050
|
if (isRowGroupStatus) {
|
|
16042
|
-
// 如果是数据分组
|
|
16043
16051
|
// 如果是数据分组
|
|
16044
16052
|
const {
|
|
16053
|
+
mode: aggMode,
|
|
16054
|
+
showTotal,
|
|
16055
|
+
totalMethod,
|
|
16056
|
+
countFields,
|
|
16057
|
+
contentMethod,
|
|
16058
|
+
formatValuesMethod,
|
|
16045
16059
|
mapChildrenField
|
|
16046
16060
|
} = aggregateOpts;
|
|
16047
16061
|
const rest = [];
|
|
@@ -16064,8 +16078,15 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
16064
16078
|
_expand: hasRowChild && $xeTable.isRowExpandByRow(row)
|
|
16065
16079
|
};
|
|
16066
16080
|
columns.forEach((column, $columnIndex) => {
|
|
16081
|
+
const {
|
|
16082
|
+
field,
|
|
16083
|
+
editRender,
|
|
16084
|
+
cellRender,
|
|
16085
|
+
aggFunc,
|
|
16086
|
+
rowGroupNode
|
|
16087
|
+
} = column;
|
|
16067
16088
|
let cellValue = '';
|
|
16068
|
-
const renderOpts =
|
|
16089
|
+
const renderOpts = editRender || cellRender;
|
|
16069
16090
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
16070
16091
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
16071
16092
|
const compConf = export_mixin_renderer.get(renderOpts.name);
|
|
@@ -16088,39 +16109,97 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
16088
16109
|
case 'seq':
|
|
16089
16110
|
{
|
|
16090
16111
|
const seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : '.').join('');
|
|
16091
|
-
cellValue =
|
|
16112
|
+
cellValue = expMode === 'all' ? seqVal : getSeq($xeTable, seqVal, row, $rowIndex, column, $columnIndex);
|
|
16092
16113
|
break;
|
|
16093
16114
|
}
|
|
16094
16115
|
case 'checkbox':
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
|
|
16101
|
-
|
|
16116
|
+
{
|
|
16117
|
+
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
16118
|
+
item._checkboxLabel = checkboxOpts.labelField ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkboxOpts.labelField) : '';
|
|
16119
|
+
item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({
|
|
16120
|
+
$table: $xeTable,
|
|
16121
|
+
row
|
|
16122
|
+
});
|
|
16123
|
+
break;
|
|
16124
|
+
}
|
|
16102
16125
|
case 'radio':
|
|
16103
|
-
|
|
16104
|
-
|
|
16105
|
-
|
|
16106
|
-
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
|
|
16126
|
+
{
|
|
16127
|
+
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
16128
|
+
item._radioLabel = radioOpts.labelField ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, radioOpts.labelField) : '';
|
|
16129
|
+
item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({
|
|
16130
|
+
$table: $xeTable,
|
|
16131
|
+
row
|
|
16132
|
+
});
|
|
16133
|
+
break;
|
|
16134
|
+
}
|
|
16110
16135
|
default:
|
|
16111
|
-
|
|
16112
|
-
|
|
16113
|
-
|
|
16114
|
-
|
|
16115
|
-
|
|
16116
|
-
|
|
16117
|
-
|
|
16136
|
+
{
|
|
16137
|
+
if (field && row.isAggregate) {
|
|
16138
|
+
const aggRow = row;
|
|
16139
|
+
const aggData = aggRow.aggData;
|
|
16140
|
+
const currAggData = aggData ? aggData[field] : null;
|
|
16141
|
+
const groupField = aggRow.groupField;
|
|
16142
|
+
const groupContent = aggRow.groupContent;
|
|
16143
|
+
const childList = mapChildrenField ? aggRow[mapChildrenField] || [] : [];
|
|
16144
|
+
const childCount = aggRow.childCount;
|
|
16145
|
+
const colRest = fullColumnFieldData[groupField] || {};
|
|
16146
|
+
const ctParams = {
|
|
16147
|
+
$table: $xeTable,
|
|
16148
|
+
groupField,
|
|
16149
|
+
groupColumn: colRest ? colRest.column : null,
|
|
16150
|
+
column,
|
|
16151
|
+
groupValue: groupContent,
|
|
16152
|
+
childList,
|
|
16153
|
+
childCount,
|
|
16154
|
+
aggValue: null,
|
|
16155
|
+
/**
|
|
16156
|
+
* 已废弃
|
|
16157
|
+
* @deprecated
|
|
16158
|
+
*/
|
|
16159
|
+
children: childList,
|
|
16160
|
+
/**
|
|
16161
|
+
* 已废弃
|
|
16162
|
+
* @deprecated
|
|
16163
|
+
*/
|
|
16164
|
+
totalValue: childCount
|
|
16165
|
+
};
|
|
16166
|
+
if (aggMode === 'column' ? field === aggRow.groupField : rowGroupNode) {
|
|
16167
|
+
cellValue = groupContent;
|
|
16168
|
+
if (contentMethod) {
|
|
16169
|
+
cellValue = `${contentMethod(ctParams)}`;
|
|
16170
|
+
}
|
|
16171
|
+
if (showTotal) {
|
|
16172
|
+
cellValue = export_mixin_getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
|
|
16173
|
+
}
|
|
16174
|
+
} else if ($xeTable.getPivotTableAggregateCellAggValue) {
|
|
16175
|
+
const aggParams = {
|
|
16176
|
+
$table: $xeTable,
|
|
16177
|
+
row,
|
|
16178
|
+
column
|
|
16179
|
+
};
|
|
16180
|
+
cellValue = $xeTable.getPivotTableAggregateCellAggValue(aggParams);
|
|
16181
|
+
} else if (aggFunc === true || countFields && countFields.includes(field)) {
|
|
16182
|
+
cellValue = currAggData ? currAggData.value : childCount;
|
|
16183
|
+
ctParams.aggValue = cellValue;
|
|
16184
|
+
if (formatValuesMethod) {
|
|
16185
|
+
cellValue = formatValuesMethod(ctParams);
|
|
16186
|
+
}
|
|
16187
|
+
}
|
|
16188
|
+
} else if (opts.original) {
|
|
16189
|
+
cellValue = getCellValue(row, column);
|
|
16118
16190
|
} else {
|
|
16119
|
-
|
|
16120
|
-
if (
|
|
16121
|
-
|
|
16191
|
+
cellValue = $xeTable.getCellLabel(row, column);
|
|
16192
|
+
if (column.type === 'html') {
|
|
16193
|
+
htmlCellElem.innerHTML = cellValue;
|
|
16194
|
+
cellValue = htmlCellElem.innerText.trim();
|
|
16195
|
+
} else {
|
|
16196
|
+
const cell = $xeTable.getCellElement(row, column);
|
|
16197
|
+
if (cell && !hasClass(cell, 'is--progress')) {
|
|
16198
|
+
cellValue = cell.innerText.trim();
|
|
16199
|
+
}
|
|
16122
16200
|
}
|
|
16123
16201
|
}
|
|
16202
|
+
break;
|
|
16124
16203
|
}
|
|
16125
16204
|
}
|
|
16126
16205
|
}
|
|
@@ -16184,7 +16263,7 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
16184
16263
|
case 'seq':
|
|
16185
16264
|
{
|
|
16186
16265
|
const seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : '.').join('');
|
|
16187
|
-
cellValue =
|
|
16266
|
+
cellValue = expMode === 'all' ? seqVal : getSeq($xeTable, seqVal, row, $rowIndex, column, $columnIndex);
|
|
16188
16267
|
break;
|
|
16189
16268
|
}
|
|
16190
16269
|
case 'checkbox':
|
|
@@ -16259,7 +16338,7 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
16259
16338
|
case 'seq':
|
|
16260
16339
|
{
|
|
16261
16340
|
const seqValue = $rowIndex + 1;
|
|
16262
|
-
cellValue =
|
|
16341
|
+
cellValue = expMode === 'all' ? seqValue : getSeq($xeTable, seqValue, row, $rowIndex, column, $columnIndex);
|
|
16263
16342
|
break;
|
|
16264
16343
|
}
|
|
16265
16344
|
case 'checkbox':
|