vxe-pc-ui 4.5.25 → 4.5.27

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 (177) hide show
  1. package/es/calendar/src/calendar.js +1 -1
  2. package/es/card/src/card.js +1 -1
  3. package/es/carousel/src/carousel.js +1 -1
  4. package/es/components.js +1 -1
  5. package/es/date-picker/src/date-picker.js +1 -1
  6. package/es/icon/style.css +1 -1
  7. package/es/image/src/image.js +1 -1
  8. package/es/image/src/preview.js +4 -4
  9. package/es/input/src/input.js +4 -5
  10. package/es/language/ar-EG.js +3 -2
  11. package/es/language/de-DE.js +3 -2
  12. package/es/language/en-US.js +2 -1
  13. package/es/language/es-ES.js +3 -2
  14. package/es/language/fr-FR.js +2 -1
  15. package/es/language/hu-HU.js +2 -1
  16. package/es/language/hy-AM.js +2 -1
  17. package/es/language/id-ID.js +2 -1
  18. package/es/language/it-IT.js +2 -1
  19. package/es/language/ja-JP.js +2 -1
  20. package/es/language/ko-KR.js +2 -1
  21. package/es/language/nb-NO.js +2 -1
  22. package/es/language/pt-BR.js +2 -1
  23. package/es/language/ru-RU.js +2 -1
  24. package/es/language/th-TH.js +2 -1
  25. package/es/language/ug-CN.js +2 -1
  26. package/es/language/uk-UA.js +2 -1
  27. package/es/language/vi-VN.js +2 -1
  28. package/es/language/zh-CHT.js +2 -1
  29. package/es/language/zh-CN.js +2 -1
  30. package/es/number-input/src/number-input.js +4 -5
  31. package/es/password-input/src/password-input.js +1 -1
  32. package/es/print/src/print.js +1 -1
  33. package/es/style.css +1 -1
  34. package/es/style.min.css +1 -1
  35. package/es/tabs/src/tabs.js +2 -2
  36. package/es/ui/index.js +1 -1
  37. package/es/ui/src/dom.js +3 -0
  38. package/es/ui/src/log.js +1 -1
  39. package/es/upload/src/upload.js +1 -1
  40. package/lib/calendar/src/calendar.js +1 -1
  41. package/lib/calendar/src/calendar.min.js +1 -1
  42. package/lib/card/src/card.js +1 -1
  43. package/lib/card/src/card.min.js +1 -1
  44. package/lib/carousel/src/carousel.js +1 -1
  45. package/lib/carousel/src/carousel.min.js +1 -1
  46. package/lib/components.js +12 -13
  47. package/lib/components.min.js +1 -1
  48. package/lib/date-picker/src/date-picker.js +1 -1
  49. package/lib/date-picker/src/date-picker.min.js +1 -1
  50. package/lib/icon/style/style.css +1 -1
  51. package/lib/icon/style/style.min.css +1 -1
  52. package/lib/image/src/image.js +1 -1
  53. package/lib/image/src/image.min.js +1 -1
  54. package/lib/image/src/preview.js +4 -4
  55. package/lib/image/src/preview.min.js +1 -1
  56. package/lib/index.umd.js +14 -12
  57. package/lib/index.umd.min.js +1 -1
  58. package/lib/input/src/input.js +3 -4
  59. package/lib/input/src/input.min.js +1 -1
  60. package/lib/language/ar-EG.js +3 -2
  61. package/lib/language/ar-EG.min.js +1 -1
  62. package/lib/language/de-DE.js +3 -2
  63. package/lib/language/de-DE.min.js +1 -1
  64. package/lib/language/en-US.js +2 -1
  65. package/lib/language/en-US.min.js +1 -1
  66. package/lib/language/en-US.umd.js +2 -1
  67. package/lib/language/es-ES.js +3 -2
  68. package/lib/language/es-ES.min.js +1 -1
  69. package/lib/language/es-ES.umd.js +3 -2
  70. package/lib/language/fr-FR.js +2 -1
  71. package/lib/language/fr-FR.min.js +1 -1
  72. package/lib/language/hu-HU.js +2 -1
  73. package/lib/language/hu-HU.min.js +1 -1
  74. package/lib/language/hu-HU.umd.js +2 -1
  75. package/lib/language/hy-AM.js +2 -1
  76. package/lib/language/hy-AM.min.js +1 -1
  77. package/lib/language/id-ID.js +2 -1
  78. package/lib/language/id-ID.min.js +1 -1
  79. package/lib/language/it-IT.js +2 -1
  80. package/lib/language/it-IT.min.js +1 -1
  81. package/lib/language/ja-JP.js +2 -1
  82. package/lib/language/ja-JP.min.js +1 -1
  83. package/lib/language/ja-JP.umd.js +2 -1
  84. package/lib/language/ko-KR.js +2 -1
  85. package/lib/language/ko-KR.min.js +1 -1
  86. package/lib/language/ko-KR.umd.js +2 -1
  87. package/lib/language/nb-NO.js +2 -1
  88. package/lib/language/nb-NO.min.js +1 -1
  89. package/lib/language/pt-BR.js +2 -1
  90. package/lib/language/pt-BR.min.js +1 -1
  91. package/lib/language/pt-BR.umd.js +2 -1
  92. package/lib/language/ru-RU.js +2 -1
  93. package/lib/language/ru-RU.min.js +1 -1
  94. package/lib/language/ru-RU.umd.js +2 -1
  95. package/lib/language/th-TH.js +2 -1
  96. package/lib/language/th-TH.min.js +1 -1
  97. package/lib/language/ug-CN.js +2 -1
  98. package/lib/language/ug-CN.min.js +1 -1
  99. package/lib/language/uk-UA.js +2 -1
  100. package/lib/language/uk-UA.min.js +1 -1
  101. package/lib/language/uk-UA.umd.js +2 -1
  102. package/lib/language/vi-VN.js +2 -1
  103. package/lib/language/vi-VN.min.js +1 -1
  104. package/lib/language/zh-CHT.js +2 -1
  105. package/lib/language/zh-CHT.min.js +1 -1
  106. package/lib/language/zh-CN.js +2 -1
  107. package/lib/language/zh-CN.min.js +1 -1
  108. package/lib/language/zh-CN.umd.js +2 -1
  109. package/lib/number-input/src/number-input.js +3 -4
  110. package/lib/number-input/src/number-input.min.js +1 -1
  111. package/lib/password-input/src/password-input.js +1 -1
  112. package/lib/password-input/src/password-input.min.js +1 -1
  113. package/lib/print/src/print.js +1 -1
  114. package/lib/print/src/print.min.js +1 -1
  115. package/lib/style.css +1 -1
  116. package/lib/style.min.css +1 -1
  117. package/lib/tabs/src/tabs.js +2 -2
  118. package/lib/tabs/src/tabs.min.js +1 -1
  119. package/lib/ui/index.js +1 -1
  120. package/lib/ui/index.min.js +1 -1
  121. package/lib/ui/src/dom.js +4 -0
  122. package/lib/ui/src/dom.min.js +1 -1
  123. package/lib/ui/src/log.js +1 -1
  124. package/lib/ui/src/log.min.js +1 -1
  125. package/lib/upload/src/upload.js +1 -1
  126. package/lib/upload/src/upload.min.js +1 -1
  127. package/package.json +1 -1
  128. package/packages/calendar/src/calendar.ts +1 -1
  129. package/packages/card/src/card.ts +1 -1
  130. package/packages/carousel/src/carousel.ts +1 -1
  131. package/packages/components.ts +1 -1
  132. package/packages/date-picker/src/date-picker.ts +1 -1
  133. package/packages/image/src/image.ts +1 -1
  134. package/packages/image/src/preview.ts +4 -4
  135. package/packages/input/src/input.ts +4 -5
  136. package/packages/language/ar-EG.ts +3 -2
  137. package/packages/language/de-DE.ts +3 -2
  138. package/packages/language/en-US.ts +2 -1
  139. package/packages/language/es-ES.ts +3 -2
  140. package/packages/language/fr-FR.ts +2 -1
  141. package/packages/language/hu-HU.ts +2 -1
  142. package/packages/language/hy-AM.ts +2 -1
  143. package/packages/language/id-ID.ts +2 -1
  144. package/packages/language/it-IT.ts +2 -1
  145. package/packages/language/ja-JP.ts +2 -1
  146. package/packages/language/ko-KR.ts +2 -1
  147. package/packages/language/nb-NO.ts +2 -1
  148. package/packages/language/pt-BR.ts +2 -1
  149. package/packages/language/ru-RU.ts +2 -1
  150. package/packages/language/th-TH.ts +2 -1
  151. package/packages/language/ug-CN.ts +2 -1
  152. package/packages/language/uk-UA.ts +2 -1
  153. package/packages/language/vi-VN.ts +2 -1
  154. package/packages/language/zh-CHT.ts +2 -1
  155. package/packages/language/zh-CN.ts +2 -1
  156. package/packages/number-input/src/number-input.ts +4 -5
  157. package/packages/password-input/src/password-input.ts +1 -1
  158. package/packages/print/src/print.ts +1 -1
  159. package/packages/tabs/src/tabs.ts +2 -2
  160. package/packages/ui/src/dom.ts +4 -0
  161. package/packages/upload/src/upload.ts +1 -1
  162. package/types/components/column.d.ts +16 -1
  163. package/types/components/grid.d.ts +4 -0
  164. package/types/components/table.d.ts +255 -56
  165. package/types/ui/global-icon.d.ts +2 -0
  166. /package/es/icon/{iconfont.1744861679657.ttf → iconfont.1745208986472.ttf} +0 -0
  167. /package/es/icon/{iconfont.1744861679657.woff → iconfont.1745208986472.woff} +0 -0
  168. /package/es/icon/{iconfont.1744861679657.woff2 → iconfont.1745208986472.woff2} +0 -0
  169. /package/es/{iconfont.1744861679657.ttf → iconfont.1745208986472.ttf} +0 -0
  170. /package/es/{iconfont.1744861679657.woff → iconfont.1745208986472.woff} +0 -0
  171. /package/es/{iconfont.1744861679657.woff2 → iconfont.1745208986472.woff2} +0 -0
  172. /package/lib/icon/style/{iconfont.1744861679657.ttf → iconfont.1745208986472.ttf} +0 -0
  173. /package/lib/icon/style/{iconfont.1744861679657.woff → iconfont.1745208986472.woff} +0 -0
  174. /package/lib/icon/style/{iconfont.1744861679657.woff2 → iconfont.1745208986472.woff2} +0 -0
  175. /package/lib/{iconfont.1744861679657.ttf → iconfont.1745208986472.ttf} +0 -0
  176. /package/lib/{iconfont.1744861679657.woff → iconfont.1745208986472.woff} +0 -0
  177. /package/lib/{iconfont.1744861679657.woff2 → iconfont.1745208986472.woff2} +0 -0
