vxe-table 3.15.5 → 3.15.6

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.
Files changed (171) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/locale/lang/ar-EG.js +3 -2
  4. package/es/locale/lang/de-DE.js +3 -2
  5. package/es/locale/lang/en-US.js +2 -1
  6. package/es/locale/lang/es-ES.js +3 -2
  7. package/es/locale/lang/fr-FR.js +2 -1
  8. package/es/locale/lang/hu-HU.js +2 -1
  9. package/es/locale/lang/hy-AM.js +2 -1
  10. package/es/locale/lang/id-ID.js +2 -1
  11. package/es/locale/lang/it-IT.js +2 -1
  12. package/es/locale/lang/ja-JP.js +2 -1
  13. package/es/locale/lang/ko-KR.js +2 -1
  14. package/es/locale/lang/nb-NO.js +2 -1
  15. package/es/locale/lang/pt-BR.js +2 -1
  16. package/es/locale/lang/ru-RU.js +2 -1
  17. package/es/locale/lang/th-TH.js +2 -1
  18. package/es/locale/lang/ug-CN.js +2 -1
  19. package/es/locale/lang/uk-UA.js +2 -1
  20. package/es/locale/lang/vi-VN.js +2 -1
  21. package/es/locale/lang/zh-CHT.js +2 -1
  22. package/es/locale/lang/zh-CN.js +2 -1
  23. package/es/style.css +1 -1
  24. package/es/style.min.css +1 -1
  25. package/es/table/module/custom/mixin.js +62 -37
  26. package/es/table/module/custom/panel.js +7 -7
  27. package/es/table/module/export/mixin.js +13 -12
  28. package/es/table/module/keyboard/mixin.js +3 -2
  29. package/es/table/src/body.js +49 -16
  30. package/es/table/src/cell.js +137 -45
  31. package/es/table/src/column.js +2 -0
  32. package/es/table/src/columnInfo.js +1 -0
  33. package/es/table/src/methods.js +977 -495
  34. package/es/table/src/props.js +9 -7
  35. package/es/table/src/table.js +108 -35
  36. package/es/table/style.css +70 -40
  37. package/es/table/style.min.css +1 -1
  38. package/es/ui/index.js +13 -1
  39. package/es/ui/src/dom.js +3 -0
  40. package/es/ui/src/log.js +1 -1
  41. package/es/vxe-table/style.css +70 -40
  42. package/es/vxe-table/style.min.css +1 -1
  43. package/lib/index.css +1 -1
  44. package/lib/index.min.css +1 -1
  45. package/lib/index.umd.js +1729 -858
  46. package/lib/index.umd.min.js +1 -1
  47. package/lib/locale/lang/ar-EG.js +3 -2
  48. package/lib/locale/lang/ar-EG.min.js +1 -1
  49. package/lib/locale/lang/de-DE.js +3 -2
  50. package/lib/locale/lang/de-DE.min.js +1 -1
  51. package/lib/locale/lang/en-US.js +2 -1
  52. package/lib/locale/lang/en-US.min.js +1 -1
  53. package/lib/locale/lang/en-US.umd.js +2 -1
  54. package/lib/locale/lang/es-ES.js +3 -2
  55. package/lib/locale/lang/es-ES.min.js +1 -1
  56. package/lib/locale/lang/es-ES.umd.js +3 -2
  57. package/lib/locale/lang/fr-FR.js +2 -1
  58. package/lib/locale/lang/fr-FR.min.js +1 -1
  59. package/lib/locale/lang/hu-HU.js +2 -1
  60. package/lib/locale/lang/hu-HU.min.js +1 -1
  61. package/lib/locale/lang/hu-HU.umd.js +2 -1
  62. package/lib/locale/lang/hy-AM.js +2 -1
  63. package/lib/locale/lang/hy-AM.min.js +1 -1
  64. package/lib/locale/lang/id-ID.js +2 -1
  65. package/lib/locale/lang/id-ID.min.js +1 -1
  66. package/lib/locale/lang/it-IT.js +2 -1
  67. package/lib/locale/lang/it-IT.min.js +1 -1
  68. package/lib/locale/lang/ja-JP.js +2 -1
  69. package/lib/locale/lang/ja-JP.min.js +1 -1
  70. package/lib/locale/lang/ja-JP.umd.js +2 -1
  71. package/lib/locale/lang/ko-KR.js +2 -1
  72. package/lib/locale/lang/ko-KR.min.js +1 -1
  73. package/lib/locale/lang/ko-KR.umd.js +2 -1
  74. package/lib/locale/lang/nb-NO.js +2 -1
  75. package/lib/locale/lang/nb-NO.min.js +1 -1
  76. package/lib/locale/lang/pt-BR.js +2 -1
  77. package/lib/locale/lang/pt-BR.min.js +1 -1
  78. package/lib/locale/lang/pt-BR.umd.js +2 -1
  79. package/lib/locale/lang/ru-RU.js +2 -1
  80. package/lib/locale/lang/ru-RU.min.js +1 -1
  81. package/lib/locale/lang/ru-RU.umd.js +2 -1
  82. package/lib/locale/lang/th-TH.js +2 -1
  83. package/lib/locale/lang/th-TH.min.js +1 -1
  84. package/lib/locale/lang/ug-CN.js +2 -1
  85. package/lib/locale/lang/ug-CN.min.js +1 -1
  86. package/lib/locale/lang/uk-UA.js +2 -1
  87. package/lib/locale/lang/uk-UA.min.js +1 -1
  88. package/lib/locale/lang/uk-UA.umd.js +2 -1
  89. package/lib/locale/lang/vi-VN.js +2 -1
  90. package/lib/locale/lang/vi-VN.min.js +1 -1
  91. package/lib/locale/lang/zh-CHT.js +2 -1
  92. package/lib/locale/lang/zh-CHT.min.js +1 -1
  93. package/lib/locale/lang/zh-CHT.umd.js +2 -1
  94. package/lib/locale/lang/zh-CN.js +2 -1
  95. package/lib/locale/lang/zh-CN.min.js +1 -1
  96. package/lib/locale/lang/zh-CN.umd.js +2 -1
  97. package/lib/style.css +1 -1
  98. package/lib/style.min.css +1 -1
  99. package/lib/table/module/custom/mixin.js +74 -48
  100. package/lib/table/module/custom/mixin.min.js +1 -1
  101. package/lib/table/module/custom/panel.js +6 -2
  102. package/lib/table/module/custom/panel.min.js +1 -1
  103. package/lib/table/module/export/mixin.js +13 -5
  104. package/lib/table/module/export/mixin.min.js +1 -1
  105. package/lib/table/module/keyboard/mixin.js +2 -1
  106. package/lib/table/module/keyboard/mixin.min.js +1 -1
  107. package/lib/table/src/body.js +39 -15
  108. package/lib/table/src/body.min.js +1 -1
  109. package/lib/table/src/cell.js +157 -36
  110. package/lib/table/src/cell.min.js +1 -1
  111. package/lib/table/src/column.js +2 -0
  112. package/lib/table/src/column.min.js +1 -1
  113. package/lib/table/src/columnInfo.js +1 -0
  114. package/lib/table/src/columnInfo.min.js +1 -1
  115. package/lib/table/src/methods.js +1158 -562
  116. package/lib/table/src/methods.min.js +1 -1
  117. package/lib/table/src/props.js +9 -7
  118. package/lib/table/src/props.min.js +1 -1
  119. package/lib/table/src/table.js +104 -34
  120. package/lib/table/src/table.min.js +1 -1
  121. package/lib/table/style/style.css +70 -40
  122. package/lib/table/style/style.min.css +1 -1
  123. package/lib/ui/index.js +13 -1
  124. package/lib/ui/index.min.js +1 -1
  125. package/lib/ui/src/dom.js +4 -0
  126. package/lib/ui/src/dom.min.js +1 -1
  127. package/lib/ui/src/log.js +1 -1
  128. package/lib/ui/src/log.min.js +1 -1
  129. package/lib/vxe-table/style/style.css +70 -40
  130. package/lib/vxe-table/style/style.min.css +1 -1
  131. package/package.json +2 -2
  132. package/packages/locale/lang/ar-EG.ts +3 -2
  133. package/packages/locale/lang/de-DE.ts +3 -2
  134. package/packages/locale/lang/en-US.ts +2 -1
  135. package/packages/locale/lang/es-ES.ts +3 -2
  136. package/packages/locale/lang/fr-FR.ts +2 -1
  137. package/packages/locale/lang/hu-HU.ts +2 -1
  138. package/packages/locale/lang/hy-AM.ts +2 -1
  139. package/packages/locale/lang/id-ID.ts +2 -1
  140. package/packages/locale/lang/it-IT.ts +2 -1
  141. package/packages/locale/lang/ja-JP.ts +2 -1
  142. package/packages/locale/lang/ko-KR.ts +2 -1
  143. package/packages/locale/lang/nb-NO.ts +2 -1
  144. package/packages/locale/lang/pt-BR.ts +2 -1
  145. package/packages/locale/lang/ru-RU.ts +2 -1
  146. package/packages/locale/lang/th-TH.ts +2 -1
  147. package/packages/locale/lang/ug-CN.ts +2 -1
  148. package/packages/locale/lang/uk-UA.ts +2 -1
  149. package/packages/locale/lang/vi-VN.ts +2 -1
  150. package/packages/locale/lang/zh-CHT.ts +2 -1
  151. package/packages/locale/lang/zh-CN.ts +2 -1
  152. package/packages/table/module/custom/mixin.ts +85 -51
  153. package/packages/table/module/custom/panel.ts +8 -8
  154. package/packages/table/module/export/mixin.ts +19 -18
  155. package/packages/table/module/keyboard/mixin.ts +3 -2
  156. package/packages/table/src/body.ts +50 -17
  157. package/packages/table/src/cell.ts +136 -45
  158. package/packages/table/src/column.ts +2 -0
  159. package/packages/table/src/columnInfo.ts +1 -0
  160. package/packages/table/src/methods.ts +1010 -512
  161. package/packages/table/src/props.ts +9 -7
  162. package/packages/table/src/table.ts +122 -38
  163. package/packages/ui/index.ts +12 -0
  164. package/packages/ui/src/dom.ts +4 -0
  165. package/styles/components/table.scss +131 -92
  166. /package/es/{iconfont.1744880837792.ttf → iconfont.1745197894601.ttf} +0 -0
  167. /package/es/{iconfont.1744880837792.woff → iconfont.1745197894601.woff} +0 -0
  168. /package/es/{iconfont.1744880837792.woff2 → iconfont.1745197894601.woff2} +0 -0
  169. /package/lib/{iconfont.1744880837792.ttf → iconfont.1745197894601.ttf} +0 -0
  170. /package/lib/{iconfont.1744880837792.woff → iconfont.1745197894601.woff} +0 -0
  171. /package/lib/{iconfont.1744880837792.woff2 → iconfont.1745197894601.woff2} +0 -0
