vxe-table 3.15.5 → 3.15.7
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/locale/lang/ar-EG.js +3 -2
- package/es/locale/lang/de-DE.js +3 -2
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +3 -2
- package/es/locale/lang/fr-FR.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +2 -1
- package/es/locale/lang/id-ID.js +2 -1
- package/es/locale/lang/it-IT.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/th-TH.js +2 -1
- package/es/locale/lang/ug-CN.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +62 -37
- package/es/table/module/custom/panel.js +7 -7
- package/es/table/module/export/mixin.js +13 -12
- package/es/table/module/keyboard/mixin.js +3 -2
- package/es/table/src/body.js +49 -16
- package/es/table/src/cell.js +137 -45
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/methods.js +983 -495
- package/es/table/src/props.js +9 -7
- package/es/table/src/table.js +108 -35
- package/es/table/style.css +70 -40
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +13 -1
- package/es/ui/src/dom.js +3 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +70 -40
- 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 +1735 -858
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +3 -2
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +3 -2
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +3 -2
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +3 -2
- package/lib/locale/lang/fr-FR.js +2 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/hy-AM.js +2 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +2 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +74 -48
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +6 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +13 -5
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +2 -1
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/body.js +39 -15
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +157 -36
- 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 +1 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +1164 -562
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +9 -7
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +104 -34
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +70 -40
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +13 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +4 -0
- package/lib/ui/src/dom.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 +70 -40
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +3 -2
- package/packages/locale/lang/de-DE.ts +3 -2
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +3 -2
- package/packages/locale/lang/fr-FR.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +2 -1
- package/packages/locale/lang/id-ID.ts +2 -1
- package/packages/locale/lang/it-IT.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/th-TH.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/custom/mixin.ts +85 -51
- package/packages/table/module/custom/panel.ts +8 -8
- package/packages/table/module/export/mixin.ts +19 -18
- package/packages/table/module/keyboard/mixin.ts +3 -2
- package/packages/table/src/body.ts +50 -17
- package/packages/table/src/cell.ts +136 -45
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/methods.ts +1016 -512
- package/packages/table/src/props.ts +9 -7
- package/packages/table/src/table.ts +122 -38
- package/packages/ui/index.ts +12 -0
- package/packages/ui/src/dom.ts +4 -0
- package/styles/components/table.scss +131 -92
- /package/es/{iconfont.1744880837792.ttf → iconfont.1745290222894.ttf} +0 -0
- /package/es/{iconfont.1744880837792.woff → iconfont.1745290222894.woff} +0 -0
- /package/es/{iconfont.1744880837792.woff2 → iconfont.1745290222894.woff2} +0 -0
- /package/lib/{iconfont.1744880837792.ttf → iconfont.1745290222894.ttf} +0 -0
- /package/lib/{iconfont.1744880837792.woff → iconfont.1745290222894.woff} +0 -0
- /package/lib/{iconfont.1744880837792.woff2 → iconfont.1745290222894.woff2} +0 -0
package/es/table/src/props.js
CHANGED
|
@@ -159,19 +159,21 @@ export default {
|
|
|
159
159
|
syncResize: [Boolean, String, Number],
|
|
160
160
|
// 响应式布局配置项
|
|
161
161
|
resizeConfig: Object,
|
|
162
|
-
//
|
|
162
|
+
// 列配置项
|
|
163
163
|
columnConfig: Object,
|
|
164
|
-
//
|
|
164
|
+
// 当前列配置项
|
|
165
165
|
currentColumnConfig: Object,
|
|
166
|
-
//
|
|
166
|
+
// 单元格配置项
|
|
167
167
|
cellConfig: Object,
|
|
168
|
-
//
|
|
168
|
+
// 表头单元格配置项
|
|
169
169
|
headerCellConfig: Object,
|
|
170
|
-
//
|
|
170
|
+
// 表尾单元格配置项
|
|
171
171
|
footerCellConfig: Object,
|
|
172
|
-
//
|
|
172
|
+
// 行配置项
|
|
173
173
|
rowConfig: Object,
|
|
174
|
-
//
|
|
174
|
+
// 行分组配置项
|
|
175
|
+
rowGroupConfig: Object,
|
|
176
|
+
// 当前行配置项
|
|
175
177
|
currentRowConfig: Object,
|
|
176
178
|
// 已废弃,被 rowDragConfig 替换
|
|
177
179
|
dragConfig: Object,
|
package/es/table/src/table.js
CHANGED
|
@@ -175,8 +175,9 @@ function renderRowExpandedVNs(h, $xeTable) {
|
|
|
175
175
|
const props = $xeTable;
|
|
176
176
|
const reactData = $xeTable;
|
|
177
177
|
const internalData = $xeTable;
|
|
178
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
178
179
|
const { treeConfig } = props;
|
|
179
|
-
const { expandColumn } = reactData;
|
|
180
|
+
const { expandColumn, isRowGroupStatus } = reactData;
|
|
180
181
|
const tableRowExpandedList = $xeTable.computeTableRowExpandedList;
|
|
181
182
|
const expandOpts = $xeTable.computeExpandOpts;
|
|
182
183
|
const { mode } = expandOpts;
|
|
@@ -193,13 +194,15 @@ function renderRowExpandedVNs(h, $xeTable) {
|
|
|
193
194
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
194
195
|
tableRowExpandedList.forEach((row) => {
|
|
195
196
|
const expandOpts = $xeTable.computeExpandOpts;
|
|
196
|
-
const { height: expandHeight, padding } = expandOpts;
|
|
197
|
-
const { fullAllDataRowIdData } = internalData;
|
|
197
|
+
const { height: expandHeight, padding, indent } = expandOpts;
|
|
198
|
+
const { fullAllDataRowIdData, fullColumnIdData } = internalData;
|
|
198
199
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
199
200
|
const { transform, seqMode } = treeOpts;
|
|
200
201
|
const cellStyle = {};
|
|
201
202
|
const rowid = handleGetRowId(row);
|
|
202
203
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
204
|
+
const colid = expandColumn.id;
|
|
205
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
203
206
|
let rowLevel = 0;
|
|
204
207
|
let seq = -1;
|
|
205
208
|
let _rowIndex = -1;
|
|
@@ -207,7 +210,7 @@ function renderRowExpandedVNs(h, $xeTable) {
|
|
|
207
210
|
let $rowIndex = -1;
|
|
208
211
|
if (rowRest) {
|
|
209
212
|
rowLevel = rowRest.level;
|
|
210
|
-
if (treeConfig && transform && seqMode === 'increasing') {
|
|
213
|
+
if (isRowGroupStatus || (treeConfig && transform && seqMode === 'increasing')) {
|
|
211
214
|
seq = rowRest._index + 1;
|
|
212
215
|
}
|
|
213
216
|
else {
|
|
@@ -220,10 +223,39 @@ function renderRowExpandedVNs(h, $xeTable) {
|
|
|
220
223
|
if (expandHeight) {
|
|
221
224
|
cellStyle.height = `${expandHeight}px`;
|
|
222
225
|
}
|
|
223
|
-
if (treeConfig) {
|
|
224
|
-
cellStyle.paddingLeft = `${(rowLevel * treeOpts.indent) + 30}px`;
|
|
226
|
+
if (isRowGroupStatus || treeConfig) {
|
|
227
|
+
cellStyle.paddingLeft = `${(rowLevel * (XEUtils.isNumber(indent) ? indent : treeOpts.indent)) + 30}px`;
|
|
225
228
|
}
|
|
226
|
-
|
|
229
|
+
let columnIndex = -1;
|
|
230
|
+
let $columnIndex = -1;
|
|
231
|
+
let _columnIndex = -1;
|
|
232
|
+
if (colRest) {
|
|
233
|
+
columnIndex = colRest.index;
|
|
234
|
+
$columnIndex = colRest.$index;
|
|
235
|
+
_columnIndex = colRest._index;
|
|
236
|
+
}
|
|
237
|
+
const expandParams = {
|
|
238
|
+
$grid: $xeGrid,
|
|
239
|
+
$table: $xeTable,
|
|
240
|
+
seq,
|
|
241
|
+
column: expandColumn,
|
|
242
|
+
columnIndex,
|
|
243
|
+
$columnIndex,
|
|
244
|
+
_columnIndex,
|
|
245
|
+
fixed: '',
|
|
246
|
+
type: 'body',
|
|
247
|
+
level: rowLevel,
|
|
248
|
+
rowid,
|
|
249
|
+
row,
|
|
250
|
+
rowIndex,
|
|
251
|
+
$rowIndex,
|
|
252
|
+
_rowIndex,
|
|
253
|
+
isHidden: false,
|
|
254
|
+
isEdit: false,
|
|
255
|
+
visibleData: [],
|
|
256
|
+
data: [],
|
|
257
|
+
items: []
|
|
258
|
+
};
|
|
227
259
|
expandVNs.push(h('div', {
|
|
228
260
|
key: rowid,
|
|
229
261
|
class: ['vxe-body--row-expanded-cell', {
|
|
@@ -450,6 +482,8 @@ export default {
|
|
|
450
482
|
selectRadioRow: null,
|
|
451
483
|
// 表尾合计数据
|
|
452
484
|
footerTableData: [],
|
|
485
|
+
// 行分组列信息
|
|
486
|
+
rowGroupColumn: null,
|
|
453
487
|
// 展开列信息
|
|
454
488
|
expandColumn: null,
|
|
455
489
|
hasFixedColumn: false,
|
|
@@ -600,6 +634,9 @@ export default {
|
|
|
600
634
|
isTitle: false,
|
|
601
635
|
isFooter: false
|
|
602
636
|
},
|
|
637
|
+
visiblwRowsFlag: 1,
|
|
638
|
+
isRowGroupStatus: false,
|
|
639
|
+
rowGroupExpandedFlag: 1,
|
|
603
640
|
rowExpandedFlag: 1,
|
|
604
641
|
treeExpandedFlag: 1,
|
|
605
642
|
updateCheckboxFlag: 1,
|
|
@@ -776,28 +813,41 @@ export default {
|
|
|
776
813
|
const props = $xeTable;
|
|
777
814
|
return Object.assign({}, getConfig().table.rowConfig, props.rowConfig);
|
|
778
815
|
},
|
|
816
|
+
computeRowGroupOpts() {
|
|
817
|
+
const $xeTable = this;
|
|
818
|
+
const props = $xeTable;
|
|
819
|
+
return Object.assign({}, getConfig().table.rowGroupConfig, props.rowGroupConfig);
|
|
820
|
+
},
|
|
779
821
|
computeCurrentRowOpts() {
|
|
780
822
|
const $xeTable = this;
|
|
781
823
|
const props = $xeTable;
|
|
782
824
|
return Object.assign({}, getConfig().table.currentRowConfig, props.currentRowConfig);
|
|
783
825
|
},
|
|
784
826
|
computeRowDragOpts() {
|
|
785
|
-
|
|
827
|
+
const $xeTable = this;
|
|
828
|
+
const props = $xeTable;
|
|
829
|
+
return Object.assign({}, getConfig().table.rowDragConfig, props.rowDragConfig);
|
|
786
830
|
},
|
|
787
831
|
computeColumnDragOpts() {
|
|
788
|
-
|
|
832
|
+
const $xeTable = this;
|
|
833
|
+
const props = $xeTable;
|
|
834
|
+
return Object.assign({}, getConfig().table.columnDragConfig, props.columnDragConfig);
|
|
789
835
|
},
|
|
790
836
|
resizeOpts() {
|
|
791
837
|
return this.computeResizeOpts;
|
|
792
838
|
},
|
|
793
839
|
computeResizeOpts() {
|
|
794
|
-
|
|
840
|
+
const $xeTable = this;
|
|
841
|
+
const props = $xeTable;
|
|
842
|
+
return Object.assign({}, getConfig().table.resizeConfig, props.resizeConfig);
|
|
795
843
|
},
|
|
796
844
|
resizableOpts() {
|
|
797
845
|
return this.computeResizableOpts;
|
|
798
846
|
},
|
|
799
847
|
computeResizableOpts() {
|
|
800
|
-
|
|
848
|
+
const $xeTable = this;
|
|
849
|
+
const props = $xeTable;
|
|
850
|
+
return Object.assign({}, getConfig().table.resizableConfig, props.resizableConfig);
|
|
801
851
|
},
|
|
802
852
|
seqOpts() {
|
|
803
853
|
return this.computeSeqOpts;
|
|
@@ -1038,20 +1088,22 @@ export default {
|
|
|
1038
1088
|
const reactData = $xeTable;
|
|
1039
1089
|
const internalData = $xeTable;
|
|
1040
1090
|
const { treeConfig } = props;
|
|
1041
|
-
const { rowExpandedFlag, expandColumn } = reactData;
|
|
1091
|
+
const { rowExpandedFlag, expandColumn, rowGroupExpandedFlag, treeExpandedFlag, isRowGroupStatus } = reactData;
|
|
1042
1092
|
const { visibleDataRowIdData, rowExpandedMaps } = internalData;
|
|
1043
1093
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
1044
1094
|
const { transform } = treeOpts;
|
|
1045
1095
|
const expandList = [];
|
|
1046
|
-
if (expandColumn && rowExpandedFlag) {
|
|
1047
|
-
if (treeConfig &&
|
|
1096
|
+
if (expandColumn && rowExpandedFlag && rowGroupExpandedFlag && treeExpandedFlag) {
|
|
1097
|
+
if (isRowGroupStatus || (treeConfig && transform)) {
|
|
1098
|
+
XEUtils.each(rowExpandedMaps, (row, rowid) => {
|
|
1099
|
+
if (visibleDataRowIdData[rowid]) {
|
|
1100
|
+
expandList.push(row);
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
else {
|
|
1048
1105
|
return XEUtils.values(rowExpandedMaps);
|
|
1049
1106
|
}
|
|
1050
|
-
XEUtils.each(rowExpandedMaps, (row, rowid) => {
|
|
1051
|
-
if (visibleDataRowIdData[rowid]) {
|
|
1052
|
-
expandList.push(row);
|
|
1053
|
-
}
|
|
1054
|
-
});
|
|
1055
1107
|
}
|
|
1056
1108
|
return expandList;
|
|
1057
1109
|
},
|
|
@@ -1132,6 +1184,11 @@ export default {
|
|
|
1132
1184
|
y: overflowY && scrollYLoad
|
|
1133
1185
|
};
|
|
1134
1186
|
},
|
|
1187
|
+
computeRowGroupFields() {
|
|
1188
|
+
const $xeTable = this;
|
|
1189
|
+
const rowGroupOpts = $xeTable.computeRowGroupOpts;
|
|
1190
|
+
return rowGroupOpts.groupFields;
|
|
1191
|
+
},
|
|
1135
1192
|
tabsResizeFlag() {
|
|
1136
1193
|
const $xeTable = this;
|
|
1137
1194
|
const $xeTabs = $xeTable.$xeTabs;
|
|
@@ -1244,6 +1301,10 @@ export default {
|
|
|
1244
1301
|
mergeFooterItems(value) {
|
|
1245
1302
|
this.clearMergeFooterItems();
|
|
1246
1303
|
this.$nextTick(() => this.setMergeFooterItems(value));
|
|
1304
|
+
},
|
|
1305
|
+
computeRowGroupFields(val) {
|
|
1306
|
+
const $xeTable = this;
|
|
1307
|
+
$xeTable.handleUpdateRowGroup(val);
|
|
1247
1308
|
}
|
|
1248
1309
|
},
|
|
1249
1310
|
created() {
|
|
@@ -1299,8 +1360,16 @@ export default {
|
|
|
1299
1360
|
// 列表完整数据、条件处理后
|
|
1300
1361
|
tableFullData: [],
|
|
1301
1362
|
afterFullData: [],
|
|
1363
|
+
afterTreeFullData: [],
|
|
1364
|
+
afterGroupFullData: [],
|
|
1302
1365
|
// 列表条件处理后数据集合
|
|
1303
1366
|
afterFullRowMaps: {},
|
|
1367
|
+
// 树结构完整数据、条件处理后
|
|
1368
|
+
tableFullTreeData: [],
|
|
1369
|
+
// 行分组全量数据、条件处理后
|
|
1370
|
+
tableFullGroupData: [],
|
|
1371
|
+
tableSynchData: [],
|
|
1372
|
+
tableSourceData: [],
|
|
1304
1373
|
// 收集的列配置(带分组)
|
|
1305
1374
|
collectColumn: [],
|
|
1306
1375
|
// 完整所有列(不带分组)
|
|
@@ -1331,6 +1400,8 @@ export default {
|
|
|
1331
1400
|
rowExpandedMaps: {},
|
|
1332
1401
|
// 懒加载中的展开行的集合
|
|
1333
1402
|
rowExpandLazyLoadedMaps: {},
|
|
1403
|
+
// 已展开的分组行
|
|
1404
|
+
rowGroupExpandedMaps: {},
|
|
1334
1405
|
// 已展开树节点集合
|
|
1335
1406
|
treeExpandedMaps: {},
|
|
1336
1407
|
// 懒加载中的树节点的集合
|
|
@@ -1362,9 +1433,9 @@ export default {
|
|
|
1362
1433
|
const importOpts = $xeTable.computeImportOpts;
|
|
1363
1434
|
const currentRowOpts = $xeTable.computeCurrentRowOpts;
|
|
1364
1435
|
const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
|
|
1365
|
-
const virtualXOpts = $xeTable.computeVirtualXOpts;
|
|
1366
|
-
const virtualYOpts = $xeTable.computeVirtualYOpts;
|
|
1367
1436
|
const keyboardOpts = $xeTable.computeKeyboardOpts;
|
|
1437
|
+
const rowGroupOpts = $xeTable.computeRowGroupOpts;
|
|
1438
|
+
const { groupFields } = rowGroupOpts;
|
|
1368
1439
|
if (props.rowId) {
|
|
1369
1440
|
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
1370
1441
|
}
|
|
@@ -1520,19 +1591,19 @@ export default {
|
|
|
1520
1591
|
warnLog('vxe.error.notConflictProp', ['column-config.isCurrent', 'current-column-config.isFollowSelected']);
|
|
1521
1592
|
}
|
|
1522
1593
|
// 如果不支持虚拟滚动
|
|
1523
|
-
if (props.spanMethod) {
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
}
|
|
1531
|
-
if (props.footerSpanMethod) {
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
}
|
|
1594
|
+
// if (props.spanMethod) {
|
|
1595
|
+
// if (virtualXOpts.enabled) {
|
|
1596
|
+
// warnLog('vxe.error.notConflictProp', ['span-method', 'virtual-x-config.enabled=false'])
|
|
1597
|
+
// }
|
|
1598
|
+
// if (virtualYOpts.enabled) {
|
|
1599
|
+
// warnLog('vxe.error.notConflictProp', ['span-method', 'virtual-y-config.enabled=false'])
|
|
1600
|
+
// }
|
|
1601
|
+
// }
|
|
1602
|
+
// if (props.footerSpanMethod) {
|
|
1603
|
+
// if (virtualXOpts.enabled) {
|
|
1604
|
+
// warnLog('vxe.error.notConflictProp', ['footer-span-method', 'virtual-x-config.enabled=false'])
|
|
1605
|
+
// }
|
|
1606
|
+
// }
|
|
1536
1607
|
// 检查是否有安装需要的模块
|
|
1537
1608
|
if (props.editConfig && !$xeTable.insert) {
|
|
1538
1609
|
errLog('vxe.error.reqModule', ['Edit']);
|
|
@@ -1556,6 +1627,7 @@ export default {
|
|
|
1556
1627
|
endIndex: 1,
|
|
1557
1628
|
visibleSize: 0
|
|
1558
1629
|
});
|
|
1630
|
+
this.handleUpdateRowGroup(groupFields);
|
|
1559
1631
|
this.loadTableData(data, true).then(() => {
|
|
1560
1632
|
if (data && data.length) {
|
|
1561
1633
|
this.inited = true;
|
|
@@ -1672,7 +1744,7 @@ export default {
|
|
|
1672
1744
|
const reactData = $xeTable;
|
|
1673
1745
|
const { xID } = $xeTable;
|
|
1674
1746
|
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props;
|
|
1675
|
-
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, columnStore, filterStore, customStore } = reactData;
|
|
1747
|
+
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore } = reactData;
|
|
1676
1748
|
const { leftList, rightList } = columnStore;
|
|
1677
1749
|
const loadingSlot = slots.loading;
|
|
1678
1750
|
const tableTipConfig = $xeTable.computeTableTipConfig;
|
|
@@ -1713,6 +1785,7 @@ export default {
|
|
|
1713
1785
|
'is--header': showHeader,
|
|
1714
1786
|
'is--footer': showFooter,
|
|
1715
1787
|
'is--group': isGroup,
|
|
1788
|
+
'is-row-group': isRowGroupStatus,
|
|
1716
1789
|
'is--tree-line': treeConfig && (treeOpts.showLine || treeOpts.line),
|
|
1717
1790
|
'is--fixed-left': leftList.length,
|
|
1718
1791
|
'is--fixed-right': rightList.length,
|
package/es/table/style.css
CHANGED
|
@@ -1824,7 +1824,16 @@
|
|
|
1824
1824
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-input, .vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-textarea, .vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-select, .vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-tree-select, .vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-date-picker, .vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-number-input, .vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-ico-picker {
|
|
1825
1825
|
width: 100%;
|
|
1826
1826
|
}
|
|
1827
|
-
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-
|
|
1827
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-default-input,
|
|
1828
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-default-textarea,
|
|
1829
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-default-select,
|
|
1830
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-input,
|
|
1831
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-textarea,
|
|
1832
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-select,
|
|
1833
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-tree-select,
|
|
1834
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-date-picker,
|
|
1835
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-number-input,
|
|
1836
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-row-group--tree-node .vxe-ico-picker, .vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-cell--tree-node .vxe-default-input,
|
|
1828
1837
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-cell--tree-node .vxe-default-textarea,
|
|
1829
1838
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-cell--tree-node .vxe-default-select,
|
|
1830
1839
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--wrapper > .vxe-cell--tree-node .vxe-input,
|
|
@@ -1919,14 +1928,20 @@
|
|
|
1919
1928
|
.vxe-table--filter-template > .vxe-default-textarea {
|
|
1920
1929
|
resize: none;
|
|
1921
1930
|
}
|
|
1922
|
-
.vxe-cell > .vxe-
|
|
1931
|
+
.vxe-cell > .vxe-row-group--tree-node .vxe-input > .vxe-input--inner,
|
|
1932
|
+
.vxe-cell > .vxe-row-group--tree-node .vxe-textarea > .vxe-textarea--inner, .vxe-cell > .vxe-cell--tree-node .vxe-input > .vxe-input--inner,
|
|
1923
1933
|
.vxe-cell > .vxe-cell--tree-node .vxe-textarea > .vxe-textarea--inner,
|
|
1934
|
+
.vxe-table--filter-template > .vxe-row-group--tree-node .vxe-input > .vxe-input--inner,
|
|
1935
|
+
.vxe-table--filter-template > .vxe-row-group--tree-node .vxe-textarea > .vxe-textarea--inner,
|
|
1924
1936
|
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-input > .vxe-input--inner,
|
|
1925
1937
|
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-textarea > .vxe-textarea--inner {
|
|
1926
1938
|
padding: 0 2px;
|
|
1927
1939
|
}
|
|
1928
|
-
.vxe-cell > .vxe-
|
|
1940
|
+
.vxe-cell > .vxe-row-group--tree-node .vxe-textarea--inner,
|
|
1941
|
+
.vxe-cell > .vxe-row-group--tree-node .vxe-default-textarea, .vxe-cell > .vxe-cell--tree-node .vxe-textarea--inner,
|
|
1929
1942
|
.vxe-cell > .vxe-cell--tree-node .vxe-default-textarea,
|
|
1943
|
+
.vxe-table--filter-template > .vxe-row-group--tree-node .vxe-textarea--inner,
|
|
1944
|
+
.vxe-table--filter-template > .vxe-row-group--tree-node .vxe-default-textarea,
|
|
1930
1945
|
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-textarea--inner,
|
|
1931
1946
|
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-default-textarea {
|
|
1932
1947
|
resize: none;
|
|
@@ -2377,6 +2392,7 @@
|
|
|
2377
2392
|
/*列宽线*/
|
|
2378
2393
|
/*边框线*/
|
|
2379
2394
|
/*树形节点*/
|
|
2395
|
+
/*行分组*/
|
|
2380
2396
|
/*单元格高度*/
|
|
2381
2397
|
/*溢出列*/
|
|
2382
2398
|
/*展开行*/
|
|
@@ -2407,33 +2423,6 @@
|
|
|
2407
2423
|
.vxe-table--render-default:not(.is--empty).is--footer.is--scroll-x .vxe-table--body-wrapper {
|
|
2408
2424
|
outline: 0;
|
|
2409
2425
|
}
|
|
2410
|
-
.vxe-table--render-default .vxe-body--row.row--stripe {
|
|
2411
|
-
background-color: var(--vxe-ui-table-row-striped-background-color);
|
|
2412
|
-
}
|
|
2413
|
-
.vxe-table--render-default .vxe-body--row.row--radio {
|
|
2414
|
-
background-color: var(--vxe-ui-table-row-radio-checked-background-color);
|
|
2415
|
-
}
|
|
2416
|
-
.vxe-table--render-default .vxe-body--row.row--checked {
|
|
2417
|
-
background-color: var(--vxe-ui-table-row-checkbox-checked-background-color);
|
|
2418
|
-
}
|
|
2419
|
-
.vxe-table--render-default .vxe-body--row.row--current {
|
|
2420
|
-
background-color: var(--vxe-ui-table-row-current-background-color);
|
|
2421
|
-
}
|
|
2422
|
-
.vxe-table--render-default .vxe-body--row.row--hover {
|
|
2423
|
-
background-color: var(--vxe-ui-table-row-hover-background-color);
|
|
2424
|
-
}
|
|
2425
|
-
.vxe-table--render-default .vxe-body--row.row--hover.row--stripe {
|
|
2426
|
-
background-color: var(--vxe-ui-table-row-hover-striped-background-color);
|
|
2427
|
-
}
|
|
2428
|
-
.vxe-table--render-default .vxe-body--row.row--hover.row--radio {
|
|
2429
|
-
background-color: var(--vxe-ui-table-row-hover-radio-checked-background-color);
|
|
2430
|
-
}
|
|
2431
|
-
.vxe-table--render-default .vxe-body--row.row--hover.row--checked {
|
|
2432
|
-
background-color: var(--vxe-ui-table-row-hover-checkbox-checked-background-color);
|
|
2433
|
-
}
|
|
2434
|
-
.vxe-table--render-default .vxe-body--row.row--hover.row--current {
|
|
2435
|
-
background-color: var(--vxe-ui-table-row-hover-current-background-color);
|
|
2436
|
-
}
|
|
2437
2426
|
.vxe-table--render-default.col-drag--resize .vxe-table--main-wrapper *,
|
|
2438
2427
|
.vxe-table--render-default.col-drag--resize .vxe-table--fixed-left-wrapper *,
|
|
2439
2428
|
.vxe-table--render-default.col-drag--resize .vxe-table--fixed-right-wrapper * {
|
|
@@ -2537,6 +2526,33 @@
|
|
|
2537
2526
|
.vxe-table--render-default .vxe-footer--column.col--ellipsis.col--right .vxe-cell {
|
|
2538
2527
|
justify-content: flex-end;
|
|
2539
2528
|
}
|
|
2529
|
+
.vxe-table--render-default .vxe-body--row.row--stripe > .vxe-body--column {
|
|
2530
|
+
background-color: var(--vxe-ui-table-row-striped-background-color);
|
|
2531
|
+
}
|
|
2532
|
+
.vxe-table--render-default .vxe-body--row.row--radio > .vxe-body--column {
|
|
2533
|
+
background-color: var(--vxe-ui-table-row-radio-checked-background-color);
|
|
2534
|
+
}
|
|
2535
|
+
.vxe-table--render-default .vxe-body--row.row--checked > .vxe-body--column {
|
|
2536
|
+
background-color: var(--vxe-ui-table-row-checkbox-checked-background-color);
|
|
2537
|
+
}
|
|
2538
|
+
.vxe-table--render-default .vxe-body--row.row--current > .vxe-body--column {
|
|
2539
|
+
background-color: var(--vxe-ui-table-row-current-background-color);
|
|
2540
|
+
}
|
|
2541
|
+
.vxe-table--render-default .vxe-body--row.row--hover > .vxe-body--column {
|
|
2542
|
+
background-color: var(--vxe-ui-table-row-hover-background-color);
|
|
2543
|
+
}
|
|
2544
|
+
.vxe-table--render-default .vxe-body--row.row--hover.row--stripe > .vxe-body--column {
|
|
2545
|
+
background-color: var(--vxe-ui-table-row-hover-striped-background-color);
|
|
2546
|
+
}
|
|
2547
|
+
.vxe-table--render-default .vxe-body--row.row--hover.row--radio > .vxe-body--column {
|
|
2548
|
+
background-color: var(--vxe-ui-table-row-hover-radio-checked-background-color);
|
|
2549
|
+
}
|
|
2550
|
+
.vxe-table--render-default .vxe-body--row.row--hover.row--checked > .vxe-body--column {
|
|
2551
|
+
background-color: var(--vxe-ui-table-row-hover-checkbox-checked-background-color);
|
|
2552
|
+
}
|
|
2553
|
+
.vxe-table--render-default .vxe-body--row.row--hover.row--current > .vxe-body--column {
|
|
2554
|
+
background-color: var(--vxe-ui-table-row-hover-current-background-color);
|
|
2555
|
+
}
|
|
2540
2556
|
.vxe-table--render-default .vxe-table--footer-wrapper {
|
|
2541
2557
|
border-top: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
|
|
2542
2558
|
}
|
|
@@ -2993,10 +3009,25 @@
|
|
|
2993
3009
|
border-color: var(--vxe-ui-table-tree-node-line-color);
|
|
2994
3010
|
pointer-events: none;
|
|
2995
3011
|
}
|
|
3012
|
+
.vxe-table--render-default .vxe-row-group--tree-node,
|
|
2996
3013
|
.vxe-table--render-default .vxe-cell--tree-node {
|
|
2997
3014
|
position: relative;
|
|
2998
3015
|
}
|
|
2999
|
-
.vxe-table--render-default .vxe-tree
|
|
3016
|
+
.vxe-table--render-default .vxe-cell--tree-btn:hover {
|
|
3017
|
+
color: var(--vxe-ui-font-color);
|
|
3018
|
+
}
|
|
3019
|
+
.vxe-table--render-default .vxe-cell--tree-btn > i {
|
|
3020
|
+
display: block;
|
|
3021
|
+
color: var(--vxe-ui-font-lighten-color);
|
|
3022
|
+
transition: transform 0.1s ease-in-out;
|
|
3023
|
+
}
|
|
3024
|
+
.vxe-table--render-default .vxe-row-group-cell,
|
|
3025
|
+
.vxe-table--render-default .vxe-tree-cell {
|
|
3026
|
+
display: block;
|
|
3027
|
+
padding-left: 1.5em;
|
|
3028
|
+
}
|
|
3029
|
+
.vxe-table--render-default .vxe-cell--tree-btn,
|
|
3030
|
+
.vxe-table--render-default .vxe-row-group--node-btn {
|
|
3000
3031
|
position: absolute;
|
|
3001
3032
|
top: 50%;
|
|
3002
3033
|
width: 1em;
|
|
@@ -3009,18 +3040,15 @@
|
|
|
3009
3040
|
user-select: none;
|
|
3010
3041
|
cursor: pointer;
|
|
3011
3042
|
}
|
|
3012
|
-
.vxe-table--render-default .vxe-
|
|
3013
|
-
display: block;
|
|
3014
|
-
color: var(--vxe-ui-font-lighten-color);
|
|
3015
|
-
transition: transform 0.1s ease-in-out;
|
|
3016
|
-
}
|
|
3017
|
-
.vxe-table--render-default .vxe-tree--node-btn:hover {
|
|
3043
|
+
.vxe-table--render-default .vxe-row-group--node-btn:hover {
|
|
3018
3044
|
color: var(--vxe-ui-font-color);
|
|
3019
3045
|
}
|
|
3020
|
-
.vxe-table--render-default .vxe-
|
|
3046
|
+
.vxe-table--render-default .vxe-row-group--node-btn > i {
|
|
3021
3047
|
display: block;
|
|
3022
|
-
|
|
3048
|
+
color: var(--vxe-ui-font-lighten-color);
|
|
3049
|
+
transition: transform 0.1s ease-in-out;
|
|
3023
3050
|
}
|
|
3051
|
+
.vxe-table--render-default .vxe-body--column.col--ellipsis > .vxe-cell .vxe-row-group-cell,
|
|
3024
3052
|
.vxe-table--render-default .vxe-body--column.col--ellipsis > .vxe-cell .vxe-tree-cell {
|
|
3025
3053
|
overflow: hidden;
|
|
3026
3054
|
text-overflow: ellipsis;
|
|
@@ -3052,9 +3080,11 @@
|
|
|
3052
3080
|
text-overflow: ellipsis;
|
|
3053
3081
|
white-space: nowrap;
|
|
3054
3082
|
}
|
|
3055
|
-
.vxe-table--render-default .vxe-header--column:not(.col--active).vxe-tree-cell > .vxe-cell > .vxe-cell--wrapper, .vxe-table--render-default .vxe-header--column:not(.col--active).col--vertical-top > .vxe-cell > .vxe-cell--wrapper,
|
|
3083
|
+
.vxe-table--render-default .vxe-header--column:not(.col--active).vxe-row-group-cell > .vxe-cell > .vxe-cell--wrapper, .vxe-table--render-default .vxe-header--column:not(.col--active).vxe-tree-cell > .vxe-cell > .vxe-cell--wrapper, .vxe-table--render-default .vxe-header--column:not(.col--active).col--vertical-top > .vxe-cell > .vxe-cell--wrapper,
|
|
3084
|
+
.vxe-table--render-default .vxe-body--column:not(.col--active).vxe-row-group-cell > .vxe-cell > .vxe-cell--wrapper,
|
|
3056
3085
|
.vxe-table--render-default .vxe-body--column:not(.col--active).vxe-tree-cell > .vxe-cell > .vxe-cell--wrapper,
|
|
3057
3086
|
.vxe-table--render-default .vxe-body--column:not(.col--active).col--vertical-top > .vxe-cell > .vxe-cell--wrapper,
|
|
3087
|
+
.vxe-table--render-default .vxe-footer--column:not(.col--active).vxe-row-group-cell > .vxe-cell > .vxe-cell--wrapper,
|
|
3058
3088
|
.vxe-table--render-default .vxe-footer--column:not(.col--active).vxe-tree-cell > .vxe-cell > .vxe-cell--wrapper,
|
|
3059
3089
|
.vxe-table--render-default .vxe-footer--column:not(.col--active).col--vertical-top > .vxe-cell > .vxe-cell--wrapper {
|
|
3060
3090
|
white-space: pre-line;
|