@@ -375,6 +375,78 @@ export namespace VxeTablePropTypes {
375
375
  }
376
376
  export interface RowOpts<D = any> extends RowConfig<D> { }
377
377
 
378
+ /**
379
+ * 行分组配置项
380
+ */
381
+ export interface RowGroupConfig<D = any> {
382
+ /**
383
+ * 按指定字段对数据进行分组
384
+ */
385
+ groupFields?: string[]
386
+ /**
387
+ * 是否显示边距
388
+ */
389
+ padding?: boolean
390
+ /**
391
+ * 对于同一级的节点,每次只能展开一个
392
+ */
393
+ accordion?: boolean
394
+ /**
395
+ * 分组节点的字段名
396
+ */
397
+ rowField?: string
398
+ /**
399
+ * 分组父节点的字段名
400
+ */
401
+ parentField?: string
402
+ /**
403
+ * 分组子节点的字段名
404
+ */
405
+ childrenField?: string
406
+ /**
407
+ * 分组子节点映射的字段名
408
+ */
409
+ mapChildrenField?: string
410
+ /**
411
+ * 分组节点的缩进
412
+ */
413
+ indent?: number
414
+ /**
415
+ * 触发方式
416
+ */
417
+ trigger?: 'default' | 'row' | 'cell' | 'manual' | '' | null
418
+ /**
419
+ * 是否显示图标按钮
420
+ */
421
+ showIcon?: boolean
422
+ /**
423
+ * 是否显示分组的统计
424
+ */
425
+ showTotal?: boolean
426
+ /**
427
+ * 自定义分组的统计的方法
428
+ */
429
+ totalMethod?:(params: {
430
+ $table: VxeTableConstructor<D>
431
+ groupField: VxeColumnPropTypes.Field
432
+ groupColumn: VxeTableDefines.ColumnInfo<D>
433
+ column: VxeTableDefines.ColumnInfo<D>
434
+ groupValue: any
435
+ totalValue: number
436
+ children: D[]
437
+ }) => number | string
438
+ /**
439
+ * 自定义分组单元格展示内容
440
+ */
441
+ contentMethod?:(params: {
442
+ $table: VxeTableConstructor<D>
443
+ groupField: VxeColumnPropTypes.Field
444
+ groupColumn: VxeTableDefines.ColumnInfo<D>
445
+ column: VxeTableDefines.ColumnInfo<D>
446
+ groupValue: any
447
+ }) => number | string
448
+ }
449
+
378
450
  /**
379
451
  * 当前行配置项
380
452
  */