@@ -165,19 +165,21 @@ export default {
165
165
  syncResize: [Boolean, String, Number],
166
166
  // 响应式布局配置项
167
167
  resizeConfig: Object as PropType<VxeTablePropTypes.ResizeConfig>,
168
- // 列配置信息
168
+ // 列配置项
169
169
  columnConfig: Object as PropType<VxeTablePropTypes.ColumnConfig>,
170
- // 当前列配置信息
170
+ // 当前列配置项
171
171
  currentColumnConfig: Object as PropType<VxeTablePropTypes.CurrentColumnConfig>,
172
- // 单元格配置信息
172
+ // 单元格配置项
173
173
  cellConfig: Object as PropType<VxeTablePropTypes.CellConfig>,
174
- // 表头单元格配置信息
174
+ // 表头单元格配置项
175
175
  headerCellConfig: Object as PropType<VxeTablePropTypes.HeaderCellConfig>,
176
- // 表尾单元格配置信息
176
+ // 表尾单元格配置项
177
177
  footerCellConfig: Object as PropType<VxeTablePropTypes.FooterCellConfig>,
178
- // 行配置信息
178
+ // 行配置项
179
179
  rowConfig: Object as PropType<VxeTablePropTypes.RowConfig>,
180
- // 当前行配置信息
180
+ // 行分组配置项
181
+ rowGroupConfig: Object as PropType<VxeTablePropTypes.RowGroupConfig>,
182
+ // 当前行配置项
181
183
  currentRowConfig: Object as PropType<VxeTablePropTypes.CurrentRowConfig>,
182
184
  // 已废弃,被 rowDragConfig 替换
183
185
  dragConfig: Object as PropType<VxeTablePropTypes.DragConfig>,
@@ -26,7 +26,7 @@ import validatorMixin from '../module/validator/mixin'
26
26
  import customMixin from '../module/custom/mixin'
27
27
 
28
28
  import type { VxeLoadingComponent, VxeTooltipComponent, VxeTabsConstructor, VxeTabsPrivateMethods } from 'vxe-pc-ui'
29
- import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData, TableReactData } from '../../../types'
29
+ import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData, TableReactData, VxeTableDefines } from '../../../types'
30
30
 