@@ -391,8 +463,8 @@ export namespace VxeTablePropTypes {
391
463
  * 用于选中当前行执行之前的方法,返回 false 可以阻止默认行为
392
464
  */
393
465
  beforeSelectMethod?(params: {
394
- row: D
395
466
  $table: VxeTableConstructor<D>
467
+ row: D
396
468
  }): boolean
397
469
  }
398
470
 
@@ -412,8 +484,8 @@ export namespace VxeTablePropTypes {
412
484
  * 用于选中当前列执行之前的方法,返回 false 可以阻止默认行为
413
485
  */
414
486
  beforeSelectMethod?(params: {
415
- column: VxeTableDefines.ColumnInfo<D>
416
487
  $table: VxeTableConstructor<D>
488
+ column: VxeTableDefines.ColumnInfo<D>
417
489
  }): boolean
418
490
  }
419
491
 
@@ -568,6 +640,7 @@ export namespace VxeTablePropTypes {
568
640
  * 是否禁用拖拽按钮
569
641
  */
570
642
  disabledMethod?(params: {
643
+ $table: VxeTableConstructor<D>
571
644
  row: D
572
645
  column: VxeTableDefines.ColumnInfo<D>
573
646
  }): boolean
@@ -575,6 +648,7 @@ export namespace VxeTablePropTypes {
575
648
  * 是否显示拖拽按钮
576
649
  */
577
650
  visibleMethod?(params: {
651
+ $table: VxeTableConstructor<D>
578
652
  row: D
579
653
  column: VxeTableDefines.ColumnInfo<D>
580
654
  }): boolean
@@ -582,6 +656,7 @@ export namespace VxeTablePropTypes {
582
656
  * 自定义提示内容
583
657
  */
584
658
  tooltipMethod?(params: {
659
+ $table: VxeTableConstructor<D>
585
660
  row: D
586
661
  }): string | number | null
587
662
  /**
@@ -652,18 +727,21 @@ export namespace VxeTablePropTypes {
652
727
  * 是否禁用拖拽按钮
653
728
  */
654
729
  disabledMethod?(params: {
730
+ $table: VxeTableConstructor<D>
655
731
  column: VxeTableDefines.ColumnInfo<D>
656
732
  }): boolean
657
733
  /**
658
734
  * 是否显示拖拽按钮
659
735
  */
660
736
  visibleMethod?(params: {
737
+ $table: VxeTableConstructor<D>
661
738
  column: VxeTableDefines.ColumnInfo<D>
662
739
  }): boolean
663
740
  /**
664
741
  * 自定义提示内容
665
742
  */
666
743
  tooltipMethod?(params: {
744
+ $table: VxeTableConstructor<D>
667
745
  column: VxeTableDefines.ColumnInfo<D>
668
746
  }): string | number | null
669
747
  /**
@@ -699,11 +777,13 @@ export namespace VxeTablePropTypes {
699
777
  */
700
778
  storage?: boolean | VxeTableDefines.VxeTableCustomStorageObj
701
779
  restoreStore?(params: {
780
+ $table: VxeTableConstructor<D>
702
781
  id: string
703
782
  type: 'restore'
704
783
  storeData: VxeTableDefines.CustomStoreData
705
784
  }): VxeTableDefines.CustomStoreData | Promise<VxeTableDefines.CustomStoreData>
706
785
  updateStore?(params: {
786
+ $table: VxeTableConstructor<D>
707
787
  id: string
708
788
  type: 'reset' | 'confirm' | 'update:width' | 'update:fixed' | 'update:sort' | 'update:visible'
709
789
  storeData: VxeTableDefines.CustomStoreData
@@ -742,11 +822,17 @@ export namespace VxeTablePropTypes {
742
822
  /**
743
823
  * 自定义列是否允许列选中的方法,该方法的返回值用来决定这一列的 checkbox 是否可以选中
744
824
  */
745
- checkMethod?(params: { column: VxeTableDefines.ColumnInfo<D> }): boolean
825
+ checkMethod?(params: {
826
+ $table: VxeTableConstructor<D>
827
+ column: VxeTableDefines.ColumnInfo<D>
828
+ }): boolean
746
829
  /**
747
830
  * 自定义列是否的方法,该方法的返回值用来决定这一列是否显示
748
831
  */
749
- visibleMethod?(params: { column: VxeTableDefines.ColumnInfo<D> }): boolean
832
+ visibleMethod?(params: {
833
+ $table: VxeTableConstructor<D>
834
+ column: VxeTableDefines.ColumnInfo<D>
835
+ }): boolean
750
836
  allowVisible?: boolean
751
837
  allowFixed?: boolean
752
838
  allowSort?: boolean
@@ -862,6 +948,7 @@ export namespace VxeTablePropTypes {
862
948
  export interface SeqConfig<D = VxeTablePropTypes.Row> {
863
949
  startIndex?: number
864
950
  seqMethod?(params: {
951
+ $table: VxeTableConstructor<D>
865
952
  column: VxeTableDefines.ColumnInfo<D>
866
953
  columnIndex: number
867
954
  $columnIndex: number
@@ -937,6 +1024,7 @@ export namespace VxeTablePropTypes {
937
1024
  */
938
1025
  export interface FilterConfig<D = VxeTablePropTypes.Row> {
939
1026
  filterMethod?:(params: {
1027
+ $table: VxeTableConstructor<D>
940
1028
  options: VxeTableDefines.FilterOption[]
941
1029
  values: any[]
942
1030
  cellValue: any
@@ -980,9 +1068,11 @@ export namespace VxeTablePropTypes {
980
1068
  labelField?: string
981
1069
  checkRowKey?: string | number
982
1070
  checkMethod?(params: {
1071
+ $table: VxeTableConstructor<D>
983
1072
  row: D
984
1073
  }): boolean
985
1074
  visibleMethod?(params: {
1075
+ $table: VxeTableConstructor<D>
986
1076
  row: D
987
1077
  }): boolean
988
1078
  trigger?: 'default' | 'cell' | 'row' | 'manual' | '' | null
@@ -1044,12 +1134,14 @@ export namespace VxeTablePropTypes {
1044
1134
  * 是否允许勾选的方法,该方法,的返回值用来决定这一行的 checkbox 是否可以勾选
1045
1135
  */
1046
1136
  checkMethod?(params: {
1137
+ $table: VxeTableConstructor<D>
1047
1138
  row: D
1048
1139
  }): boolean
1049
1140
  /**
1050
1141
  * 是否允许勾选的方法,该方法,的返回值用来决定这一行的 checkbox 是否显示
1051
1142
  */
1052
1143
  visibleMethod?(params: {
1144
+ $table: VxeTableConstructor<D>
1053
1145
  row: D
1054
1146
  }): boolean
1055
1147
  /**
@@ -1090,6 +1182,7 @@ export namespace VxeTablePropTypes {
1090
1182
  enterDelay?: number
1091
1183
  leaveDelay?: number
1092
1184
  contentMethod?(params: {
1185
+ $table: VxeTableConstructor<D>
1093
1186
  items: any[]
1094
1187
  row: D
1095
1188
  rowIndex: number
@@ -1123,6 +1216,10 @@ export namespace VxeTablePropTypes {
1123
1216
  * 展开内容的显示模式
1124
1217
  */
1125
1218
  mode?: 'inside' | 'fixed' | '' | null
1219
+ /**
1220
+ * 当存在树结构时,展开内容的缩进,默认继承树配置
1221
+ */
1222
+ indent?: number
1126
1223
  loadMethod?(params: {
1127
1224
  $table: VxeTableConstructor<D>
1128
1225
  row: D
@@ -1171,6 +1268,10 @@ export namespace VxeTablePropTypes {
1171
1268
  * 用于 tree-config.transform,树子节点映射的字段名
1172
1269
  */
1173
1270
  mapChildrenField?: string
1271
+ /**
1272
+ * 是否显示边距
1273
+ */
1274
+ padding?: boolean
1174
1275
  /**
1175
1276
  * 树节点的缩进
1176
1277
  */
@@ -1297,6 +1398,7 @@ export namespace VxeTablePropTypes {
1297
1398
  * 该函数的返回值用来决定是否允许显示右键菜单(对于需要对菜单进行权限控制时可能会用到)
1298
1399
  */
1299
1400
  visibleMethod?(params: {
1401
+ $table: VxeTableConstructor<D>
1300
1402
  type: string
1301
1403
  options: VxeTableDefines.MenuFirstOption[][]
1302
1404
  columns: VxeTableDefines.ColumnInfo<D>[]
@@ -1347,9 +1449,9 @@ export namespace VxeTablePropTypes {
1347
1449
  * 单元格选取的方法,返回是否允许被选取
1348
1450
  */
1349
1451
  selectedMethod?(params: {
1452
+ $table: VxeTableConstructor<D>
1350
1453
  row: D
1351
1454
  column: VxeTableDefines.ColumnInfo<D>
1352
- $table: VxeTableConstructor<D>
1353
1455
  $grid: VxeGridConstructor<D> | null | undefined
1354
1456
  }): boolean
1355
1457
  /**
@@ -1427,6 +1529,7 @@ export namespace VxeTablePropTypes {
1427
1529
  * @param params
1428
1530
  */
1429
1531
  extendSetMethod?(params: {
1532
+ $table: VxeTableConstructor<D>
1430
1533
  cellValue: any
1431
1534
  row: D
1432
1535
  column: VxeTableDefines.ColumnInfo<D>
@@ -1441,6 +1544,7 @@ export namespace VxeTablePropTypes {
1441
1544
  * @param params
1442
1545
  */
1443
1546
  afterExtendSetMethod?(params: {
1547
+ $table: VxeTableConstructor<D>
1444
1548
  extendValues: any[][]
1445
1549
  } & VxeTableExtendCellAreaDefines.ExtendCellAreaCalcBaseParams<D>): void
1446
1550
  }
@@ -1520,6 +1624,7 @@ export namespace VxeTablePropTypes {
1520
1624
  * 只对 isEnter=true 有效,用于回车键执行之前的方法,返回 false 可以阻止默认行为
1521
1625
  */
1522
1626
  beforeEnterMethod?(params: {
1627
+ $table: VxeTableConstructor<D>
1523
1628
  row: D
1524
1629
  rowIndex: number
1525
1630
  $rowIndex: number
@@ -1528,12 +1633,12 @@ export namespace VxeTablePropTypes {
1528
1633
  columnIndex: number
1529
1634
  $columnIndex: number
1530
1635
  _columnIndex: number
1531
- $table: VxeTableConstructor<D>
1532
1636
  }): boolean
1533
1637
  /**
1534
1638
  * 只对 isEnter=true 有效,用于重写回车键的方法
1535
1639
  */
1536
1640
  enterMethod?(params: {
1641
+ $table: VxeTableConstructor<D>
1537
1642
  row: D
1538
1643
  rowIndex: number
1539
1644
  $rowIndex: number
@@ -1542,38 +1647,37 @@ export namespace VxeTablePropTypes {
1542
1647
  columnIndex: number
1543
1648
  $columnIndex: number
1544
1649
  _columnIndex: number
1545
- $table: VxeTableConstructor<D>
1546
1650
  }): void
1547
1651
  /**
1548
1652
  * 只对 isDel=true 有效,用于重写删除键的方法
1549
1653
  */
1550
1654
  delMethod?(params: {
1655
+ $table: VxeTableConstructor<D>
1551
1656
  row: D
1552
1657
  rowIndex: number
1553
1658
  column: VxeTableDefines.ColumnInfo<D>
1554
1659
  columnIndex: number
1555
- $table: VxeTableConstructor<D>
1556
1660
  }): void
1557
1661
  /**
1558
1662
  * 只对 isDel=true 有效,用于重写回退键清空单元格内容并激活为编辑状态方法
1559
1663
  */
1560
1664
  backMethod?(params: {
1665
+ $table: VxeTableConstructor<D>
1561
1666
  row: D
1562
1667
  rowIndex: number
1563
1668
  column: VxeTableDefines.ColumnInfo<D>
1564
1669
  columnIndex: number
1565
- $table: VxeTableConstructor<D>
1566
1670
  }): void
1567
1671
  /**
1568
1672
  * 只对 isEdit=true 有效,用于重写编辑单元格方法
1569
1673
  */
1570
1674
  editMethod?(params: {
1675
+ $table: VxeTableConstructor<D>
1676
+ $grid: VxeGridConstructor<D> | null | undefined
1571
1677
  row: D
1572
1678
  rowIndex: number
1573
1679
  column: VxeTableDefines.ColumnInfo<D>
1574
1680
  columnIndex: number
1575
- $table: VxeTableConstructor<D>
1576
- $grid: VxeGridConstructor<D> | null | undefined
1577
1681
  }): void
1578
1682
  }
1579
1683
  export interface KeyboardOpts<D = any> extends KeyboardConfig<D> { }
@@ -1622,36 +1726,38 @@ export namespace VxeTablePropTypes {
1622
1726
  * 重写单元格复制取值的方法,将单元格复制到剪贴板
1623
1727
  */
1624
1728
  copyMethod?(params: {
1729
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1730
+ $grid: VxeGridConstructor<DT> | null | undefined
1625
1731
  isCut: boolean
1626
1732
  row: DT
1627
1733
  column: VxeTableDefines.ColumnInfo<DT>
1628
1734
  cellValue: any
1629
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1630
- $grid: VxeGridConstructor<DT> | null | undefined
1631
1735
  }): string
1632
1736
  /**
1633
1737
  * 自定义单元格复制取值之前的方法,可以通过返回 false 阻止复制行为
1634
1738
  */
1635
1739
  beforeCopyMethod?(params: {
1740
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1741
+ $grid: VxeGridConstructor<DT> | null | undefined
1636
1742
  isCut: boolean
1637
1743
  activeArea: VxeTableExtendCellAreaDefines.MouseActiveCellArea
1638
1744
  targetAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1639
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1640
- $grid: VxeGridConstructor<DT> | null | undefined
1641
1745
  }): boolean
1642
1746
  /**
1643
1747
  * 自定义单元格复制到剪贴板之后的方法
1644
1748
  */
1645
1749
  afterCopyMethod?(params: {
1646
- isCut: boolean
1647
- targetAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1648
1750
  $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1649
1751
  $grid: VxeGridConstructor<DT> | null | undefined
1752
+ isCut: boolean
1753
+ targetAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1650
1754
  }): boolean
1651
1755
  /**
1652
1756
  * 重写单元格剪贴值清除的方法,将剪贴单元格的值清除
1653
1757
  */
1654
1758
  cutMethod?:(params: {
1759
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1760
+ $grid: VxeGridConstructor<DT> | null | undefined
1655
1761
  row: DT,
1656
1762
  column: VxeTableDefines.ColumnInfo<DT>
1657
1763
  cellValue: any
@@ -1659,13 +1765,13 @@ export namespace VxeTablePropTypes {
1659
1765
  text?: string
1660
1766
  html?: string
1661
1767
  }
1662
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1663
- $grid: VxeGridConstructor<DT> | null | undefined
1664
1768
  }) => void
1665
1769
  /**
1666
1770
  * 自定义单元格剪贴值清除之前的方法,可以通过返回 false 阻止清除行为
1667
1771
  */
1668
1772
  beforeCutMethod?:(params: {
1773
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1774
+ $grid: VxeGridConstructor<DT> | null | undefined
1669
1775
  activeArea: VxeTableExtendCellAreaDefines.MouseActiveCellArea
1670
1776
  cutAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1671
1777
  currentAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
@@ -1673,22 +1779,22 @@ export namespace VxeTablePropTypes {
1673
1779
  text?: string
1674
1780
  html?: string
1675
1781
  }
1676
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1677
- $grid: VxeGridConstructor<DT> | null | undefined
1678
1782
  }) => boolean
1679
1783
  /**
1680
1784
  * 自定义单元格剪贴值清除之后的方法
1681
1785
  */
1682
1786
  afterCutMethod?:(params: {
1683
- cutAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1684
- currentAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1685
1787
  $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1686
1788
  $grid: VxeGridConstructor<DT> | null | undefined
1789
+ cutAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1790
+ currentAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1687
1791
  }) => void
1688
1792
  /**
1689
1793
  * 重写单元格粘贴赋值的方法,从剪贴板赋值到单元格
1690
1794
  */
1691
1795
  pasteMethod?(params: {
1796
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1797
+ $grid: VxeGridConstructor<DT> | null | undefined
1692
1798
  isCut: boolean
1693
1799
  row: DT,
1694
1800
  column: VxeTableDefines.ColumnInfo<DT>
@@ -1697,13 +1803,13 @@ export namespace VxeTablePropTypes {
1697
1803
  text?: string
1698
1804
  html?: string
1699
1805
  }
1700
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1701
- $grid: VxeGridConstructor<DT> | null | undefined
1702
1806
  }): void
1703
1807
  /**
1704
1808
  * 自定义单元格粘贴赋值之前的方法,可以通过返回 false 阻止复制行为
1705
1809
  */
1706
1810
  beforePasteMethod?(params: {
1811
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1812
+ $grid: VxeGridConstructor<DT> | null | undefined
1707
1813
  isCut: boolean
1708
1814
  activeArea: VxeTableExtendCellAreaDefines.MouseActiveCellArea
1709
1815
  cutAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
@@ -1715,13 +1821,13 @@ export namespace VxeTablePropTypes {
1715
1821
  text?: string
1716
1822
  html?: string
1717
1823
  }
1718
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1719
- $grid: VxeGridConstructor<DT> | null | undefined
1720
1824
  }): boolean
1721
1825
  /**
1722
1826
  * 自定义单元格粘贴赋值之后的方法
1723
1827
  */
1724
1828
  afterPasteMethod?(params: {
1829
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1830
+ $grid: VxeGridConstructor<DT> | null | undefined
1725
1831
  isCut: boolean
1726
1832
  currentAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1727
1833
  cutAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
@@ -1730,32 +1836,30 @@ export namespace VxeTablePropTypes {
1730
1836
  pasteCells: string[][]
1731
1837
  insertRows: DT[]
1732
1838
  insertColumns: VxeTableDefines.ColumnInfo<DT>[]
1733
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1734
- $grid: VxeGridConstructor<DT> | null | undefined
1735
1839
  }): boolean
1736
1840
  /**
1737
1841
  * 只对 isRowIncrement 有效,自定义创建自增行数据的方法
1738
1842
  */
1739
1843
  createRowsMethod?(params: {
1844
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1845
+ $grid: VxeGridConstructor<DT> | null | undefined
1740
1846
  currentAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1741
1847
  targetAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1742
1848
  cellValues: any[][]
1743
1849
  pasteCells: string[][]
1744
1850
  insertRows: DT[]
1745
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1746
- $grid: VxeGridConstructor<DT> | null | undefined
1747
1851
  }): DT[]
1748
1852
  /**
1749
1853
  * 只对 isColumnIncrement 有效,自定义创建自增列配置的方法
1750
1854
  */
1751
1855
  createColumnsMethod?(params: {
1856
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1857
+ $grid: VxeGridConstructor<DT> | null | undefined
1752
1858
  currentAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1753
1859
  targetAreas: VxeTableExtendCellAreaDefines.CellAreaParams<DT>[]
1754
1860
  cellValues: any[][]
1755
1861
  pasteCells: string[][]
1756
1862
  insertColumns: VxeTableDefines.ColumnOptions[]
1757
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1758
- $grid: VxeGridConstructor<DT> | null | undefined
1759
1863
  }): VxeTableDefines.ColumnOptions<DT>[]
1760
1864
  }
1761
1865
  export interface ClipOpts<D = any> extends ClipConfig<D> { }
@@ -1772,6 +1876,8 @@ export namespace VxeTablePropTypes {
1772
1876
  * 自定义单元格查找方法
1773
1877
  */
1774
1878
  findMethod?(params: {
1879
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1880
+ $grid: VxeGridConstructor<DT> | null | undefined
1775
1881
  cellValue: any
1776
1882
  row: DT
1777
1883
  column: VxeTableDefines.ColumnInfo<DT>
@@ -1785,20 +1891,20 @@ export namespace VxeTablePropTypes {
1785
1891
  * 自定义单元格查找之前的方法,可以通过返回 false 阻止查找行为
1786
1892
  */
1787
1893
  beforeFindMethod?(params: {
1788
- isAll: boolean
1789
- findValue: string | null
1790
1894
  $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1791
1895
  $grid: VxeGridConstructor<DT> | null | undefined
1896
+ isAll: boolean
1897
+ findValue: string | null
1792
1898
  }): boolean
1793
1899
  /**
1794
1900
  * 自定义单元格查找之后的方法
1795
1901
  */
1796
1902
  afterFindMethod?(params: {
1903
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1904
+ $grid: VxeGridConstructor<DT> | null | undefined
1797
1905
  isAll: boolean
1798
1906
  findValue: string | null
1799
1907
  result: VxeTableExtendCellAreaDefines.FindAndReplaceResult[]
1800
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1801
- $grid: VxeGridConstructor<DT> | null | undefined
1802
1908
  }): void
1803
1909
  /**
1804
1910
  * 是否启用替换功能
@@ -1808,6 +1914,8 @@ export namespace VxeTablePropTypes {
1808
1914
  * 自定义单元格替换方法
1809
1915
  */
1810
1916
  replaceMethod?:(params: {
1917
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1918
+ $grid: VxeGridConstructor<DT> | null | undefined
1811
1919
  row: DT
1812
1920
  column: VxeTableDefines.ColumnInfo<DT>
1813
1921
  cellValue: any
@@ -1818,22 +1926,22 @@ export namespace VxeTablePropTypes {
1818
1926
  * 自定义单元格替换之前的方法,可以通过返回 false 阻止替换行为
1819
1927
  */
1820
1928
  beforeReplaceMethod?:(params: {
1929
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1930
+ $grid: VxeGridConstructor<DT> | null | undefined
1821
1931
  isAll: boolean
1822
1932
  findValue: string
1823
1933
  replaceValue: string
1824
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1825
- $grid: VxeGridConstructor<DT> | null | undefined
1826
1934
  }) => boolean
1827
1935
  /**
1828
1936
  * 自定义单元格替换之后的方法
1829
1937
  */
1830
1938
  afterReplaceMethod?:(params: {
1939
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1940
+ $grid: VxeGridConstructor<DT> | null | undefined
1831
1941
  isAll: boolean
1832
1942
  findValue: string
1833
1943
  replaceValue: string
1834
1944
  result: VxeTableExtendCellAreaDefines.FindAndReplaceResult[]
1835
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1836
- $grid: VxeGridConstructor<DT> | null | undefined
1837
1945
  }) => void
1838
1946
  }
1839
1947
  export interface FNROpts<D = any> extends FNRConfig<D> { }
@@ -1899,23 +2007,23 @@ export namespace VxeTablePropTypes {
1899
2007
  * 自定义编辑之前逻辑,该方法的返回值用来决定该单元格是否允许编辑
1900
2008
  */
1901
2009
  beforeEditMethod?(params: {
2010
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
2011
+ $grid: VxeGridConstructor<DT> | null | undefined
1902
2012
  row: DT
1903
2013
  rowIndex: number
1904
2014
  column: VxeTableDefines.ColumnInfo<DT>
1905
2015
  columnIndex: number
1906
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1907
- $grid: VxeGridConstructor<DT> | null | undefined
1908
2016
  }): boolean
1909
2017
  /**
1910
2018
  * 自定义编辑之后逻辑
1911
2019
  */
1912
2020
  afterEditMethod?(params: {
2021
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
2022
+ $grid: VxeGridConstructor<DT> | null | undefined
1913
2023
  row: DT
1914
2024
  rowIndex: number
1915
2025
  column: VxeTableDefines.ColumnInfo<DT>
1916
2026
  columnIndex: number
1917
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1918
- $grid: VxeGridConstructor<DT> | null | undefined
1919
2027
  }): void
1920
2028
 
1921
2029
  /**
@@ -1923,12 +2031,12 @@ export namespace VxeTablePropTypes {
1923
2031
  * @deprecated
1924
2032
  */
1925
2033
  activeMethod?(params: {
2034
+ $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
2035
+ $grid: VxeGridConstructor<DT> | null | undefined
1926
2036
  row: DT
1927
2037
  rowIndex: number
1928
2038
  column: VxeTableDefines.ColumnInfo<DT>
1929
2039
  columnIndex: number
1930
- $table: VxeTableConstructor<DT> & VxeTablePrivateMethods<DT>
1931
- $grid: VxeGridConstructor<DT> | null | undefined
1932
2040
  }): boolean
1933
2041
  }
1934
2042
  export interface EditOpts<D = any> extends EditConfig<D> { }
@@ -2369,15 +2477,27 @@ export namespace VxeTablePropTypes {
2369
2477
  /**
2370
2478
  * 列过滤方法
2371
2479
  */
2372
- columnFilterMethod?(params: { column: VxeTableDefines.ColumnInfo, $columnIndex: number }): boolean
2480
+ columnFilterMethod?(params: {
2481
+ $table: VxeTableConstructor
2482
+ column: VxeTableDefines.ColumnInfo
2483
+ $columnIndex: number
2484
+ }): boolean
2373
2485
  /**
2374
2486
  * 数据过滤方法
2375
2487
  */
2376
- dataFilterMethod?(params: { row: any, $rowIndex: number }): boolean
2488
+ dataFilterMethod?(params: {
2489
+ $table: VxeTableConstructor
2490
+ row: any
2491
+ $rowIndex: number
2492
+ }): boolean
2377
2493
  /**
2378
2494
  * 表尾过滤方法
2379
2495
  */
2380
- footerFilterMethod?(params: { items: any[], $rowIndex: number }): boolean
2496
+ footerFilterMethod?(params: {
2497
+ $table: VxeTableConstructor
2498
+ items: any[]
2499
+ $rowIndex: number
2500
+ }): boolean
2381
2501
  /**
2382
2502
  * 是否服务端导出
2383
2503
  */
@@ -2510,15 +2630,27 @@ export namespace VxeTablePropTypes {
2510
2630
  /**
2511
2631
  * 列过滤方法
2512
2632
  */
2513
- columnFilterMethod?(params: { column: VxeTableDefines.ColumnInfo, $columnIndex: number }): boolean
2633
+ columnFilterMethod?(params: {
2634
+ $table: VxeTableConstructor
2635
+ column: VxeTableDefines.ColumnInfo
2636
+ $columnIndex: number
2637
+ }): boolean
2514
2638
  /**
2515
2639
  * 数据过滤方法
2516
2640
  */
2517
- dataFilterMethod?(params: { row: any, $rowIndex: number }): boolean
2641
+ dataFilterMethod?(params: {
2642
+ $table: VxeTableConstructor
2643
+ row: any
2644
+ $rowIndex: number
2645
+ }): boolean
2518
2646
  /**
2519
2647
  * 表尾过滤方法
2520
2648
  */
2521
- footerFilterMethod?(params: { items: any[], $rowIndex: number }): boolean
2649
+ footerFilterMethod?(params: {
2650
+ $table: VxeTableConstructor
2651
+ items: any[]
2652
+ $rowIndex: number
2653
+ }): boolean
2522
2654
  /**
2523
2655
  * 打印之前的方法,可以通过返回自定义打印的内容
2524
2656
  */
@@ -2736,6 +2868,10 @@ export interface VxeTableProps<D = any> {
2736
2868
  * 表尾单元格配置信息
2737
2869
  */
2738
2870
  footerCellConfig?: VxeTablePropTypes.FooterCellConfig<D>
2871
+ /**
2872
+ * 行分组配置项
2873
+ */
2874
+ rowGroupConfig?: VxeTablePropTypes.RowGroupConfig<D>
2739
2875
  /**
2740
2876
  * 当前行配置项
2741
2877
  */
@@ -2974,6 +3110,7 @@ export interface TablePrivateComputed<D = any> {
2974
3110
  computeHeaderCellOpts: ComputedRef<VxeTablePropTypes.HeaderCellConfig>
2975
3111
  computeFooterCellOpts: ComputedRef<VxeTablePropTypes.FooterCellConfig>
2976
3112
  computeRowOpts: ComputedRef<VxeTablePropTypes.RowOpts>
3113
+ computeRowGroupOpts: ComputedRef<VxeTablePropTypes.RowGroupConfig>
2977
3114
  computeCurrentRowOpts: ComputedRef<VxeTablePropTypes.CurrentRowConfig>
2978
3115
  computeRowDragOpts: ComputedRef<VxeTablePropTypes.RowDragConfig>
2979
3116
  computeColumnDragOpts: ComputedRef<VxeTablePropTypes.ColumnDragConfig>
@@ -3073,8 +3210,10 @@ export interface TableReactData<D = any> {
3073
3210
  selectRadioRow: D | null
3074
3211
  // 表尾合计数据
3075
3212
  footerTableData: any[][]
3213
+ // 行分组列信息
3214
+ rowGroupColumn: VxeTableDefines.ColumnInfo<D> | null | undefined
3076
3215
  // 展开列信息
3077
- expandColumn: any
3216
+ expandColumn: VxeTableDefines.ColumnInfo<D> | null | undefined
3078
3217
  hasFixedColumn: boolean
3079
3218
  // 树节点列信息
3080
3219
  treeNodeColumn: any
@@ -3238,6 +3377,12 @@ export interface TableReactData<D = any> {
3238
3377
  mini: number
3239
3378
  }
3240
3379
 
3380
+ visiblwRowsFlag: number
3381
+
3382
+ isRowGroupStatus: boolean
3383
+ rowGroupList: VxeTableDefines.RowGroupItem[]
3384
+
3385
+ rowGroupExpandedFlag: number
3241
3386
  rowExpandedFlag: number
3242
3387
  treeExpandedFlag: number
3243
3388
  updateCheckboxFlag: number
@@ -3329,12 +3474,15 @@ export interface TableInternalData<D = any> {
3329
3474
  tableFullData: D[]
3330
3475
  afterFullData: D[]
3331
3476
  afterTreeFullData: D[]
3477
+ afterGroupFullData: D[]
3332
3478
  // 列表条件处理后数据集合
3333
3479
  afterFullRowMaps: Record<string, D>
3334
3480
  tableSynchData: D[]
3335
3481
  tableSourceData: D[]
3336
3482
  // 树的全量数据、条件处理后
3337
3483
  tableFullTreeData: D[]
3484
+ // 行分组全量数据、条件处理后
3485
+ tableFullGroupData: D[]
3338
3486
  // 收集的列配置(带分组)
3339
3487
  collectColumn: VxeTableDefines.ColumnInfo<D>[],
3340
3488
  // 完整所有列(不带分组)
@@ -3367,6 +3515,8 @@ export interface TableInternalData<D = any> {
3367
3515
  rowExpandedMaps: Record<string, D | null>
3368
3516
  // 懒加载中的展开行
3369
3517
  rowExpandLazyLoadedMaps: Record<string, D | null>
3518
+ // 已展开的分组行
3519
+ rowGroupExpandedMaps: Record<string, D | null>
3370
3520
  // 已展开树节点
3371
3521
  treeExpandedMaps: Record<string, D | null>
3372
3522
  // 懒加载中的树节点的集合
@@ -4085,9 +4235,9 @@ export interface TableMethods<DT = any> {
4085
4235
  /**
4086
4236
  * 用于 expand-config,设置展开行,二个参数设置这一行展开与否
4087
4237
  * @param rows 指定行
4088
- * @param checked 是否选中
4238
+ * @param expanded 是否展开
4089
4239
  */
4090
- setRowExpand(rows: any | any[], checked: boolean): Promise<void>
4240
+ setRowExpand(rows: any | any[], expanded: boolean): Promise<void>
4091
4241
  /**
4092
4242
  * 用于 expand-config,判断行是否为展开状态
4093
4243
  * @param row 指定行
@@ -4109,6 +4259,37 @@ export interface TableMethods<DT = any> {
4109
4259
  * 用于 expand-config,用于展开行,获取已展开的行数据
4110
4260
  */
4111
4261
  getRowExpandRecords(): DT[]
4262
+ /**
4263
+ * 设置行分组
4264
+ */
4265
+ setRowGroups (fieldOrColumns: (VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo)[] | VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo | null): Promise<void>
4266
+ /**
4267
+ * 清除行分组
4268
+ */
4269
+ clearRowGroups (): Promise<void>
4270
+ /**
4271
+ * 用于行分组,设置行分组的展开状态,二个参数设置这一行展开与否
4272
+ * @param rows 指定行
4273
+ * @param expanded 是否展开
4274
+ */
4275
+ setRowGroupExpand(rows: any | any[], expanded: boolean): Promise<void>
4276
+ /**
4277
+ * 用于行分组,设置所有行分组的展开状态
4278
+ * @param expanded 是否展开
4279
+ */
4280
+ setAllRowGroupExpand(expanded: boolean): Promise<void>
4281
+ /**
4282
+ * 用于行分组,手动清空所有行分组展开状态
4283
+ */
4284
+ clearRowGroupExpand(): Promise<void>
4285
+ /**
4286
+ * 用于行分组,判断是否展开
4287
+ */
4288
+ isRowGroupExpandByRow(row: any): boolean
4289
+ /**
4290
+ * 用于行分组,判断是为否为分组的行数据
4291
+ */
4292
+ isRowGroupRecord(row: any): boolean
4112
4293
  /**
4113
4294
  * 用于 tree-config,用于树表格,获取已展开的节点
4114
4295
  * 注意,即使父节点被收起,只要该节点还处于展开状态都能获取到
@@ -4429,6 +4610,10 @@ export interface TablePrivateMethods<D = any> {
4429
4610
  * @private
4430
4611
  */
4431
4612
  triggerRowExpandEvent(evnt: Event, params: VxeTableDefines.CellRenderBodyParams<any>): void
4613
+ /**
4614
+ * @private
4615
+ */
4616
+ triggerRowGroupExpandEvent(evnt: Event, params: VxeTableDefines.CellRenderBodyParams<any>): void
4432
4617
  /**
4433
4618
  * @private
4434
4619
  */
@@ -4601,6 +4786,7 @@ export type VxeTableEmits = [
4601
4786
 
4602
4787
  'column-resizable-change',
4603
4788
  'row-resizable-change',
4789
+ 'toggle-row-group-expand',
4604
4790
  'toggle-row-expand',
4605
4791
  'toggle-tree-expand',
4606
4792
  'menu-click',
@@ -4694,6 +4880,10 @@ export namespace VxeTableDefines {
4694
4880
  oLeft: number
4695
4881
  }
4696
4882
 
4883
+ export interface RowGroupItem {
4884
+ field: string
4885
+ }
4886
+
4697
4887
  export interface MergeCacheItem {
4698
4888
  rowspan: number
4699
4889
  colspan: number
@@ -4740,11 +4930,13 @@ export namespace VxeTableDefines {
4740
4930
  filterMultiple: VxeColumnPropTypes.FilterMultiple
4741
4931
  filterMethod: VxeColumnPropTypes.FilterMethod<D>
4742
4932
  filterRender: VxeColumnPropTypes.FilterRender
4933
+ rowGroupNode: VxeColumnPropTypes.RowGroupNode
4743
4934
  treeNode: VxeColumnPropTypes.TreeNode
4744
4935
  dragSort: VxeColumnPropTypes.DragSort
4745
4936
  rowResize: VxeColumnPropTypes.RowResize
4746
4937
  visible: VxeColumnPropTypes.Visible
4747
4938
  exportMethod: VxeColumnPropTypes.ExportMethod<D>
4939
+ headerExportMethod: VxeColumnPropTypes.HeaderExportMethod
4748
4940
  footerExportMethod: VxeColumnPropTypes.FooterExportMethod
4749
4941
  /**
4750
4942
  * 已废弃,请使用 titlePrefix
@@ -5200,6 +5392,10 @@ export namespace VxeTableDefines {
5200
5392
  resizeWidth: number
5201
5393
  }
5202
5394
 
5395
+ export interface ToggleRowGroupExpandEventParams<D = any> extends TableBaseCellParams<D> {
5396
+ expanded: boolean
5397
+ }
5398
+
5203
5399
  export interface ToggleRowExpandParams<D = any> extends TableBaseCellParams<D> {
5204
5400
  expanded: boolean
5205
5401
  }
@@ -5585,6 +5781,7 @@ export interface VxeTableEventProps<D = any> {
5585
5781
  onFilterChange?: VxeTableEvents.FilterChange<D>
5586
5782
  onFilterVisible?: VxeTableEvents.FilterVisible<D>
5587
5783
  onResizableChange?: VxeTableEvents.ResizableChange<D>
5784
+ onToggleRowGroupExpand?: VxeTableEvents.ToggleRowGroupExpand<D>
5588
5785
  onToggleRowExpand?: VxeTableEvents.ToggleRowExpand<D>
5589
5786
  onToggleTreeExpand?: VxeTableEvents.ToggleTreeExpand<D>
5590
5787
  onMenuClick?: VxeTableEvents.MenuClick<D>
@@ -5652,6 +5849,7 @@ export interface VxeTableListeners<D = any> {
5652
5849
  sortChange?: VxeTableEvents.SortChange<D>
5653
5850
  filterChange?: VxeTableEvents.FilterChange<D>
5654
5851
  resizableChange?: VxeTableEvents.ResizableChange<D>
5852
+ toggleRowGroupExpand?: VxeTableEvents.ToggleRowGroupExpand<D>
5655
5853
  toggleRowExpand?: VxeTableEvents.ToggleRowExpand<D>
5656
5854
  toggleTreeExpand?: VxeTableEvents.ToggleTreeExpand<D>
5657
5855
  menuClick?: VxeTableEvents.MenuClick<D>
@@ -5720,6 +5918,7 @@ export namespace VxeTableEvents {
5720
5918
  export type FilterChange<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.FilterChangeEventParams<D>) => void
5721
5919
  export type FilterVisible<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.FilterVisibleEventParams<D>) => void
5722
5920
  export type ResizableChange<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.ResizableChangeEventParams<D>) => void
5921
+ export type ToggleRowGroupExpand<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.ToggleRowGroupExpandEventParams<D>) => void
5723
5922
  export type ToggleRowExpand<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.ToggleRowExpandEventParams<D>) => void
5724
5923
  export type ToggleTreeExpand<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.ToggleTreeExpandEventParams<D>) => void
5725
5924
  export type MenuClick<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.MenuClickEventParams<D>) => void