31
31
  const { getConfig, getIcon, getI18n, renderer, globalResize, globalEvents, globalMixins, renderEmptyElement } = VxeUI
32
32
 
@@ -190,9 +190,10 @@ function renderRowExpandedVNs (h: CreateElement, $xeTable: VxeTableConstructor &
190
190
  const props = $xeTable
191
191
  const reactData = $xeTable as unknown as TableReactData
192
192
  const internalData = $xeTable as unknown as TableInternalData
193
+ const $xeGrid = $xeTable.$xeGrid
193
194
 
194
195
  const { treeConfig } = props
195
- const { expandColumn } = reactData
196
+ const { expandColumn, isRowGroupStatus } = reactData
196
197
  const tableRowExpandedList: any[] = ($xeTable as any).computeTableRowExpandedList
197
198
  const expandOpts = $xeTable.computeExpandOpts
198
199
  const { mode } = expandOpts
@@ -210,13 +211,15 @@ function renderRowExpandedVNs (h: CreateElement, $xeTable: VxeTableConstructor &
210
211
  const { handleGetRowId } = createHandleGetRowId($xeTable)
211
212
  tableRowExpandedList.forEach((row) => {
212
213
  const expandOpts = $xeTable.computeExpandOpts
213
- const { height: expandHeight, padding } = expandOpts
214
- const { fullAllDataRowIdData } = internalData
214
+ const { height: expandHeight, padding, indent } = expandOpts
215
+ const { fullAllDataRowIdData, fullColumnIdData } = internalData
215
216
  const treeOpts = $xeTable.computeTreeOpts
216
217
  const { transform, seqMode } = treeOpts
217
218
  const cellStyle: Record<string, string> = {}
218
219
  const rowid = handleGetRowId(row)
219
220
  const rowRest = fullAllDataRowIdData[rowid]
221
+ const colid = expandColumn.id
222
+ const colRest = fullColumnIdData[colid] || {}
220
223
  let rowLevel = 0
221
224
  let seq: string | number = -1
222
225
  let _rowIndex = -1
@@ -224,7 +227,7 @@ function renderRowExpandedVNs (h: CreateElement, $xeTable: VxeTableConstructor &
224
227
  let $rowIndex = -1
225
228
  if (rowRest) {
226
229
  rowLevel = rowRest.level
227
- if (treeConfig && transform && seqMode === 'increasing') {
230
+ if (isRowGroupStatus || (treeConfig && transform && seqMode === 'increasing')) {
228
231
  seq = rowRest._index + 1
229
232
  } else {
230
233
  seq = rowRest.seq
@@ -236,10 +239,39 @@ function renderRowExpandedVNs (h: CreateElement, $xeTable: VxeTableConstructor &
236
239
  if (expandHeight) {
237
240
  cellStyle.height = `${expandHeight}px`
238
241
  }
239
- if (treeConfig) {
240
- cellStyle.paddingLeft = `${(rowLevel * treeOpts.indent) + 30}px`
242
+ if (isRowGroupStatus || treeConfig) {
243
+ cellStyle.paddingLeft = `${(rowLevel * (XEUtils.isNumber(indent) ? indent : treeOpts.indent)) + 30}px`
244
+ }
245
+ let columnIndex = -1
246
+ let $columnIndex = -1
247
+ let _columnIndex = -1
248
+ if (colRest) {
249
+ columnIndex = colRest.index
250
+ $columnIndex = colRest.$index
251
+ _columnIndex = colRest._index
252
+ }
253
+ const expandParams: VxeTableDefines.CellRenderDataParams = {
254
+ $grid: $xeGrid,
255
+ $table: $xeTable,
256
+ seq,
257
+ column: expandColumn,
258
+ columnIndex,
259
+ $columnIndex,
260
+ _columnIndex,
261
+ fixed: '',
262
+ type: 'body',
263
+ level: rowLevel,
264
+ rowid,
265
+ row,
266
+ rowIndex,
267
+ $rowIndex,
268
+ _rowIndex,
269
+ isHidden: false,
270
+ isEdit: false,
271
+ visibleData: [],
272
+ data: [],
273
+ items: []
241
274
  }
242
- const expandParams = { $table: $xeTable, seq, column: expandColumn, fixed: '', type: 'body', level: rowLevel, row, rowIndex, $rowIndex, _rowIndex }
243
275
  expandVNs.push(
244
276
  h('div', {
245
277
  key: rowid,
@@ -476,6 +508,8 @@ export default {
476
508
  selectRadioRow: null,
477
509
  // 表尾合计数据
478
510
  footerTableData: [],
511
+ // 行分组列信息
512
+ rowGroupColumn: null,
479
513
  // 展开列信息
480
514
  expandColumn: null,
481
515
  hasFixedColumn: false,
@@ -627,6 +661,11 @@ export default {
627
661
  isFooter: false
628
662
  },
629
663
 
664
+ visiblwRowsFlag: 1,
665
+
666
+ isRowGroupStatus: false,
667
+
668
+ rowGroupExpandedFlag: 1,
630
669
  rowExpandedFlag: 1,
631
670
  treeExpandedFlag: 1,
632
671
  updateCheckboxFlag: 1,
@@ -824,34 +863,52 @@ export default {
824
863
  return this.computeRowOpts
825
864
  },
826
865
  computeRowOpts () {
827
- const $xeTable = this
866
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
828
867
  const props = $xeTable
829
868
 
830
869
  return Object.assign({}, getConfig().table.rowConfig, props.rowConfig)
831
870
  },
871
+ computeRowGroupOpts () {
872
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
873
+ const props = $xeTable
874
+
875
+ return Object.assign({}, getConfig().table.rowGroupConfig, props.rowGroupConfig)
876
+ },
832
877
  computeCurrentRowOpts () {
833
- const $xeTable = this
878
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
834
879
  const props = $xeTable
835
880
 
836
881
  return Object.assign({}, getConfig().table.currentRowConfig, props.currentRowConfig)
837
882
  },
838
883
  computeRowDragOpts () {
839
- return Object.assign({}, getConfig().table.rowDragConfig, this.rowDragConfig)
884
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
885
+ const props = $xeTable
886
+
887
+ return Object.assign({}, getConfig().table.rowDragConfig, props.rowDragConfig)
840
888
  },
841
889
  computeColumnDragOpts () {
842
- return Object.assign({}, getConfig().table.columnDragConfig, this.columnDragConfig)
890
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
891
+ const props = $xeTable
892
+
893
+ return Object.assign({}, getConfig().table.columnDragConfig, props.columnDragConfig)
843
894
  },
844
895
  resizeOpts () {
845
896
  return this.computeResizeOpts
846
897
  },
847
898
  computeResizeOpts () {
848
- return Object.assign({}, getConfig().table.resizeConfig, this.resizeConfig)
899
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
900
+ const props = $xeTable
901
+
902
+ return Object.assign({}, getConfig().table.resizeConfig, props.resizeConfig)
849
903
  },
850
904
  resizableOpts () {
851
905
  return this.computeResizableOpts
852
906
  },
853
907
  computeResizableOpts () {
854
- return Object.assign({}, getConfig().table.resizableConfig, this.resizableConfig)
908
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
909
+ const props = $xeTable
910
+
911
+ return Object.assign({}, getConfig().table.resizableConfig, props.resizableConfig)
855
912
  },
856
913
  seqOpts () {
857
914
  return this.computeSeqOpts
@@ -1106,20 +1163,21 @@ export default {
1106
1163
  const internalData = $xeTable as unknown as TableInternalData
1107
1164
 
1108
1165
  const { treeConfig } = props
1109
- const { rowExpandedFlag, expandColumn } = reactData
1166
+ const { rowExpandedFlag, expandColumn, rowGroupExpandedFlag, treeExpandedFlag, isRowGroupStatus } = reactData
1110
1167
  const { visibleDataRowIdData, rowExpandedMaps } = internalData
1111
1168
  const treeOpts = $xeTable.computeTreeOpts
1112
1169
  const { transform } = treeOpts
1113
1170
  const expandList: any[] = []
1114
- if (expandColumn && rowExpandedFlag) {
1115
- if (treeConfig && !transform) {
1171
+ if (expandColumn && rowExpandedFlag && rowGroupExpandedFlag && treeExpandedFlag) {
1172
+ if (isRowGroupStatus || (treeConfig && transform)) {
1173
+ XEUtils.each(rowExpandedMaps, (row, rowid) => {
1174
+ if (visibleDataRowIdData[rowid]) {
1175
+ expandList.push(row)
1176
+ }
1177
+ })
1178
+ } else {
1116
1179
  return XEUtils.values(rowExpandedMaps)
1117
1180
  }
1118
- XEUtils.each(rowExpandedMaps, (row, rowid) => {
1119
- if (visibleDataRowIdData[rowid]) {
1120
- expandList.push(row)
1121
- }
1122
- })
1123
1181
  }
1124
1182
  return expandList
1125
1183
  },
@@ -1205,6 +1263,12 @@ export default {
1205
1263
  y: overflowY && scrollYLoad
1206
1264
  }
1207
1265
  },
1266
+ computeRowGroupFields () {
1267
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
1268
+
1269
+ const rowGroupOpts = $xeTable.computeRowGroupOpts
1270
+ return rowGroupOpts.groupFields
1271
+ },
1208
1272
  tabsResizeFlag () {
1209
1273
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
1210
1274
  const $xeTabs = $xeTable.$xeTabs
@@ -1327,6 +1391,12 @@ export default {
1327
1391
  mergeFooterItems (value: any) {
1328
1392
  this.clearMergeFooterItems()
1329
1393
  this.$nextTick(() => this.setMergeFooterItems(value))
1394
+ },
1395
+
1396
+ computeRowGroupFields (val: any) {
1397
+ const $xeTable = this
1398
+
1399
+ $xeTable.handleUpdateRowGroup(val)
1330
1400
  }
1331
1401
  } as any,
1332
1402
  created () {
@@ -1383,8 +1453,16 @@ export default {
1383
1453
  // 列表完整数据、条件处理后
1384
1454
  tableFullData: [],
1385
1455
  afterFullData: [],
1456
+ afterTreeFullData: [],
1457
+ afterGroupFullData: [],
1386
1458
  // 列表条件处理后数据集合
1387
1459
  afterFullRowMaps: {},
1460
+ // 树结构完整数据、条件处理后
1461
+ tableFullTreeData: [],
1462
+ // 行分组全量数据、条件处理后
1463
+ tableFullGroupData: [],
1464
+ tableSynchData: [],
1465
+ tableSourceData: [],
1388
1466
  // 收集的列配置(带分组)
1389
1467
  collectColumn: [],
1390
1468
  // 完整所有列(不带分组)
@@ -1416,6 +1494,8 @@ export default {
1416
1494
  rowExpandedMaps: {},
1417
1495
  // 懒加载中的展开行的集合
1418
1496
  rowExpandLazyLoadedMaps: {},
1497
+ // 已展开的分组行
1498
+ rowGroupExpandedMaps: {},
1419
1499
  // 已展开树节点集合
1420
1500
  treeExpandedMaps: {},
1421
1501
  // 懒加载中的树节点的集合
@@ -1449,9 +1529,9 @@ export default {
1449
1529
  const importOpts = $xeTable.computeImportOpts
1450
1530
  const currentRowOpts = $xeTable.computeCurrentRowOpts
1451
1531
  const currentColumnOpts = $xeTable.computeCurrentColumnOpts
1452
- const virtualXOpts = $xeTable.computeVirtualXOpts
1453
- const virtualYOpts = $xeTable.computeVirtualYOpts
1454
1532
  const keyboardOpts = $xeTable.computeKeyboardOpts
1533
+ const rowGroupOpts = $xeTable.computeRowGroupOpts
1534
+ const { groupFields } = rowGroupOpts
1455
1535
 
1456
1536
  if (props.rowId) {
1457
1537
  warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField'])
@@ -1612,19 +1692,19 @@ export default {
1612
1692
  }
1613
1693
 
1614
1694
  // 如果不支持虚拟滚动
1615
- if (props.spanMethod) {
1616
- if (virtualXOpts.enabled) {
1617
- warnLog('vxe.error.notConflictProp', ['span-method', 'virtual-x-config.enabled=false'])
1618
- }
1619
- if (virtualYOpts.enabled) {
1620
- warnLog('vxe.error.notConflictProp', ['span-method', 'virtual-y-config.enabled=false'])
1621
- }
1622
- }
1623
- if (props.footerSpanMethod) {
1624
- if (virtualXOpts.enabled) {
1625
- warnLog('vxe.error.notConflictProp', ['footer-span-method', 'virtual-x-config.enabled=false'])
1626
- }
1627
- }
1695
+ // if (props.spanMethod) {
1696
+ // if (virtualXOpts.enabled) {
1697
+ // warnLog('vxe.error.notConflictProp', ['span-method', 'virtual-x-config.enabled=false'])
1698
+ // }
1699
+ // if (virtualYOpts.enabled) {
1700
+ // warnLog('vxe.error.notConflictProp', ['span-method', 'virtual-y-config.enabled=false'])
1701
+ // }
1702
+ // }
1703
+ // if (props.footerSpanMethod) {
1704
+ // if (virtualXOpts.enabled) {
1705
+ // warnLog('vxe.error.notConflictProp', ['footer-span-method', 'virtual-x-config.enabled=false'])
1706
+ // }
1707
+ // }
1628
1708
 
1629
1709
  // 检查是否有安装需要的模块
1630
1710
  if (props.editConfig && !$xeTable.insert) {
@@ -1650,6 +1730,9 @@ export default {
1650
1730
  endIndex: 1,
1651
1731
  visibleSize: 0
1652
1732
  })
1733
+
1734
+ this.handleUpdateRowGroup(groupFields)
1735
+
1653
1736
  this.loadTableData(data, true).then(() => {
1654
1737
  if (data && data.length) {
1655
1738
  this.inited = true
@@ -1778,7 +1861,7 @@ export default {
1778
1861
  const { xID } = $xeTable
1779
1862
 
1780
1863
  const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props
1781
- const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, columnStore, filterStore, customStore } = reactData
1864
+ const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore } = reactData
1782
1865
  const { leftList, rightList } = columnStore
1783
1866
  const loadingSlot = slots.loading
1784
1867
  const tableTipConfig = $xeTable.computeTableTipConfig
@@ -1819,6 +1902,7 @@ export default {
1819
1902
  'is--header': showHeader,
1820
1903
  'is--footer': showFooter,
1821
1904
  'is--group': isGroup,
1905
+ 'is-row-group': isRowGroupStatus,
1822
1906
  'is--tree-line': treeConfig && (treeOpts.showLine || treeOpts.line),
1823
1907
  'is--fixed-left': leftList.length,
1824
1908
  'is--fixed-right': rightList.length,
@@ -133,7 +133,17 @@ VxeUI.setConfig({
133
133
  // isEvery: false,
134
134
  showIcon: true
135
135
  },
136
+ rowGroupConfig: {
137
+ padding: true,
138
+ rowField: 'id',
139
+ parentField: '_X_ROW_PARENT_KEY',
140
+ childrenField: '_X_ROW_CHILDREN',
141
+ mapChildrenField: '_X_ROW_CHILD_LIST',
142
+ indent: 20,
143
+ showIcon: true
144
+ },
136
145
  treeConfig: {
146
+ padding: true,
137
147
  rowField: 'id',
138
148
  parentField: 'parentId',
139
149
  childrenField: 'children',
@@ -296,6 +306,8 @@ VxeUI.setIcon({
296
306
  TABLE_DRAG_STATUS_SUB_ROW: iconPrefix + 'add-sub',
297
307
  TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
298
308
  TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
309
+ TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
310
+ TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
299
311
 
300
312
  // toolbar
301
313
  TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
@@ -71,6 +71,10 @@ export function addClass (elem: any, cls: string) {
71
71
  }
72
72
  }
73
73
 
74
+ export function hasControlKey (evnt: KeyboardEvent | MouseEvent | DragEvent) {
75
+ return evnt.ctrlKey || evnt.metaKey
76
+ }
77
+
74
78
  export function toCssUnit (val?: number | string, unit = 'px') {
75
79
  if (XEUtils.isNumber(val) || /^\d+$/.test(`${val}`)) {
76
80
  return `${val}${unit}`
@@ -135,6 +135,7 @@
135
135
  & > .vxe-ico-picker {
136
136
  width: 100%;
137
137
  }
138
+ & > .vxe-row-group--tree-node,
138
139
  & > .vxe-cell--tree-node {
139
140
  .vxe-default-input,
140
141
  .vxe-default-textarea,
@@ -221,6 +222,7 @@
221
222
  & > .vxe-default-textarea {
222
223
  resize: none;
223
224
  }
225
+ & > .vxe-row-group--tree-node,
224
226
  & > .vxe-cell--tree-node {
225
227
  .vxe-input > .vxe-input--inner,
226
228
  .vxe-textarea > .vxe-textarea--inner {
@@ -896,84 +898,6 @@
896
898
  }
897
899
  }
898
900
  }
899
- .vxe-body--row {
900
- &.row--stripe {
901
- background-color: var(--vxe-ui-table-row-striped-background-color);
902
- }
903
- &.row--radio {
904
- background-color: var(--vxe-ui-table-row-radio-checked-background-color);
905
- }
906
- &.row--checked {
907
- background-color: var(--vxe-ui-table-row-checkbox-checked-background-color);
908
- }
909
- &.row--current {
910
- background-color: var(--vxe-ui-table-row-current-background-color);
911
- }
912
- &.row--hover {
913
- background-color: var(--vxe-ui-table-row-hover-background-color);
914
- &.row--stripe {
915
- background-color: var(--vxe-ui-table-row-hover-striped-background-color);
916
- }
917
- &.row--radio {
918
- background-color: var(--vxe-ui-table-row-hover-radio-checked-background-color);
919
- }
920
- &.row--checked {
921
- background-color: var(--vxe-ui-table-row-hover-checkbox-checked-background-color);
922
- }
923
- &.row--current {
924
- background-color: var(--vxe-ui-table-row-hover-current-background-color);
925
- }
926
- }
927
- }
928
- // &.is--tree-line {
929
- // .vxe-body--row {
930
- // &.row--stripe {
931
- // .vxe-tree--btn-wrapper {
932
- // background-color: var(--vxe-ui-table-row-striped-background-color);
933
- // }
934
- // }
935
- // &.row--radio {
936
- // .vxe-tree--btn-wrapper {
937
- // background-color: var(--vxe-ui-table-row-radio-checked-background-color);
938
- // }
939
- // }
940
- // &.row--checked {
941
- // .vxe-tree--btn-wrapper {
942
- // background-color: var(--vxe-ui-table-row-checkbox-checked-background-color);
943
- // }
944
- // }
945
- // &.row--current {
946
- // .vxe-tree--btn-wrapper {
947
- // background-color: var(--vxe-ui-table-row-current-background-color);
948
- // }
949
- // }
950
- // &.row--hover {
951
- // .vxe-tree--btn-wrapper {
952
- // background-color: var(--vxe-ui-table-row-hover-background-color);
953
- // }
954
- // &.row--stripe {
955
- // .vxe-tree--btn-wrapper {
956
- // background-color: var(--vxe-ui-table-row-hover-striped-background-color);
957
- // }
958
- // }
959
- // &.row--radio {
960
- // .vxe-tree--btn-wrapper {
961
- // background-color: var(--vxe-ui-table-row-hover-radio-checked-background-color);
962
- // }
963
- // }
964
- // &.row--checked {
965
- // .vxe-tree--btn-wrapper {
966
- // background-color: var(--vxe-ui-table-row-hover-checkbox-checked-background-color);
967
- // }
968
- // }
969
- // &.row--current {
970
- // .vxe-tree--btn-wrapper {
971
- // background-color: var(--vxe-ui-table-row-hover-current-background-color);
972
- // }
973
- // }
974
- // }
975
- // }
976
- // }
977
901
  &.col-drag--resize {
978
902
  .vxe-table--main-wrapper,
979
903
  .vxe-table--fixed-left-wrapper,
@@ -1068,7 +992,7 @@
1068
992
  text-align: left;
1069
993
  &.col--current {
1070
994
  background-color: var(--vxe-ui-table-column-current-background-color);
1071
- // .vxe-tree--btn-wrapper {
995
+ // .vxe-cell--tree-btn {
1072
996
  // background-color: var(--vxe-ui-table-column-current-background-color);
1073
997
  // }
1074
998
  }
@@ -1090,7 +1014,7 @@
1090
1014
  // .vxe-body--column,
1091
1015
  // .vxe-footer--column {
1092
1016
  // &.col--current {
1093
- // .vxe-tree--btn-wrapper {
1017
+ // .vxe-cell--tree-btn {
1094
1018
  // background-color: var(--vxe-ui-table-column-current-background-color);
1095
1019
  // }
1096
1020
  // }
@@ -1111,6 +1035,104 @@
1111
1035
  }
1112
1036
  }
1113
1037
  }
1038
+
1039
+ // 行高亮
1040
+ .vxe-body--row {
1041
+ &.row--stripe {
1042
+ & > .vxe-body--column {
1043
+ background-color: var(--vxe-ui-table-row-striped-background-color);
1044
+ }
1045
+ }
1046
+ &.row--radio {
1047
+ & > .vxe-body--column {
1048
+ background-color: var(--vxe-ui-table-row-radio-checked-background-color);
1049
+ }
1050
+ }
1051
+ &.row--checked {
1052
+ & > .vxe-body--column {
1053
+ background-color: var(--vxe-ui-table-row-checkbox-checked-background-color);
1054
+ }
1055
+ }
1056
+ &.row--current {
1057
+ & > .vxe-body--column {
1058
+ background-color: var(--vxe-ui-table-row-current-background-color);
1059
+ }
1060
+ }
1061
+ &.row--hover {
1062
+ & > .vxe-body--column {
1063
+ background-color: var(--vxe-ui-table-row-hover-background-color);
1064
+ }
1065
+ &.row--stripe {
1066
+ & > .vxe-body--column {
1067
+ background-color: var(--vxe-ui-table-row-hover-striped-background-color);
1068
+ }
1069
+ }
1070
+ &.row--radio {
1071
+ & > .vxe-body--column {
1072
+ background-color: var(--vxe-ui-table-row-hover-radio-checked-background-color);
1073
+ }
1074
+ }
1075
+ &.row--checked {
1076
+ & > .vxe-body--column {
1077
+ background-color: var(--vxe-ui-table-row-hover-checkbox-checked-background-color);
1078
+ }
1079
+ }
1080
+ &.row--current {
1081
+ & > .vxe-body--column {
1082
+ background-color: var(--vxe-ui-table-row-hover-current-background-color);
1083
+ }
1084
+ }
1085
+ }
1086
+ }
1087
+ // &.is--tree-line {
1088
+ // .vxe-body--row {
1089
+ // &.row--stripe {
1090
+ // .vxe-cell--tree-btn {
1091
+ // background-color: var(--vxe-ui-table-row-striped-background-color);
1092
+ // }
1093
+ // }
1094
+ // &.row--radio {
1095
+ // .vxe-cell--tree-btn {
1096
+ // background-color: var(--vxe-ui-table-row-radio-checked-background-color);
1097
+ // }
1098
+ // }
1099
+ // &.row--checked {
1100
+ // .vxe-cell--tree-btn {
1101
+ // background-color: var(--vxe-ui-table-row-checkbox-checked-background-color);
1102
+ // }
1103
+ // }
1104
+ // &.row--current {
1105
+ // .vxe-cell--tree-btn {
1106
+ // background-color: var(--vxe-ui-table-row-current-background-color);
1107
+ // }
1108
+ // }
1109
+ // &.row--hover {
1110
+ // .vxe-cell--tree-btn {
1111
+ // background-color: var(--vxe-ui-table-row-hover-background-color);
1112
+ // }
1113
+ // &.row--stripe {
1114
+ // .vxe-cell--tree-btn {
1115
+ // background-color: var(--vxe-ui-table-row-hover-striped-background-color);
1116
+ // }
1117
+ // }
1118
+ // &.row--radio {
1119
+ // .vxe-cell--tree-btn {
1120
+ // background-color: var(--vxe-ui-table-row-hover-radio-checked-background-color);
1121
+ // }
1122
+ // }
1123
+ // &.row--checked {
1124
+ // .vxe-cell--tree-btn {
1125
+ // background-color: var(--vxe-ui-table-row-hover-checkbox-checked-background-color);
1126
+ // }
1127
+ // }
1128
+ // &.row--current {
1129
+ // .vxe-cell--tree-btn {
1130
+ // background-color: var(--vxe-ui-table-row-hover-current-background-color);
1131
+ // }
1132
+ // }
1133
+ // }
1134
+ // }
1135
+ // }
1114
1136
 
1115
1137
  /*边框*/
1116
1138
  .vxe-table--footer-wrapper {
@@ -1607,10 +1629,28 @@
1607
1629
  border-color: var(--vxe-ui-table-tree-node-line-color);
1608
1630
  pointer-events: none;
1609
1631
  }
1632
+ .vxe-row-group--tree-node,
1610
1633
  .vxe-cell--tree-node {
1611
1634
  position: relative;
1612
1635
  }
1613
- .vxe-tree--btn-wrapper {
1636
+ .vxe-cell--tree-btn {
1637
+ &:hover {
1638
+ color: var(--vxe-ui-font-color);
1639
+ }
1640
+ & > i {
1641
+ display: block;
1642
+ color: var(--vxe-ui-font-lighten-color);
1643
+ @include baseMixin.createAnimationTransition(transform);
1644
+ // background-color: var(--vxe-ui-layout-background-color); // 影响选择行相关
1645
+ }
1646
+ }
1647
+ .vxe-row-group-cell,
1648
+ .vxe-tree-cell {
1649
+ display: block;
1650
+ padding-left: 1.5em;
1651
+ }
1652
+ .vxe-cell--tree-btn,
1653
+ .vxe-row-group--node-btn{
1614
1654
  position: absolute;
1615
1655
  top: 50%;
1616
1656
  width: 1em;
@@ -1620,27 +1660,25 @@
1620
1660
  z-index: 1;
1621
1661
  user-select: none;
1622
1662
  cursor: pointer;
1623
- // & > i {
1624
- // background-color: var(--vxe-ui-layout-background-color); // 影响选择行相关
1625
- // }
1626
1663
  }
1627
- .vxe-tree--node-btn {
1628
- display: block;
1629
- color: var(--vxe-ui-font-lighten-color);
1630
- @include baseMixin.createAnimationTransition(transform);
1664
+
1665
+ /*行分组*/
1666
+ .vxe-row-group--node-btn {
1631
1667
  &:hover {
1632
1668
  color: var(--vxe-ui-font-color);
1633
1669
  }
1634
- }
1635
- .vxe-tree-cell {
1636
- display: block;
1637
- padding-left: 1.5em;
1670
+ & > i {
1671
+ display: block;
1672
+ color: var(--vxe-ui-font-lighten-color);
1673
+ @include baseMixin.createAnimationTransition(transform);
1674
+ }
1638
1675
  }
1639
1676
 
1640
1677
  /*单元格高度*/
1641
1678
  .vxe-body--column {
1642
1679
  &.col--ellipsis {
1643
1680
  & > .vxe-cell {
1681
+ .vxe-row-group-cell,
1644
1682
  .vxe-tree-cell {
1645
1683
  overflow: hidden;
1646
1684
  text-overflow: ellipsis;
@@ -1681,6 +1719,7 @@
1681
1719
  }
1682
1720
  }
1683
1721
  }
1722
+ &.vxe-row-group-cell,
1684
1723
  &.vxe-tree-cell,
1685
1724
  &.col--vertical-top {
1686
1725
  & > .vxe-cell {