vxe-table 4.13.44 → 4.13.46

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 (181) hide show
  1. package/README.md +4 -4
  2. package/es/{iconfont.1750301328949.ttf → iconfont.1750660623154.ttf} +0 -0
  3. package/es/iconfont.1750660623154.woff +0 -0
  4. package/es/iconfont.1750660623154.woff2 +0 -0
  5. package/es/index.css +1 -1
  6. package/es/index.min.css +1 -1
  7. package/es/locale/lang/ar-EG.js +5 -1
  8. package/es/locale/lang/de-DE.js +5 -1
  9. package/es/locale/lang/en-US.js +5 -1
  10. package/es/locale/lang/es-ES.js +5 -1
  11. package/es/locale/lang/fr-FR.js +5 -1
  12. package/es/locale/lang/hu-HU.js +5 -1
  13. package/es/locale/lang/hy-AM.js +5 -1
  14. package/es/locale/lang/id-ID.js +5 -1
  15. package/es/locale/lang/it-IT.js +5 -1
  16. package/es/locale/lang/ja-JP.js +5 -1
  17. package/es/locale/lang/ko-KR.js +5 -1
  18. package/es/locale/lang/ms-MY.js +5 -1
  19. package/es/locale/lang/nb-NO.js +5 -1
  20. package/es/locale/lang/pt-BR.js +5 -1
  21. package/es/locale/lang/ru-RU.js +5 -1
  22. package/es/locale/lang/th-TH.js +5 -1
  23. package/es/locale/lang/ug-CN.js +5 -1
  24. package/es/locale/lang/uk-UA.js +5 -1
  25. package/es/locale/lang/uz-UZ.js +5 -1
  26. package/es/locale/lang/vi-VN.js +5 -1
  27. package/es/locale/lang/zh-CHT.js +6 -2
  28. package/es/locale/lang/zh-CN.js +5 -1
  29. package/es/style.css +1 -1
  30. package/es/style.min.css +1 -1
  31. package/es/table/module/custom/hook.js +9 -1
  32. package/es/table/module/custom/panel.js +320 -224
  33. package/es/table/module/edit/hook.js +24 -10
  34. package/es/table/module/export/hook.js +19 -6
  35. package/es/table/src/cell.js +4 -4
  36. package/es/table/src/emits.js +3 -0
  37. package/es/table/src/table.js +40 -7
  38. package/es/table/style.css +37 -9
  39. package/es/table/style.min.css +1 -1
  40. package/es/ui/index.js +8 -2
  41. package/es/ui/src/log.js +1 -1
  42. package/es/vxe-table/style.css +37 -9
  43. package/es/vxe-table/style.min.css +1 -1
  44. package/lib/{iconfont.1750301328949.ttf → iconfont.1750660623154.ttf} +0 -0
  45. package/lib/iconfont.1750660623154.woff +0 -0
  46. package/lib/iconfont.1750660623154.woff2 +0 -0
  47. package/lib/index.css +1 -1
  48. package/lib/index.min.css +1 -1
  49. package/lib/index.umd.js +282 -90
  50. package/lib/index.umd.min.js +1 -1
  51. package/lib/locale/lang/ar-EG.js +5 -1
  52. package/lib/locale/lang/ar-EG.min.js +1 -1
  53. package/lib/locale/lang/ar-EG.umd.js +5 -1
  54. package/lib/locale/lang/de-DE.js +5 -1
  55. package/lib/locale/lang/de-DE.min.js +1 -1
  56. package/lib/locale/lang/de-DE.umd.js +5 -1
  57. package/lib/locale/lang/en-US.js +5 -1
  58. package/lib/locale/lang/en-US.min.js +1 -1
  59. package/lib/locale/lang/en-US.umd.js +5 -1
  60. package/lib/locale/lang/es-ES.js +5 -1
  61. package/lib/locale/lang/es-ES.min.js +1 -1
  62. package/lib/locale/lang/es-ES.umd.js +5 -1
  63. package/lib/locale/lang/fr-FR.js +5 -1
  64. package/lib/locale/lang/fr-FR.min.js +1 -1
  65. package/lib/locale/lang/fr-FR.umd.js +5 -1
  66. package/lib/locale/lang/hu-HU.js +5 -1
  67. package/lib/locale/lang/hu-HU.min.js +1 -1
  68. package/lib/locale/lang/hu-HU.umd.js +5 -1
  69. package/lib/locale/lang/hy-AM.js +5 -1
  70. package/lib/locale/lang/hy-AM.min.js +1 -1
  71. package/lib/locale/lang/hy-AM.umd.js +5 -1
  72. package/lib/locale/lang/id-ID.js +5 -1
  73. package/lib/locale/lang/id-ID.min.js +1 -1
  74. package/lib/locale/lang/id-ID.umd.js +5 -1
  75. package/lib/locale/lang/it-IT.js +5 -1
  76. package/lib/locale/lang/it-IT.min.js +1 -1
  77. package/lib/locale/lang/it-IT.umd.js +5 -1
  78. package/lib/locale/lang/ja-JP.js +5 -1
  79. package/lib/locale/lang/ja-JP.min.js +1 -1
  80. package/lib/locale/lang/ja-JP.umd.js +5 -1
  81. package/lib/locale/lang/ko-KR.js +5 -1
  82. package/lib/locale/lang/ko-KR.min.js +1 -1
  83. package/lib/locale/lang/ko-KR.umd.js +5 -1
  84. package/lib/locale/lang/ms-MY.js +5 -1
  85. package/lib/locale/lang/ms-MY.min.js +1 -1
  86. package/lib/locale/lang/ms-MY.umd.js +5 -1
  87. package/lib/locale/lang/nb-NO.js +5 -1
  88. package/lib/locale/lang/nb-NO.min.js +1 -1
  89. package/lib/locale/lang/nb-NO.umd.js +5 -1
  90. package/lib/locale/lang/pt-BR.js +5 -1
  91. package/lib/locale/lang/pt-BR.min.js +1 -1
  92. package/lib/locale/lang/pt-BR.umd.js +5 -1
  93. package/lib/locale/lang/ru-RU.js +5 -1
  94. package/lib/locale/lang/ru-RU.min.js +1 -1
  95. package/lib/locale/lang/ru-RU.umd.js +5 -1
  96. package/lib/locale/lang/th-TH.js +5 -1
  97. package/lib/locale/lang/th-TH.min.js +1 -1
  98. package/lib/locale/lang/th-TH.umd.js +5 -1
  99. package/lib/locale/lang/ug-CN.js +5 -1
  100. package/lib/locale/lang/ug-CN.min.js +1 -1
  101. package/lib/locale/lang/ug-CN.umd.js +5 -1
  102. package/lib/locale/lang/uk-UA.js +5 -1
  103. package/lib/locale/lang/uk-UA.min.js +1 -1
  104. package/lib/locale/lang/uk-UA.umd.js +5 -1
  105. package/lib/locale/lang/uz-UZ.js +5 -1
  106. package/lib/locale/lang/uz-UZ.min.js +1 -1
  107. package/lib/locale/lang/uz-UZ.umd.js +5 -1
  108. package/lib/locale/lang/vi-VN.js +5 -1
  109. package/lib/locale/lang/vi-VN.min.js +1 -1
  110. package/lib/locale/lang/vi-VN.umd.js +5 -1
  111. package/lib/locale/lang/zh-CHT.js +6 -2
  112. package/lib/locale/lang/zh-CHT.min.js +1 -1
  113. package/lib/locale/lang/zh-CHT.umd.js +6 -2
  114. package/lib/locale/lang/zh-CN.js +5 -1
  115. package/lib/locale/lang/zh-CN.min.js +1 -1
  116. package/lib/locale/lang/zh-CN.umd.js +5 -1
  117. package/lib/style.css +1 -1
  118. package/lib/style.min.css +1 -1
  119. package/lib/table/module/custom/hook.js +11 -1
  120. package/lib/table/module/custom/hook.min.js +1 -1
  121. package/lib/table/module/custom/panel.js +181 -60
  122. package/lib/table/module/custom/panel.min.js +1 -1
  123. package/lib/table/module/edit/hook.js +46 -10
  124. package/lib/table/module/edit/hook.min.js +1 -1
  125. package/lib/table/module/export/hook.js +19 -4
  126. package/lib/table/module/export/hook.min.js +1 -1
  127. package/lib/table/src/cell.js +4 -4
  128. package/lib/table/src/cell.min.js +1 -1
  129. package/lib/table/src/emits.js +1 -1
  130. package/lib/table/src/emits.min.js +1 -1
  131. package/lib/table/src/table.js +6 -6
  132. package/lib/table/src/table.min.js +1 -1
  133. package/lib/table/style/style.css +37 -9
  134. package/lib/table/style/style.min.css +1 -1
  135. package/lib/ui/index.js +8 -2
  136. package/lib/ui/index.min.js +1 -1
  137. package/lib/ui/src/log.js +1 -1
  138. package/lib/ui/src/log.min.js +1 -1
  139. package/lib/vxe-table/style/style.css +37 -9
  140. package/lib/vxe-table/style/style.min.css +1 -1
  141. package/package.json +1 -1
  142. package/packages/locale/lang/ar-EG.ts +5 -1
  143. package/packages/locale/lang/de-DE.ts +5 -1
  144. package/packages/locale/lang/en-US.ts +5 -1
  145. package/packages/locale/lang/es-ES.ts +5 -1
  146. package/packages/locale/lang/fr-FR.ts +5 -1
  147. package/packages/locale/lang/hu-HU.ts +5 -1
  148. package/packages/locale/lang/hy-AM.ts +5 -1
  149. package/packages/locale/lang/id-ID.ts +5 -1
  150. package/packages/locale/lang/it-IT.ts +5 -1
  151. package/packages/locale/lang/ja-JP.ts +5 -1
  152. package/packages/locale/lang/ko-KR.ts +5 -1
  153. package/packages/locale/lang/ms-MY.ts +5 -1
  154. package/packages/locale/lang/nb-NO.ts +5 -1
  155. package/packages/locale/lang/pt-BR.ts +5 -1
  156. package/packages/locale/lang/ru-RU.ts +5 -1
  157. package/packages/locale/lang/th-TH.ts +5 -1
  158. package/packages/locale/lang/ug-CN.ts +5 -1
  159. package/packages/locale/lang/uk-UA.ts +5 -1
  160. package/packages/locale/lang/uz-UZ.ts +5 -1
  161. package/packages/locale/lang/vi-VN.ts +5 -1
  162. package/packages/locale/lang/zh-CHT.ts +6 -2
  163. package/packages/locale/lang/zh-CN.ts +5 -1
  164. package/packages/table/module/custom/hook.ts +10 -1
  165. package/packages/table/module/custom/panel.ts +338 -236
  166. package/packages/table/module/edit/hook.ts +24 -10
  167. package/packages/table/module/export/hook.ts +18 -7
  168. package/packages/table/src/cell.ts +4 -4
  169. package/packages/table/src/emits.ts +3 -0
  170. package/packages/table/src/table.ts +30 -8
  171. package/packages/ui/index.ts +7 -1
  172. package/styles/components/icon.scss +9 -1
  173. package/styles/components/table-module/custom.scss +26 -3
  174. package/styles/helpers/baseMixin.scss +16 -2
  175. package/styles/icon/iconfont.ttf +0 -0
  176. package/styles/icon/iconfont.woff +0 -0
  177. package/styles/icon/iconfont.woff2 +0 -0
  178. package/es/iconfont.1750301328949.woff +0 -0
  179. package/es/iconfont.1750301328949.woff2 +0 -0
  180. package/lib/iconfont.1750301328949.woff +0 -0
  181. package/lib/iconfont.1750301328949.woff2 +0 -0
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.13.43";
3141
+ const version = "4.13.46";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3279,7 +3279,8 @@ core_.VxeUI.setConfig({
3279
3279
  childrenField: '_X_ROW_CHILDREN',
3280
3280
  mapChildrenField: '_X_ROW_CHILD_LIST',
3281
3281
  indent: 20,
3282
- showIcon: true
3282
+ showIcon: true,
3283
+ maxGroupSize: 4
3283
3284
  },
3284
3285
  treeConfig: {
3285
3286
  padding: true,
@@ -3433,20 +3434,25 @@ core_.VxeUI.setIcon({
3433
3434
  TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
3434
3435
  TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
3435
3436
  TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
3437
+ TABLE_CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
3436
3438
  TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
3437
3439
  TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
3440
+ TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
3438
3441
  TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
3439
3442
  TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
3440
3443
  TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
3441
3444
  TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
3442
3445
  TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
3443
3446
  TABLE_DRAG_STATUS_SUB_ROW: iconPrefix + 'add-sub',
3447
+ TABLE_DRAG_STATUS_AGG_GROUP: iconPrefix + 'grouping',
3448
+ TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + 'values',
3444
3449
  TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
3445
3450
  TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
3446
3451
  TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
3447
3452
  TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
3448
3453
  TABLE_AGGREGATION_GROUPING: iconPrefix + 'grouping',
3449
3454
  TABLE_AGGREGATION_VALUES: iconPrefix + 'values',
3455
+ TABLE_AGGREGATION_SORT: iconPrefix + 'drag-handle',
3450
3456
  TABLE_AGGREGATION_DELETE: iconPrefix + 'close',
3451
3457
  // toolbar
3452
3458
  TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
@@ -3614,7 +3620,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3614
3620
  const {
3615
3621
  log: log_log
3616
3622
  } = core_.VxeUI;
3617
- const log_version = `table v${"4.13.43"}`;
3623
+ const log_version = `table v${"4.13.46"}`;
3618
3624
  const warnLog = log_log.create('warn', log_version);
3619
3625
  const errLog = log_log.create('error', log_version);
3620
3626
  ;// ./packages/table/src/columnInfo.ts
@@ -5545,7 +5551,7 @@ const Cell = {
5545
5551
  const radioVNs = [];
5546
5552
  if (isVisible) {
5547
5553
  radioVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
5548
- class: ['vxe-radio--icon', isChecked ? cell_getIcon().TABLE_RADIO_CHECKED : cell_getIcon().TABLE_RADIO_UNCHECKED]
5554
+ class: ['vxe-radio--icon', isChecked ? cell_getIcon().TABLE_RADIO_CHECKED : isDisabled ? cell_getIcon().TABLE_RADIO_DISABLED_UNCHECKED : cell_getIcon().TABLE_RADIO_UNCHECKED]
5549
5555
  }));
5550
5556
  }
5551
5557
  if (defaultSlot || labelField) {
@@ -5626,7 +5632,7 @@ const Cell = {
5626
5632
  title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(headerTitle) ? cell_getI18n('vxe.table.allTitle') : `${headerTitle || ''}`,
5627
5633
  ...ons
5628
5634
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
5629
- class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
5635
+ class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isAllCheckboxDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
5630
5636
  })].concat(titleSlot || colTitle ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
5631
5637
  class: 'vxe-checkbox--label'
5632
5638
  }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)] : []))]));
@@ -5705,7 +5711,7 @@ const Cell = {
5705
5711
  const checkVNs = [];
5706
5712
  if (isVisible) {
5707
5713
  checkVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
5708
- class: ['vxe-checkbox--icon', indeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
5714
+ class: ['vxe-checkbox--icon', indeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
5709
5715
  }));
5710
5716
  }
5711
5717
  if (defaultSlot || labelField) {
@@ -5801,7 +5807,7 @@ const Cell = {
5801
5807
  const checkVNs = [];
5802
5808
  if (isVisible) {
5803
5809
  checkVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
5804
- class: ['vxe-checkbox--icon', isIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
5810
+ class: ['vxe-checkbox--icon', isIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
5805
5811
  }));
5806
5812
  if (defaultSlot || labelField) {
5807
5813
  checkVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
@@ -8622,7 +8628,7 @@ const {
8622
8628
  params: Object
8623
8629
  });
8624
8630
  ;// ./packages/table/src/emits.ts
8625
- /* harmony default export */ var emits = (['update:data', 'keydown-start', 'keydown', 'keydown-end', 'paste', 'copy', 'cut', 'current-change', 'current-row-change', 'current-row-disabled', 'current-column-change', 'current-column-disabled', 'radio-change', 'checkbox-change', 'checkbox-all', 'checkbox-range-start', 'checkbox-range-change', 'checkbox-range-end', 'checkbox-range-select', 'cell-click', 'cell-dblclick', 'cell-menu', 'cell-mouseenter', 'cell-mouseleave', 'cell-selected', 'cell-delete-value', 'cell-backspace-value', 'header-cell-click', 'header-cell-dblclick', 'header-cell-menu', 'footer-cell-click', 'footer-cell-dblclick', 'footer-cell-menu', 'clear-merge', 'sort-change', 'clear-sort', 'clear-all-sort', 'filter-change', 'filter-visible', 'clear-filter', 'clear-all-filter', 'resizable-change', 'column-resizable-change', 'row-resizable-change', 'toggle-row-group-expand', 'toggle-row-expand', 'toggle-tree-expand', 'menu-click', 'edit-closed', 'row-dragstart', 'row-dragover', 'row-dragend', 'column-dragstart', 'column-dragover', 'column-dragend', 'enter-append-row', 'edit-actived', 'edit-activated', 'edit-disabled', 'valid-error', 'scroll', 'scroll-boundary', 'custom', 'change-fnr', 'open-fnr', 'show-fnr', 'hide-fnr', 'fnr-change', 'fnr-find', 'fnr-find-all', 'fnr-replace', 'fnr-replace-all', 'cell-area-copy', 'cell-area-cut', 'cell-area-paste', 'cell-area-merge', 'clear-cell-area-selection', 'clear-cell-area-merge', 'header-cell-area-selection', 'cell-area-selection-invalid', 'cell-area-selection-start', 'cell-area-selection-drag', 'cell-area-selection-end', 'cell-area-extension-start', 'cell-area-extension-drag', 'cell-area-extension-end', 'cell-area-selection-all-start', 'cell-area-selection-all-end', 'cell-area-arrows-start', 'cell-area-arrows-end', 'active-cell-change-start', 'active-cell-change-end']);
8631
+ /* harmony default export */ var emits = (['update:data', 'keydown-start', 'keydown', 'keydown-end', 'paste', 'copy', 'cut', 'current-change', 'current-row-change', 'current-row-disabled', 'current-column-change', 'current-column-disabled', 'radio-change', 'checkbox-change', 'checkbox-all', 'checkbox-range-start', 'checkbox-range-change', 'checkbox-range-end', 'checkbox-range-select', 'cell-click', 'cell-dblclick', 'cell-menu', 'cell-mouseenter', 'cell-mouseleave', 'cell-selected', 'cell-delete-value', 'cell-backspace-value', 'header-cell-click', 'header-cell-dblclick', 'header-cell-menu', 'footer-cell-click', 'footer-cell-dblclick', 'footer-cell-menu', 'clear-merge', 'sort-change', 'clear-sort', 'clear-all-sort', 'filter-change', 'filter-visible', 'clear-filter', 'clear-all-filter', 'resizable-change', 'column-resizable-change', 'row-resizable-change', 'toggle-row-group-expand', 'toggle-row-expand', 'toggle-tree-expand', 'menu-click', 'edit-closed', 'row-dragstart', 'row-dragover', 'row-dragend', 'column-dragstart', 'column-dragover', 'column-dragend', 'enter-append-row', 'edit-actived', 'edit-activated', 'edit-disabled', 'valid-error', 'scroll', 'scroll-boundary', 'custom', 'custom-visible-change', 'custom-visible-all', 'custom-fixed-change', 'change-fnr', 'open-fnr', 'show-fnr', 'hide-fnr', 'fnr-change', 'fnr-find', 'fnr-find-all', 'fnr-replace', 'fnr-replace-all', 'cell-area-copy', 'cell-area-cut', 'cell-area-paste', 'cell-area-merge', 'clear-cell-area-selection', 'clear-cell-area-merge', 'header-cell-area-selection', 'cell-area-selection-invalid', 'cell-area-selection-start', 'cell-area-selection-drag', 'cell-area-selection-end', 'cell-area-extension-start', 'cell-area-extension-drag', 'cell-area-extension-end', 'cell-area-selection-all-start', 'cell-area-selection-all-end', 'cell-area-arrows-start', 'cell-area-arrows-end', 'active-cell-change-start', 'active-cell-change-end']);
8626
8632
  ;// ./packages/table/module/custom/panel.ts
8627
8633
 
8628
8634
 
@@ -8649,7 +8655,8 @@ const {
8649
8655
  default: () => ({})
8650
8656
  }
8651
8657
  },
8652
- setup(props) {
8658
+ setup(props, context) {
8659
+ const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
8653
8660
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
8654
8661
  const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
8655
8662
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
@@ -8658,8 +8665,8 @@ const {
8658
8665
  const $xeTable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeTable', {});
8659
8666
  const {
8660
8667
  props: tableProps,
8661
- reactData,
8662
- internalData
8668
+ reactData: tableReactData,
8669
+ internalData: tableInternalData
8663
8670
  } = $xeTable;
8664
8671
  const {
8665
8672
  computeCustomOpts,
@@ -8669,13 +8676,29 @@ const {
8669
8676
  computeResizableOpts
8670
8677
  } = $xeTable.getComputeMaps();
8671
8678
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
8672
- const bodyElemRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
8679
+ const refBodyWrapperElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
8680
+ const refCustomBodyElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
8673
8681
  const refDragLineElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
8674
8682
  const refDragTipElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
8675
- const dragColumnRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
8676
- let prevDragCol;
8677
- let prevDragToChild = false;
8678
- let prevDragPos;
8683
+ const customPanelReactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
8684
+ dragCol: null,
8685
+ prevDragGroup: null,
8686
+ prevDragValues: null,
8687
+ dragTipText: ''
8688
+ });
8689
+ const customPanelInternalData = {
8690
+ // prevDragCol: undefined,
8691
+ // prevDragToChild: false,
8692
+ // prevDragPos: null
8693
+ };
8694
+ const refMaps = {
8695
+ refElem,
8696
+ refBodyWrapperElem,
8697
+ refCustomBodyElem,
8698
+ refDragLineElem,
8699
+ refDragTipElem
8700
+ };
8701
+ const computeMaps = {};
8679
8702
  const handleWrapperMouseenterEvent = evnt => {
8680
8703
  const {
8681
8704
  customStore
@@ -8697,7 +8720,7 @@ const {
8697
8720
  const confirmCustomEvent = ({
8698
8721
  $event
8699
8722
  }) => {
8700
- reactData.isCustomStatus = true;
8723
+ tableReactData.isCustomStatus = true;
8701
8724
  $xeTable.saveCustom();
8702
8725
  $xeTable.closeCustom();
8703
8726
  $xeTable.emitCustomEvent('confirm', $event);
@@ -8740,7 +8763,7 @@ const {
8740
8763
  const handleOptionCheck = column => {
8741
8764
  const {
8742
8765
  customColumnList
8743
- } = reactData;
8766
+ } = tableReactData;
8744
8767
  const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(customColumnList, item => item === column);
8745
8768
  if (matchObj && matchObj.parent) {
8746
8769
  const {
@@ -8753,7 +8776,7 @@ const {
8753
8776
  }
8754
8777
  }
8755
8778
  };
8756
- const changeCheckboxOption = column => {
8779
+ const changeCheckboxOption = (column, evnt) => {
8757
8780
  const isChecked = !column.renderVisible;
8758
8781
  const customOpts = computeCustomOpts.value;
8759
8782
  if (customOpts.immediate) {
@@ -8762,7 +8785,7 @@ const {
8762
8785
  item.renderVisible = isChecked;
8763
8786
  item.halfVisible = false;
8764
8787
  });
8765
- reactData.isCustomStatus = true;
8788
+ tableReactData.isCustomStatus = true;
8766
8789
  $xeTable.handleCustom();
8767
8790
  $xeTable.saveCustomStore('update:visible');
8768
8791
  } else {
@@ -8773,6 +8796,10 @@ const {
8773
8796
  }
8774
8797
  handleOptionCheck(column);
8775
8798
  $xeTable.checkCustomStatus();
8799
+ $xeTable.dispatchEvent('custom-visible-change', {
8800
+ column,
8801
+ checked: isChecked
8802
+ }, evnt);
8776
8803
  };
8777
8804
  const changeColumnWidth = column => {
8778
8805
  const customOpts = computeCustomOpts.value;
@@ -8780,62 +8807,89 @@ const {
8780
8807
  if (column.renderResizeWidth !== column.renderWidth) {
8781
8808
  column.resizeWidth = column.renderResizeWidth;
8782
8809
  column.renderWidth = column.renderResizeWidth;
8783
- reactData.isCustomStatus = true;
8810
+ tableReactData.isCustomStatus = true;
8784
8811
  $xeTable.handleCustom();
8785
8812
  $xeTable.saveCustomStore('update:width');
8786
8813
  }
8787
8814
  }
8788
8815
  };
8789
- const changeFixedOption = (column, colFixed) => {
8816
+ const changeFixedOption = (column, colFixed, evnt) => {
8790
8817
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
8791
8818
  const customOpts = computeCustomOpts.value;
8819
+ let targetFixed = null;
8792
8820
  if (customOpts.immediate) {
8793
8821
  if (column.renderFixed === colFixed) {
8822
+ targetFixed = '';
8794
8823
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
8795
8824
  col.fixed = '';
8796
8825
  col.renderFixed = '';
8797
8826
  });
8798
8827
  } else {
8799
8828
  if (!isMaxFixedColumn || column.renderFixed) {
8829
+ targetFixed = colFixed;
8800
8830
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
8801
8831
  col.fixed = colFixed;
8802
8832
  col.renderFixed = colFixed;
8803
8833
  });
8804
8834
  }
8805
8835
  }
8806
- reactData.isCustomStatus = true;
8836
+ tableReactData.isCustomStatus = true;
8807
8837
  $xeTable.handleCustom();
8808
8838
  $xeTable.saveCustomStore('update:fixed');
8809
8839
  } else {
8810
8840
  if (column.renderFixed === colFixed) {
8841
+ targetFixed = '';
8811
8842
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
8812
8843
  col.renderFixed = '';
8813
8844
  });
8814
8845
  } else {
8815
8846
  if (!isMaxFixedColumn || column.renderFixed) {
8847
+ targetFixed = colFixed;
8816
8848
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
8817
8849
  col.renderFixed = colFixed;
8818
8850
  });
8819
8851
  }
8820
8852
  }
8821
8853
  }
8854
+ if (!targetFixed !== null) {
8855
+ $xeTable.dispatchEvent('custom-fixed-change', {
8856
+ column,
8857
+ fixed: targetFixed
8858
+ }, evnt);
8859
+ }
8822
8860
  };
8823
- const allOptionEvent = () => {
8861
+ const allOptionEvent = evnt => {
8862
+ const {
8863
+ customStore
8864
+ } = tableReactData;
8865
+ const isAll = !customStore.isAll;
8824
8866
  $xeTable.toggleCustomAllCheckbox();
8867
+ $xeTable.dispatchEvent('custom-visible-all', {
8868
+ checked: isAll
8869
+ }, evnt);
8825
8870
  };
8826
8871
  const showDropTip = (evnt, optEl, showLine, dragPos) => {
8827
- const el = bodyElemRef.value;
8828
- if (!el) {
8872
+ const bodyWrapperElem = refBodyWrapperElem.value;
8873
+ if (!bodyWrapperElem) {
8829
8874
  return;
8830
8875
  }
8831
- const wrapperRect = el.getBoundingClientRect();
8876
+ const customBodyElem = refCustomBodyElem.value;
8877
+ if (!customBodyElem) {
8878
+ return;
8879
+ }
8880
+ const {
8881
+ prevDragToChild
8882
+ } = customPanelInternalData;
8883
+ const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
8884
+ const customBodyRect = customBodyElem.getBoundingClientRect();
8832
8885
  if (optEl) {
8833
8886
  const dragLineEl = refDragLineElem.value;
8834
8887
  if (dragLineEl) {
8835
8888
  if (showLine) {
8836
8889
  const optRect = optEl.getBoundingClientRect();
8837
8890
  dragLineEl.style.display = 'block';
8838
- dragLineEl.style.top = `${Math.max(1, optRect.y + el.scrollTop - wrapperRect.y)}px`;
8891
+ dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`;
8892
+ dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
8839
8893
  dragLineEl.style.height = `${optRect.height}px`;
8840
8894
  dragLineEl.style.width = `${optRect.width}px`;
8841
8895
  dragLineEl.setAttribute('drag-pos', dragPos);
@@ -8848,11 +8902,31 @@ const {
8848
8902
  const dragTipEl = refDragTipElem.value;
8849
8903
  if (dragTipEl) {
8850
8904
  dragTipEl.style.display = 'block';
8851
- dragTipEl.style.top = `${Math.min(el.clientHeight + el.scrollTop - dragTipEl.clientHeight, evnt.clientY + el.scrollTop - wrapperRect.y)}px`;
8852
- dragTipEl.style.left = `${Math.min(el.clientWidth + el.scrollLeft - dragTipEl.clientWidth, evnt.clientX + el.scrollLeft - wrapperRect.x)}px`;
8905
+ dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
8906
+ dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`;
8853
8907
  dragTipEl.setAttribute('drag-status', showLine ? prevDragToChild ? 'sub' : 'normal' : 'disabled');
8854
8908
  }
8855
8909
  };
8910
+ const updateColDropTipContent = () => {
8911
+ const {
8912
+ dragCol
8913
+ } = customPanelReactData;
8914
+ const columnDragOpts = computeColumnDragOpts.value;
8915
+ const {
8916
+ tooltipMethod
8917
+ } = columnDragOpts;
8918
+ let tipContent = '';
8919
+ if (tooltipMethod) {
8920
+ const dtParams = {
8921
+ $table: $xeTable,
8922
+ column: dragCol
8923
+ };
8924
+ tipContent = `${tooltipMethod(dtParams) || ''}`;
8925
+ } else {
8926
+ tipContent = panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']);
8927
+ }
8928
+ customPanelReactData.dragTipText = tipContent;
8929
+ };
8856
8930
  const hideDropTip = () => {
8857
8931
  const dragTipEl = refDragTipElem.value;
8858
8932
  const dragLineEl = refDragLineElem.value;
@@ -8871,7 +8945,8 @@ const {
8871
8945
  const colid = trEl.getAttribute('colid');
8872
8946
  const column = $xeTable.getColumnById(colid);
8873
8947
  trEl.draggable = true;
8874
- dragColumnRef.value = column;
8948
+ customPanelReactData.dragCol = column;
8949
+ updateColDropTipContent();
8875
8950
  addClass(trEl, 'active--drag-origin');
8876
8951
  };
8877
8952
  const sortMouseupEvent = evnt => {
@@ -8881,13 +8956,15 @@ const {
8881
8956
  const trEl = tdEl.parentElement;
8882
8957
  hideDropTip();
8883
8958
  trEl.draggable = false;
8884
- dragColumnRef.value = null;
8959
+ customPanelReactData.dragCol = null;
8885
8960
  removeClass(trEl, 'active--drag-origin');
8886
8961
  };
8887
8962
  const sortDragstartEvent = evnt => {
8888
8963
  if (evnt.dataTransfer) {
8889
8964
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
8890
8965
  }
8966
+ customPanelInternalData.prevDragGroup = null;
8967
+ customPanelInternalData.prevDragValues = null;
8891
8968
  };
8892
8969
  const sortDragendEvent = evnt => {
8893
8970
  const {
@@ -8895,16 +8972,15 @@ const {
8895
8972
  } = tableProps;
8896
8973
  const {
8897
8974
  customColumnList
8898
- } = reactData;
8975
+ } = tableReactData;
8899
8976
  const {
8900
8977
  collectColumn
8901
- } = internalData;
8978
+ } = tableInternalData;
8902
8979
  const customOpts = computeCustomOpts.value;
8903
8980
  const {
8904
8981
  immediate
8905
8982
  } = customOpts;
8906
8983
  const trEl = evnt.currentTarget;
8907
- const dragCol = dragColumnRef.value;
8908
8984
  const columnDragOpts = computeColumnDragOpts.value;
8909
8985
  const {
8910
8986
  isCrossDrag,
@@ -8912,8 +8988,22 @@ const {
8912
8988
  isToChildDrag,
8913
8989
  dragEndMethod
8914
8990
  } = columnDragOpts;
8991
+ const {
8992
+ dragCol
8993
+ } = customPanelReactData;
8994
+ const {
8995
+ prevDragCol,
8996
+ prevDragGroup,
8997
+ prevDragValues,
8998
+ prevDragPos,
8999
+ prevDragToChild
9000
+ } = customPanelInternalData;
8915
9001
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
8916
- if (prevDragCol && dragCol) {
9002
+ if (prevDragGroup || prevDragValues) {
9003
+ if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
9004
+ $xeTable.handlePivotTableAggregatePanelDragendEvent(evnt);
9005
+ }
9006
+ } else if (prevDragCol && dragCol) {
8917
9007
  // 判断是否有拖动
8918
9008
  if (prevDragCol !== dragCol) {
8919
9009
  const dragColumn = dragCol;
@@ -9039,7 +9129,7 @@ const {
9039
9129
  nafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id === newColumn.id);
9040
9130
  customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
9041
9131
  }
9042
- reactData.isDragColMove = true;
9132
+ tableReactData.isDragColMove = true;
9043
9133
  if (mouseConfig) {
9044
9134
  if ($xeTable.clearSelected) {
9045
9135
  $xeTable.clearSelected();
@@ -9061,14 +9151,16 @@ const {
9061
9151
  }
9062
9152
  }, evnt);
9063
9153
  if (immediate) {
9064
- reactData.customColumnList = collectColumn.slice(0);
9154
+ tableReactData.customColumnList = collectColumn.slice(0);
9065
9155
  $xeTable.handleColDragSwapColumn();
9066
9156
  }
9067
9157
  }).catch(() => {});
9068
9158
  }
9069
9159
  }
9070
9160
  hideDropTip();
9071
- dragColumnRef.value = null;
9161
+ customPanelReactData.dragCol = null;
9162
+ customPanelInternalData.prevDragGroup = null;
9163
+ customPanelInternalData.prevDragValues = null;
9072
9164
  trEl.draggable = false;
9073
9165
  trEl.removeAttribute('drag-pos');
9074
9166
  removeClass(trEl, 'active--drag-target');
@@ -9088,7 +9180,11 @@ const {
9088
9180
  const isControlKey = hasControlKey(evnt);
9089
9181
  const colid = optEl.getAttribute('colid');
9090
9182
  const column = $xeTable.getColumnById(colid);
9091
- const dragCol = dragColumnRef.value;
9183
+ const {
9184
+ dragCol
9185
+ } = customPanelReactData;
9186
+ customPanelInternalData.prevDragGroup = null;
9187
+ customPanelInternalData.prevDragValues = null;
9092
9188
  // 是否移入有效列
9093
9189
  if (column && (isCrossDrag || column.level === 1)) {
9094
9190
  evnt.preventDefault();
@@ -9098,14 +9194,16 @@ const {
9098
9194
  showDropTip(evnt, optEl, false, dragPos);
9099
9195
  return;
9100
9196
  }
9101
- prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
9102
- prevDragCol = column;
9103
- prevDragPos = dragPos;
9197
+ customPanelInternalData.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
9198
+ customPanelInternalData.prevDragCol = column;
9199
+ customPanelInternalData.prevDragPos = dragPos;
9104
9200
  showDropTip(evnt, optEl, true, dragPos);
9105
9201
  }
9106
9202
  };
9107
9203
  const renderDragTip = () => {
9108
- const dragCol = dragColumnRef.value;
9204
+ const {
9205
+ dragTipText
9206
+ } = customPanelReactData;
9109
9207
  const columnDragOpts = computeColumnDragOpts.value;
9110
9208
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9111
9209
  ref: refDragLineElem,
@@ -9123,11 +9221,15 @@ const {
9123
9221
  class: ['vxe-table-custom-popup--drag-tip-normal-status', panel_getIcon().TABLE_DRAG_STATUS_ROW]
9124
9222
  }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
9125
9223
  class: ['vxe-table-custom-popup--drag-tip-sub-status', panel_getIcon().TABLE_DRAG_STATUS_SUB_ROW]
9224
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
9225
+ class: ['vxe-table-custom-popup--drag-tip-group-status', panel_getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
9226
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
9227
+ class: ['vxe-table-custom-popup--drag-tip-values-status', panel_getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
9126
9228
  }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
9127
9229
  class: ['vxe-table-custom-popup--drag-tip-disabled-status', panel_getIcon().TABLE_DRAG_DISABLED]
9128
9230
  })]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9129
9231
  class: 'vxe-table-custom-popup--drag-tip-content'
9130
- }, panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))])])]);
9232
+ }, `${dragTipText || ''}`)])])]);
9131
9233
  };
9132
9234
  const renderSimplePanel = () => {
9133
9235
  const $xeGrid = $xeTable.xeGrid;
@@ -9143,7 +9245,7 @@ const {
9143
9245
  const {
9144
9246
  isCustomStatus,
9145
9247
  customColumnList
9146
- } = reactData;
9248
+ } = tableReactData;
9147
9249
  const customOpts = computeCustomOpts.value;
9148
9250
  const {
9149
9251
  immediate
@@ -9220,9 +9322,9 @@ const {
9220
9322
  'is--disabled': isDisabled
9221
9323
  }],
9222
9324
  title: panel_getI18n('vxe.custom.setting.colVisible'),
9223
- onClick: () => {
9325
+ onClick: evnt => {
9224
9326
  if (!isDisabled) {
9225
- changeCheckboxOption(column);
9327
+ changeCheckboxOption(column, evnt);
9226
9328
  }
9227
9329
  }
9228
9330
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
@@ -9257,8 +9359,10 @@ const {
9257
9359
  status: column.renderFixed === 'left' ? 'primary' : '',
9258
9360
  disabled: isDisabled || isHidden || isMaxFixedColumn && !column.renderFixed,
9259
9361
  title: panel_getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
9260
- onClick: () => {
9261
- changeFixedOption(column, 'left');
9362
+ onClick: ({
9363
+ $event
9364
+ }) => {
9365
+ changeFixedOption(column, 'left', $event);
9262
9366
  }
9263
9367
  }) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), VxeUIButtonComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
9264
9368
  mode: 'text',
@@ -9266,8 +9370,10 @@ const {
9266
9370
  status: column.renderFixed === 'right' ? 'primary' : '',
9267
9371
  disabled: isDisabled || isHidden || isMaxFixedColumn && !column.renderFixed,
9268
9372
  title: panel_getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
9269
- onClick: () => {
9270
- changeFixedOption(column, 'right');
9373
+ onClick: ({
9374
+ $event
9375
+ }) => {
9376
+ changeFixedOption(column, 'right', $event);
9271
9377
  }
9272
9378
  }) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]));
9273
9379
  }
@@ -9281,9 +9387,13 @@ const {
9281
9387
  style: maxHeight && !['left', 'right'].includes(placement) ? {
9282
9388
  maxHeight: `${maxHeight}px`
9283
9389
  } : {}
9284
- }, customStore.visible ? [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)($xeTable.getPivotTableAggregateSimplePanel(), {
9390
+ }, customStore.visible ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9391
+ ref: refBodyWrapperElem,
9392
+ class: 'vxe-table-custom-simple--body-wrapper'
9393
+ }, [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)($xeTable.getPivotTableAggregateSimplePanel(), {
9285
9394
  customStore
9286
9395
  }) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9396
+ ref: refCustomBodyElem,
9287
9397
  class: 'vxe-table-custom--handle-wrapper'
9288
9398
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9289
9399
  class: 'vxe-table-custom--header'
@@ -9305,7 +9415,6 @@ const {
9305
9415
  }, panel_getI18n('vxe.toolbar.customAll'))]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
9306
9416
  class: 'vxe-checkbox--label'
9307
9417
  }, panel_getI18n('vxe.table.customTitle'))])])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9308
- ref: bodyElemRef,
9309
9418
  class: 'vxe-table-custom--body'
9310
9419
  }, [topSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9311
9420
  class: 'vxe-table-custom--panel-top'
@@ -9320,7 +9429,7 @@ const {
9320
9429
  default: () => colVNs
9321
9430
  }), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9322
9431
  class: 'vxe-table-custom--panel-bottom'
9323
- }, $xeTable.callSlot(bottomSlot, params)) : panel_renderEmptyElement($xeTable), renderDragTip()]), customOpts.showFooter ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9432
+ }, $xeTable.callSlot(bottomSlot, params)) : panel_renderEmptyElement($xeTable)]), customOpts.showFooter ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9324
9433
  class: 'vxe-table-custom--footer'
9325
9434
  }, footerSlot ? $xeTable.callSlot(footerSlot, params) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9326
9435
  class: 'vxe-table-custom--footer-buttons'
@@ -9342,7 +9451,7 @@ const {
9342
9451
  status: 'primary',
9343
9452
  content: customOpts.confirmButtonText || panel_getI18n('vxe.table.customConfirm'),
9344
9453
  onClick: confirmCustomEvent
9345
- }) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])]) : null])] : []);
9454
+ }) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])]) : null]), renderDragTip()])] : []);
9346
9455
  };
9347
9456
  const renderPopupPanel = () => {
9348
9457
  const $xeGrid = $xeTable.xeGrid;
@@ -9355,7 +9464,7 @@ const {
9355
9464
  const {
9356
9465
  isCustomStatus,
9357
9466
  customColumnList
9358
- } = reactData;
9467
+ } = tableReactData;
9359
9468
  const customOpts = computeCustomOpts.value;
9360
9469
  const {
9361
9470
  immediate
@@ -9455,9 +9564,9 @@ const {
9455
9564
  'is--disabled': isDisabled
9456
9565
  }],
9457
9566
  title: panel_getI18n('vxe.custom.setting.colVisible'),
9458
- onClick: () => {
9567
+ onClick: evnt => {
9459
9568
  if (!isDisabled) {
9460
- changeCheckboxOption(column);
9569
+ changeCheckboxOption(column, evnt);
9461
9570
  }
9462
9571
  }
9463
9572
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
@@ -9523,20 +9632,23 @@ const {
9523
9632
  value: 'right',
9524
9633
  disabled: isDisabled || isHidden || isMaxFixedColumn
9525
9634
  }],
9526
- 'onUpdate:modelValue'(value) {
9527
- changeFixedOption(column, value);
9635
+ onChange({
9636
+ label,
9637
+ $event
9638
+ }) {
9639
+ changeFixedOption(column, label, $event);
9528
9640
  }
9529
9641
  }) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]));
9530
9642
  }
9531
9643
  });
9532
9644
  const scopedSlots = {
9533
9645
  default: () => {
9534
- if (defaultSlot) {
9535
- return $xeTable.callSlot(defaultSlot, params);
9536
- }
9537
9646
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9538
- ref: bodyElemRef,
9539
- class: 'vxe-table-custom-popup--body'
9647
+ ref: refBodyWrapperElem,
9648
+ class: 'vxe-table-custom-popup--body-wrapper'
9649
+ }, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9650
+ ref: refCustomBodyElem,
9651
+ class: 'vxe-table-custom-popup--handle-wrapper'
9540
9652
  }, [topSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9541
9653
  class: 'vxe-table-custom-popup--table-top'
9542
9654
  }, $xeTable.callSlot(topSlot, params)) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
@@ -9568,7 +9680,7 @@ const {
9568
9680
  default: () => trVNs
9569
9681
  })])]), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
9570
9682
  class: 'vxe-table-custom-popup--table-bottom'
9571
- }, $xeTable.callSlot(bottomSlot, params)) : panel_renderEmptyElement($xeTable), renderDragTip()]);
9683
+ }, $xeTable.callSlot(bottomSlot, params)) : panel_renderEmptyElement($xeTable), renderDragTip()])]);
9572
9684
  },
9573
9685
  footer: () => {
9574
9686
  if (footerSlot) {
@@ -9666,7 +9778,22 @@ const {
9666
9778
  errLog('vxe.error.reqComp', ['vxe-radio-group']);
9667
9779
  }
9668
9780
  });
9669
- return renderVN;
9781
+ const $xeTableCustomPanel = {
9782
+ xID,
9783
+ props,
9784
+ context,
9785
+ reactData: customPanelReactData,
9786
+ internalData: customPanelInternalData,
9787
+ xeTable: $xeTable,
9788
+ getRefMaps: () => refMaps,
9789
+ getComputeMaps: () => computeMaps,
9790
+ renderVN
9791
+ };
9792
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeTableCustomPanel', $xeTableCustomPanel);
9793
+ return $xeTableCustomPanel;
9794
+ },
9795
+ render() {
9796
+ return this.renderVN();
9670
9797
  }
9671
9798
  }));
9672
9799
  ;// ./packages/table/module/filter/panel.ts
@@ -10837,7 +10964,7 @@ if(resizableData||sortData||visibleData||fixedData){external_root_XEUtils_common
10837
10964
  if(!parentColumn){if(fixedData&&fixedData[colKey]!==undefined){column.fixed=fixedData[colKey];}if(sortData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(sortData[colKey])){hasCustomSort=true;column.renderSortNumber=sortData[colKey];}}if(resizableData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(resizableData[colKey])){column.resizeWidth=resizableData[colKey];}if(visibleData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(visibleData[colKey])){column.visible=visibleData[colKey];}});// 如果自定义了顺序
10838
10965
  if(hasCustomSort){collectColumn=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(collectColumn,'renderSortNumber');internalData.collectColumn=collectColumn;internalData.tableFullColumn=getColumnList(collectColumn);}reactData.isCustomStatus=true;}else{reactData.isCustomStatus=false;}};/**
10839
10966
  * 还原自定义列操作状态
10840
- */const restoreCustomStorage=()=>{const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{storage,restoreStore,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=isAllCustom?{}:Object.assign({},storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);if((customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort)){if(!tableId){errLog('vxe.error.reqProp',['id']);return;}const storeData=getCustomStorageMap(tableId);if(restoreStore){return Promise.resolve(restoreStore({$table:$xeTable,id:tableId,type:'restore',storeData})).then(storeData=>{if(!storeData){return;}return handleCustomRestore(storeData);}).catch(e=>e);}else{return handleCustomRestore(storeData);}}};/**
10967
+ */const restoreCustomStorage=()=>{const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{storage,restoreStore,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=isAllCustom?{}:Object.assign({},storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort)){if(!tableId){errLog('vxe.error.reqProp',['id']);return;}const storeData=getCustomStorageMap(tableId);if(restoreStore){return Promise.resolve(restoreStore({$table:$xeTable,id:tableId,type:'restore',storeData})).then(storeData=>{if(!storeData){return;}return handleCustomRestore(storeData);}).catch(e=>e);}else{return handleCustomRestore(storeData);}}};/**
10841
10968
  * 更新数据列的 Map
10842
10969
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
10843
10970
  */const cacheColumnMap=()=>{const{tableFullColumn,collectColumn}=internalData;const fullColumnIdData=internalData.fullColumnIdData={};const fullColumnFieldData=internalData.fullColumnFieldData={};const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const columnOpts=computeColumnOpts.value;const columnDragOpts=computeColumnDragOpts.value;const virtualYOpts=computeVirtualYOpts.value;const{isCrossDrag,isSelfToChildDrag}=columnDragOpts;const customOpts=computeCustomOpts.value;const{storage}=customOpts;const rowOpts=computeRowOpts.value;const isGroup=collectColumn.some(hasChildrenList);let isAllOverflow=!!props.showOverflow;let rowGroupColumn;let expandColumn;let treeNodeColumn;let checkboxColumn;let radioColumn;let htmlColumn;let hasFixed;const handleFunc=(column,index,items,path,parentColumn)=>{const{id:colid,field,fixed,type,treeNode,rowGroupNode}=column;const rest={$index:-1,_index:-1,column,colid,index,items,parent:parentColumn||null,width:0,oLeft:0};if(field){if(fullColumnFieldData[field]){errLog('vxe.error.colRepet',['field',field]);}fullColumnFieldData[field]=rest;}else{if(storage&&!type||columnOpts.drag&&(isCrossDrag||isSelfToChildDrag)){errLog('vxe.error.reqProp',[`${column.getTitle()||type||''} -> column.field=?`]);}}if(!hasFixed&&fixed){hasFixed=fixed;}if(!htmlColumn&&type==='html'){htmlColumn=column;}if(treeNode){if(treeNodeColumn){warnLog('vxe.error.colRepet',['tree-node',treeNode]);}if(!treeNodeColumn){treeNodeColumn=column;}}if(rowGroupNode){if(treeNodeColumn){warnLog('vxe.error.colRepet',['row-group-node',rowGroupNode]);}if(!rowGroupColumn){rowGroupColumn=column;}}if(type==='expand'){if(expandColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!expandColumn){expandColumn=column;}}if(type==='checkbox'){if(checkboxColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!checkboxColumn){checkboxColumn=column;}}else if(type==='radio'){if(radioColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!radioColumn){radioColumn=column;}}if(isAllOverflow&&column.showOverflow===false){isAllOverflow=false;}if(fullColumnIdData[colid]){errLog('vxe.error.colRepet',['colId',colid]);}fullColumnIdData[colid]=rest;};if(isGroup){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn,nodes)=>{column.level=nodes.length;handleFunc(column,index,items,path,parentColumn);});}else{tableFullColumn.forEach(handleFunc);}if(expandColumn&&expandOpts.mode!=='fixed'&&virtualYOpts.enabled){warnLog('vxe.error.notConflictProp',['column.type="expand','virtual-y-config.enabled=false']);}if(expandColumn&&expandOpts.mode!=='fixed'&&mouseOpts.area){errLog('vxe.error.errConflicts',['mouse-config.area','column.type=expand']);}if(htmlColumn){if(!columnOpts.useKey){errLog('vxe.error.reqProp',['column-config.useKey & column.type=html']);}if(!rowOpts.useKey){errLog('vxe.error.reqProp',['row-config.useKey & column.type=html']);}}reactData.isGroup=isGroup;reactData.rowGroupColumn=rowGroupColumn;reactData.treeNodeColumn=treeNodeColumn;reactData.expandColumn=expandColumn;reactData.isAllOverflow=isAllOverflow;};const updateHeight=()=>{internalData.customHeight=calcTableHeight('height');internalData.customMinHeight=calcTableHeight('minHeight');internalData.customMaxHeight=calcTableHeight('maxHeight');// 如果启用虚拟滚动,默认高度
@@ -11291,7 +11418,7 @@ rowExpandedMaps={};internalData.rowExpandedMaps=rowExpandedMaps;rows=rows.slice(
11291
11418
  */isRowExpandByRow(row){const{rowExpandedFlag}=reactData;const{rowExpandedMaps}=internalData;const rowid=getRowid($xeTable,row);return!!rowExpandedFlag&&!!rowExpandedMaps[rowid];},isExpandByRow(row){// 已废弃
11292
11419
  warnLog('vxe.error.delFunc',['isExpandByRow','isRowExpandByRow']);return tableMethods.isRowExpandByRow(row);},/**
11293
11420
  * 手动清空展开行状态,数据会恢复成未展开的状态
11294
- */clearRowExpand(){const{tableFullData}=internalData;const expandOpts=computeExpandOpts.value;const{reserve}=expandOpts;const expList=$xeTable.getRowExpandRecords();internalData.rowExpandedMaps={};reactData.rowExpandedFlag++;if(reserve){tableFullData.forEach(row=>handleRowExpandReserve(row,false));}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{if(expList.length){return $xeTable.recalculate(true);}}).then(()=>{updateRowOffsetTop();updateRowExpandStyle();handleRowExpandScroll();return $xeTable.updateCellAreas();});},clearRowExpandReserve(){internalData.rowExpandedReserveRowMap={};return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},getRowExpandRecords(){const rest=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(internalData.rowExpandedMaps,item=>{if(item){rest.push(item);}});return rest;},setRowGroups(fieldOrColumns){const{aggregateConfig,rowGroupConfig}=props;if(!(aggregateConfig||rowGroupConfig)){errLog('vxe.error.reqProp',['aggregate-config']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}if(fieldOrColumns){handleUpdateRowGroup((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrColumns)?fieldOrColumns:[fieldOrColumns]).map(fieldOrColumn=>{return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(fieldOrColumn)?fieldOrColumn:fieldOrColumn.field;}));return loadTableData(internalData.tableSynchData,true);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},clearRowGroups(){const{aggregateConfig,rowGroupConfig}=props;if(!(aggregateConfig||rowGroupConfig)){errLog('vxe.error.reqProp',['aggregate-config']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}handleUpdateRowGroup([]);return loadTableData(internalData.tableSynchData,true);},isRowGroupRecord(row){warnLog('vxe.error.delFunc',['isRowGroupRecord','isAggregateRecord']);return $xeTable.isAggregateRecord(row);},isRowGroupExpandByRow(row){warnLog('vxe.error.delFunc',['isRowGroupExpandByRow','isAggregateExpandByRow']);return $xeTable.isAggregateExpandByRow(row);},isAggregateRecord(row){const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row.isAggregate;},isAggregateExpandByRow(row){const{rowGroupExpandedFlag}=reactData;const{rowGroupExpandedMaps}=internalData;return!!rowGroupExpandedFlag&&!!rowGroupExpandedMaps[getRowid($xeTable,row)];},setRowGroupExpand(rows,expanded){if(rows){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)){rows=[rows];}return handleRowGroupVirtualExpand(rows,expanded);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},setAllRowGroupExpand(expanded){const{tableFullGroupData}=internalData;const aggregateOpts=computeAggregateOpts.value;const{mapChildrenField}=aggregateOpts;const rgExpandedMaps={};if(expanded&&mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,row=>{if(row[mapChildrenField]&&row[mapChildrenField].length){rgExpandedMaps[getRowid($xeTable,row)]=row;}},{children:mapChildrenField});}internalData.rowGroupExpandedMaps=rgExpandedMaps;handleVirtualTreeToList();$xeTable.handleTableData();updateAfterDataIndex();reactData.rowGroupExpandedFlag++;return $xeTable.recalculate(true);},clearRowGroupExpand(){internalData.rowGroupExpandedMaps={};handleVirtualTreeToList();$xeTable.handleTableData();updateAfterDataIndex();reactData.rowGroupExpandedFlag++;return $xeTable.recalculate(true);},getTreeExpandRecords(){const rest=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(internalData.treeExpandedMaps,item=>{if(item){rest.push(item);}});return rest;},/**
11421
+ */clearRowExpand(){const{tableFullData}=internalData;const expandOpts=computeExpandOpts.value;const{reserve}=expandOpts;const expList=$xeTable.getRowExpandRecords();internalData.rowExpandedMaps={};reactData.rowExpandedFlag++;if(reserve){tableFullData.forEach(row=>handleRowExpandReserve(row,false));}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{if(expList.length){return $xeTable.recalculate(true);}}).then(()=>{updateRowOffsetTop();updateRowExpandStyle();handleRowExpandScroll();return $xeTable.updateCellAreas();});},clearRowExpandReserve(){internalData.rowExpandedReserveRowMap={};return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},getRowExpandRecords(){const rest=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(internalData.rowExpandedMaps,item=>{if(item){rest.push(item);}});return rest;},setRowGroups(fieldOrColumns){const{aggregateConfig,rowGroupConfig}=props;const{rowGroupList}=reactData;const aggregateOpts=computeAggregateOpts.value;const{maxGroupSize}=aggregateOpts;if(!(aggregateConfig||rowGroupConfig)){errLog('vxe.error.reqProp',['aggregate-config']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const confList=fieldOrColumns?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrColumns)?fieldOrColumns:[fieldOrColumns]:[];if(maxGroupSize&&rowGroupList.length+confList.length>maxGroupSize){if(core_.VxeUI.modal){core_.VxeUI.modal.message({status:'error',content:table_getI18n('vxe.table.maxGroupCol',[maxGroupSize])});}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}if(confList.length){handleUpdateRowGroup(confList.map(fieldOrColumn=>{return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(fieldOrColumn)?fieldOrColumn:fieldOrColumn.field;}));return loadTableData(internalData.tableSynchData,true);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},clearRowGroups(){const{aggregateConfig,rowGroupConfig}=props;if(!(aggregateConfig||rowGroupConfig)){errLog('vxe.error.reqProp',['aggregate-config']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}handleUpdateRowGroup([]);return loadTableData(internalData.tableSynchData,true);},isRowGroupRecord(row){warnLog('vxe.error.delFunc',['isRowGroupRecord','isAggregateRecord']);return $xeTable.isAggregateRecord(row);},isRowGroupExpandByRow(row){warnLog('vxe.error.delFunc',['isRowGroupExpandByRow','isAggregateExpandByRow']);return $xeTable.isAggregateExpandByRow(row);},isAggregateRecord(row){const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row.isAggregate;},getAggregateContentByRow(row){const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row&&row.isAggregate?row.groupContent:'';},getAggregateRowChildren(row){const aggregateOpts=computeAggregateOpts.value;const{childrenField,mapChildrenField}=aggregateOpts;const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row&&row.isAggregate&&childrenField&&mapChildrenField?row[mapChildrenField]||[]:[];},isAggregateExpandByRow(row){const{rowGroupExpandedFlag}=reactData;const{rowGroupExpandedMaps}=internalData;return!!rowGroupExpandedFlag&&!!rowGroupExpandedMaps[getRowid($xeTable,row)];},setRowGroupExpand(rows,expanded){if(rows){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)){rows=[rows];}return handleRowGroupVirtualExpand(rows,expanded);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},setAllRowGroupExpand(expanded){const{tableFullGroupData}=internalData;const aggregateOpts=computeAggregateOpts.value;const{mapChildrenField}=aggregateOpts;const rgExpandedMaps={};if(expanded&&mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,row=>{if(row[mapChildrenField]&&row[mapChildrenField].length){rgExpandedMaps[getRowid($xeTable,row)]=row;}},{children:mapChildrenField});}internalData.rowGroupExpandedMaps=rgExpandedMaps;handleVirtualTreeToList();$xeTable.handleTableData();updateAfterDataIndex();reactData.rowGroupExpandedFlag++;return $xeTable.recalculate(true);},clearRowGroupExpand(){internalData.rowGroupExpandedMaps={};handleVirtualTreeToList();$xeTable.handleTableData();updateAfterDataIndex();reactData.rowGroupExpandedFlag++;return $xeTable.recalculate(true);},getTreeExpandRecords(){const rest=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(internalData.treeExpandedMaps,item=>{if(item){rest.push(item);}});return rest;},/**
11295
11422
  * 判断树节点是否懒加载完成
11296
11423
  * @param {Row} row 行对象
11297
11424
  */isTreeExpandLoaded(row){const{fullAllDataRowIdData}=internalData;const rowRest=fullAllDataRowIdData[getRowid($xeTable,row)];return rowRest&&!!rowRest.treeLoaded;},clearTreeExpandLoaded(rows){const{fullAllDataRowIdData,treeExpandedMaps}=internalData;const treeOpts=computeTreeOpts.value;const{transform}=treeOpts;if(rows){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)){rows=[rows];}rows.forEach(row=>{const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){rowRest.treeLoaded=false;if(treeExpandedMaps[rowid]){delete treeExpandedMaps[rowid];}}});}else{external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(fullAllDataRowIdData,rowRest=>{rowRest.treeLoaded=false;});}internalData.treeExpandedMaps={};if(transform){handleVirtualTreeToList();$xeTable.handleTableData();}reactData.treeExpandedFlag++;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},/**
@@ -11349,7 +11476,7 @@ if(transform){return handleVirtualTreeExpand(rows,expanded);}else{return handleB
11349
11476
  * 获取所有被合并的表尾
11350
11477
  */getMergeFooterItems(){return internalData.mergeFooterList.slice(0);},/**
11351
11478
  * 清除所有表尾合并
11352
- */clearMergeFooterItems(){internalData.mergeFooterList=[];internalData.mergeFooterMaps={};internalData.mergeFooterCellMaps={};reactData.mergeFootFlag++;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{return updateStyle();});},updateCellAreas(){const{mouseConfig}=props;const mouseOpts=computeMouseOpts.value;if(mouseConfig&&mouseOpts.area&&$xeTable.handleRecalculateCellAreaEvent){return $xeTable.handleRecalculateCellAreaEvent();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},getCustomStoreData(){const{id}=props;const customOpts=computeCustomOpts.value;const{collectColumn}=internalData;const{storage,checkMethod,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=isAllCustom?{}:Object.assign({},storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const resizableData={};const sortData={};const visibleData={};const fixedData={};const storeData={resizableData:undefined,sortData:undefined,visibleData:undefined,fixedData:undefined};if(!id){errLog('vxe.error.reqProp',['id']);return storeData;}let hasResizable=0;let hasSort=0;let hasFixed=0;let hasVisible=0;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const colKey=column.getKey();if(!colKey){errLog('vxe.error.reqProp',[`${column.getTitle()||column.type||''} -> column.field=?`]);return;}// 只支持一级
11479
+ */clearMergeFooterItems(){internalData.mergeFooterList=[];internalData.mergeFooterMaps={};internalData.mergeFooterCellMaps={};reactData.mergeFootFlag++;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{return updateStyle();});},updateCellAreas(){const{mouseConfig}=props;const mouseOpts=computeMouseOpts.value;if(mouseConfig&&mouseOpts.area&&$xeTable.handleRecalculateCellAreaEvent){return $xeTable.handleRecalculateCellAreaEvent();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},getCustomStoreData(){const{id}=props;const customOpts=computeCustomOpts.value;const{collectColumn}=internalData;const{storage,checkMethod,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=isAllCustom?{}:Object.assign({},storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const resizableData={};const sortData={};const visibleData={};const fixedData={};const storeData={resizableData:undefined,sortData:undefined,visibleData:undefined,fixedData:undefined};if(!id){if(storage){errLog('vxe.error.reqProp',['id']);}return storeData;}let hasResizable=0;let hasSort=0;let hasFixed=0;let hasVisible=0;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const colKey=column.getKey();if(!colKey){errLog('vxe.error.reqProp',[`${column.getTitle()||column.type||''} -> column.field=?`]);return;}// 只支持一级
11353
11480
  if(!parentColumn){if(isCustomSort){hasSort=1;sortData[colKey]=column.renderSortNumber;}if(isCustomFixed&&column.fixed!==column.defaultFixed){hasFixed=1;fixedData[colKey]=column.fixed;}}if(isCustomResizable&&column.resizeWidth){hasResizable=1;resizableData[colKey]=column.renderWidth;}if(isCustomVisible&&(!checkMethod||checkMethod({$table:$xeTable,column}))){if(!column.visible&&column.defaultVisible){hasVisible=1;visibleData[colKey]=false;}else if(column.visible&&!column.defaultVisible){hasVisible=1;visibleData[colKey]=true;}}});if(hasResizable){storeData.resizableData=resizableData;}if(hasSort){storeData.sortData=sortData;}if(hasFixed){storeData.fixedData=fixedData;}if(hasVisible){storeData.visibleData=visibleData;}return storeData;},focus(){internalData.isActivated=true;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},blur(){internalData.isActivated=false;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},/**
11354
11481
  * 连接工具栏
11355
11482
  * @param $toolbar
@@ -11360,7 +11487,7 @@ if(tableFilter){if(getEventTargetNode(evnt,el,'vxe-cell--filter').flag){// 如
11360
11487
  }else if(getEventTargetNode(evnt,tableFilter.getRefMaps().refElem.value).flag){// 如果点击筛选容器
11361
11488
  }else{if(!getEventTargetNode(evnt,document.body,'vxe-table--ignore-clear').flag){tablePrivateMethods.preventEvent(evnt,'event.clearFilter',filterStore.args,tableMethods.closeFilter);}}}// 自定义列
11362
11489
  if(tableCustom){if(customStore.btnEl===evnt.target||getEventTargetNode(evnt,document.body,'vxe-toolbar-custom-target').flag){// 如果点击了自定义列按钮
11363
- }else if(getEventTargetNode(evnt,tableCustom.$el).flag){// 如果点击自定义列容器
11490
+ }else if(getEventTargetNode(evnt,tableCustom.getRefMaps().refElem.value).flag){// 如果点击自定义列容器
11364
11491
  }else{if(!getEventTargetNode(evnt,document.body,'vxe-table--ignore-clear').flag){tablePrivateMethods.preventEvent(evnt,'event.clearCustom',{},()=>{if($xeTable.closeCustom){$xeTable.closeCustom();}});}}}// 如果已激活了编辑状态
11365
11492
  if(actived.row){if(!(editOpts.autoClear===false)){// 如果是激活状态,点击了单元格之外
11366
11493
  const cell=actived.args.cell;if(!cell||!getEventTargetNode(evnt,cell).flag){if($validTooltip&&getEventTargetNode(evnt,$validTooltip.$el).flag){// 如果是激活状态,且点击了校验提示框
@@ -11451,14 +11578,14 @@ if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;ext
11451
11578
  const dragMinLeft=isRightFixed?0:cellRect.x-tableRect.x+dragBtnWidth+minInterval;const dragMaxLeft=cellRect.x-tableRect.x+cell.clientWidth-minInterval;let fixedLeftRemainWidth=0;let fixedRightRemainWidth=0;if(isLeftFixed||isRightFixed){let isMach=false;const fixedColumn=isLeftFixed?leftList:rightList;for(let i=0;i<fixedColumn.length;i++){const item=fixedColumn[i];if(isMach){fixedLeftRemainWidth+=item.renderWidth;}else{isMach=item.id===resizeColumn.id;if(!isMach){fixedRightRemainWidth+=item.renderWidth;}}}}// 处理拖动事件
11452
11579
  const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const tableHeight=tableEl.clientHeight;const offsetX=evnt.clientX-dragClientX;let left=dragPosLeft+offsetX;if(isLeftFixed){if(rightContainerRect){left=Math.min(left,rightContainerRect.x-tableRect.x-fixedLeftRemainWidth-minInterval);}}else if(isRightFixed){if(leftContainerElem){left=Math.max(left,leftContainerElem.clientWidth+fixedRightRemainWidth+minInterval);}left=Math.min(left,dragMaxLeft);}dragLeft=Math.max(left,dragMinLeft);const resizeBarLeft=Math.max(1,dragLeft);resizeBarElem.style.left=`${resizeBarLeft}px`;resizeBarElem.style.top=`${scrollbarXToTop?osbHeight:0}px`;resizeBarElem.style.height=`${scrollbarXToTop?tableHeight-osbHeight:tableHeight}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeColTip',[Math.floor(resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft))]);const tableWrapperWidth=tableEl.clientWidth;const resizeBarWidth=resizeBarElem.clientWidth;const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeTipLeft=-resizeTipWidth;if(resizeBarLeft<resizeTipWidth+resizeBarWidth){resizeTipLeft=0;}else if(resizeBarLeft>tableWrapperWidth){resizeTipLeft+=tableWrapperWidth-resizeBarLeft;}resizeTipElem.style.left=`${resizeTipLeft}px`;resizeTipElem.style.top=`${Math.min(tableHeight-resizeTipHeight,Math.max(0,evnt.clientY-tableRect.y-resizeTipHeight/2))}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'col-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);const resizeWidth=resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft);const resizeParams={...params,resizeWidth,resizeColumn};if(resizableOpts.dragMode==='fixed'){visibleColumn.forEach(item=>{if(item.id!==resizeColumn.id){if(!item.resizeWidth){item.resizeWidth=item.renderWidth;}}});}if($xeTable.handleColResizeCellAreaEvent){$xeTable.handleColResizeCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}removeClass(tableEl,'col-drag--resize');};updateEvent(evnt);if($xeTable.closeMenu){$xeTable.closeMenu();}},handleColResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoWidth}=resizableOpts;const el=refElem.value;if(isDblclickAutoWidth&&el){evnt.stopPropagation();evnt.preventDefault();const{fullColumnIdData}=internalData;const{column}=params;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const colid=resizeColumn.id;const colRest=fullColumnIdData[colid];const dragBtnElem=evnt.target;const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});const colMinWidth=getColReMinWidth(cellParams);el.setAttribute('data-calc-col','Y');let resizeWidth=calcColumnAutoWidth(resizeColumn,el);el.removeAttribute('data-calc-col');if(colRest){resizeWidth=Math.max(resizeWidth,colRest.width);}resizeWidth=Math.max(colMinWidth,resizeWidth);const resizeParams={...params,resizeWidth,resizeColumn};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleColResizeDblclickCellAreaEvent){$xeTable.handleColResizeDblclickCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}}},handleRowResizeMousedownEvent(evnt,params){evnt.stopPropagation();evnt.preventDefault();const{row}=params;const{overflowX,scrollbarWidth,overflowY,scrollbarHeight}=reactData;const{elemStore,fullAllDataRowIdData}=internalData;const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const scrollbarYToLeft=computeScrollbarYToLeft.value;const resizableOpts=computeResizableOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const tableEl=refElem.value;const resizeBarElem=refRowResizeBar.value;if(!resizeBarElem){return;}const{clientY:dragClientY}=evnt;const resizeTipElem=resizeBarElem.firstElementChild;const dragBtnElem=evnt.currentTarget;const tdEl=dragBtnElem.parentNode;const trEl=tdEl.parentNode;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const defaultRowHeight=computeDefaultRowHeight.value;const currCellHeight=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;const tableRect=tableEl.getBoundingClientRect();const trRect=trEl.getBoundingClientRect();const targetOffsetY=dragClientY-trRect.y-trEl.clientHeight;let resizeHeight=currCellHeight;const cellEl=tdEl.querySelector('.vxe-cell');let cellMinHeight=0;if(cellEl){const cellStyle=getComputedStyle(cellEl);cellMinHeight=Math.max(1,Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingTop)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingBottom)));}const minTop=trRect.y-tableRect.y+cellMinHeight;// 处理拖动事件
11453
11580
  const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const rtWidth=tableEl.clientWidth-osbWidth;const tableHeight=tableEl.clientHeight-osbHeight;let dragTop=evnt.clientY-tableRect.y-targetOffsetY;if(dragTop<minTop){dragTop=minTop;}else{resizeHeight=Math.max(cellMinHeight,currCellHeight+evnt.clientY-dragClientY);}resizeBarElem.style.left=`${scrollbarYToLeft?osbWidth:0}px`;resizeBarElem.style.top=`${dragTop}px`;resizeBarElem.style.width=`${rtWidth}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeRowTip',[resizeHeight]);const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeBarLeft=Math.max(2,evnt.clientX-tableRect.x);let resizeBarTop=0;if(resizeBarLeft+resizeTipWidth>=rtWidth-2){resizeBarLeft=rtWidth-resizeTipWidth-2;}if(dragTop+resizeTipHeight>=tableHeight){resizeBarTop=tableHeight-(dragTop+resizeTipHeight);}resizeTipElem.style.left=`${resizeBarLeft}px`;resizeTipElem.style.top=`${resizeBarTop}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'row-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);if(resizeHeight!==currCellHeight){const resizeParams={...params,resizeHeight,resizeRow:row};internalData.isResizeCellHeight=true;if($xeTable.handleRowResizeCellAreaEvent){$xeTable.handleRowResizeCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);updateRowOffsetTop();}}removeClass(tableEl,'row-drag--resize');};updateEvent(evnt);},handleRowResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoHeight}=resizableOpts;const el=refElem.value;if(isDblclickAutoHeight&&el){evnt.stopPropagation();evnt.preventDefault();const{editStore}=reactData;const{fullAllDataRowIdData}=internalData;const{actived}=editStore;const{row}=params;const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const handleRsHeight=()=>{el.setAttribute('data-calc-row','Y');const resizeHeight=calcCellAutoHeight(rowRest,el);el.removeAttribute('data-calc-row');const resizeParams={...params,resizeHeight,resizeRow:row};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleRowResizeDblclickCellAreaEvent){$xeTable.handleRowResizeDblclickCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);}};if(actived.row||actived.column){$xeTable.clearEdit().then(handleRsHeight);}else{handleRsHeight();}}},saveCustomStore(type){const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{updateStore,storage,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=isAllCustom?{}:Object.assign({},storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
11454
- reactData.isCustomStatus=true;}if((customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort)){if(!tableId){errLog('vxe.error.reqProp',['id']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const storeData=type==='reset'?{resizableData:{},sortData:{},visibleData:{},fixedData:{}}:tableMethods.getCustomStoreData();if(updateStore){return updateStore({$table:$xeTable,id:tableId,type,storeData});}else{setCustomStorageMap(tableId,type==='reset'?null:storeData);}}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},handleCustom(){const{mouseConfig}=props;if(mouseConfig){if($xeTable.clearSelected){$xeTable.clearSelected();}if($xeTable.clearCellAreas){$xeTable.clearCellAreas();$xeTable.clearCopyCellArea();}}tablePrivateMethods.analyColumnWidth();return tableMethods.refreshColumn(true);},handleUpdateDataQueue(){reactData.upDataFlag++;},handleRefreshColumnQueue(){reactData.reColumnFlag++;},preventEvent(evnt,type,args,next,end){let evntList=table_interceptor.get(type);// 兼容老版本
11581
+ reactData.isCustomStatus=true;}if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort)){if(!tableId){errLog('vxe.error.reqProp',['id']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const storeData=type==='reset'?{resizableData:{},sortData:{},visibleData:{},fixedData:{}}:tableMethods.getCustomStoreData();if(updateStore){return updateStore({$table:$xeTable,id:tableId,type,storeData});}else{setCustomStorageMap(tableId,type==='reset'?null:storeData);}}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},handleCustom(){const{mouseConfig}=props;if(mouseConfig){if($xeTable.clearSelected){$xeTable.clearSelected();}if($xeTable.clearCellAreas){$xeTable.clearCellAreas();$xeTable.clearCopyCellArea();}}tablePrivateMethods.analyColumnWidth();return tableMethods.refreshColumn(true);},handleUpdateDataQueue(){reactData.upDataFlag++;},handleRefreshColumnQueue(){reactData.reColumnFlag++;},preventEvent(evnt,type,args,next,end){let evntList=table_interceptor.get(type);// 兼容老版本
11455
11582
  if(!evntList.length&&type==='event.clearEdit'){evntList=table_interceptor.get('event.clearActived');if(evntList.length){warnLog('vxe.error.delEvent',['event.clearActived','event.clearEdit']);}}// 兼容老版本
11456
11583
  let rest=null;let isStop=false;for(let i=0;i<evntList.length;i++){const func=evntList[i];const fnRest=func(Object.assign({$grid:$xeGrid,$table:$xeTable,$event:evnt},args));if(fnRest===false){isStop=true;break;}else if(fnRest&&fnRest.status===false){rest=fnRest.result;isStop=true;break;}}if(!isStop){if(next){rest=next();}}if(end){end();}return rest;},updateCheckboxStatus(){const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{afterTreeFullData,afterGroupFullData,selectCheckboxMaps,treeIndeterminateRowMaps}=internalData;const aggregateOpts=computeAggregateOpts.value;const treeOpts=computeTreeOpts.value;const childrenField=treeOpts.children||treeOpts.childrenField;const checkboxOpts=computeCheckboxOpts.value;const{checkField,checkStrictly,checkMethod}=checkboxOpts;if(checkStrictly){return;}if(isRowGroupStatus||treeConfig){const{handleGetRowId}=createHandleGetRowId($xeTable);const childRowMaps={};const childRowList=[];if(isRowGroupStatus){// 行分组
11457
11584
  const mapChildrenField=aggregateOpts.mapChildrenField;if(mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterGroupFullData,row=>{const rowid=handleGetRowId(row);const childList=row[mapChildrenField];if(childList&&childList.length&&!childRowMaps[rowid]){childRowMaps[rowid]=1;childRowList.unshift([row,rowid,childList]);}},{children:mapChildrenField});}}else if(treeConfig){// 树结构
11458
11585
  const{transform,mapChildrenField}=treeOpts;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeFullData,row=>{const rowid=handleGetRowId(row);const childList=row[transform?mapChildrenField:childrenField];if(childList&&childList.length&&!childRowMaps[rowid]){childRowMaps[rowid]=1;childRowList.unshift([row,rowid,childList]);}},{children:transform?mapChildrenField:childrenField});}childRowList.forEach(vals=>{const row=vals[0];const rowid=vals[1];const childList=vals[2];let sLen=0;// 已选
11459
11586
  let hLen=0;// 半选
11460
11587
  let vLen=0;// 有效行
11461
- childList.forEach(checkMethod?item=>{const childRowid=handleGetRowId(item);const isSelect=checkField?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(item,checkField):selectCheckboxMaps[childRowid];if(checkMethod({$table:$xeTable,row:item})){if(isSelect){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}vLen++;}else{if(isSelect){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}}}:item=>{const childRowid=handleGetRowId(item);const isSelect=checkField?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(item,checkField):selectCheckboxMaps[childRowid];if(isSelect){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}vLen++;});const isSelected=sLen>=vLen;const halfSelect=!isSelected&&(sLen>=1||hLen>=1);if(checkField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row,checkField,isSelected);}if(isSelected){if(!checkField){selectCheckboxMaps[rowid]=row;}if(treeIndeterminateRowMaps[rowid]){delete treeIndeterminateRowMaps[rowid];}}else{if(!checkField){if(selectCheckboxMaps[rowid]){delete selectCheckboxMaps[rowid];}}if(halfSelect){treeIndeterminateRowMaps[rowid]=row;}else{if(treeIndeterminateRowMaps[rowid]){delete treeIndeterminateRowMaps[rowid];}}}});}reactData.updateCheckboxFlag++;},updateAllCheckboxStatus(){const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{afterFullData,afterTreeFullData,afterGroupFullData,checkboxReserveRowMap,selectCheckboxMaps,treeIndeterminateRowMaps}=internalData;const checkboxOpts=computeCheckboxOpts.value;const{checkField,checkMethod,showReserveStatus}=checkboxOpts;const{handleGetRowId}=createHandleGetRowId($xeTable);let sLen=0;// 已选
11588
+ childList.forEach(checkMethod?item=>{const childRowid=handleGetRowId(item);const isSelect=checkField?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(item,checkField):selectCheckboxMaps[childRowid];if(checkMethod({$table:$xeTable,row:item})){if(isSelect){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}vLen++;}else{if(isSelect){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}}}:item=>{const childRowid=handleGetRowId(item);const isSelect=checkField?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(item,checkField):selectCheckboxMaps[childRowid];if(isSelect){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}vLen++;});let isSelected=sLen>=vLen&&(vLen>=1||hLen>=1);if(checkMethod){if(checkMethod({$table:$xeTable,row})){isSelected=sLen>=vLen;}else{isSelected=selectCheckboxMaps[rowid];}}const halfSelect=!isSelected&&(sLen>=1||hLen>=1);if(checkField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row,checkField,isSelected);}if(isSelected){if(!checkField){selectCheckboxMaps[rowid]=row;}if(treeIndeterminateRowMaps[rowid]){delete treeIndeterminateRowMaps[rowid];}}else{if(!checkField){if(selectCheckboxMaps[rowid]){delete selectCheckboxMaps[rowid];}}if(halfSelect){treeIndeterminateRowMaps[rowid]=row;}else{if(treeIndeterminateRowMaps[rowid]){delete treeIndeterminateRowMaps[rowid];}}}});}reactData.updateCheckboxFlag++;},updateAllCheckboxStatus(){const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{afterFullData,afterTreeFullData,afterGroupFullData,checkboxReserveRowMap,selectCheckboxMaps,treeIndeterminateRowMaps}=internalData;const checkboxOpts=computeCheckboxOpts.value;const{checkField,checkMethod,showReserveStatus}=checkboxOpts;const{handleGetRowId}=createHandleGetRowId($xeTable);let sLen=0;// 已选
11462
11589
  let hLen=0;// 半选
11463
11590
  let vLen=0;// 有效行
11464
11591
  const rootList=treeConfig?afterTreeFullData:isRowGroupStatus?afterGroupFullData:afterFullData;rootList.forEach(checkMethod?row=>{const childRowid=handleGetRowId(row);const selected=checkField?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,checkField):selectCheckboxMaps[childRowid];if(checkMethod({$table:$xeTable,row})){if(selected){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}vLen++;}else{if(selected){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}}}:row=>{const childRowid=handleGetRowId(row);const selected=checkField?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,checkField):selectCheckboxMaps[childRowid];if(selected){sLen++;}else if(treeIndeterminateRowMaps[childRowid]){hLen++;}vLen++;});const isSelected=rootList.length>0?vLen>0?sLen>=vLen:sLen>=rootList.length:false;let halfSelect=!isSelected&&(sLen>=1||hLen>=1);// 如果复选框启用保留记录,当保留数据存在时显示半选
@@ -14945,7 +15072,7 @@ const {
14945
15072
  hooks: edit_hook_hooks,
14946
15073
  getI18n: hook_getI18n
14947
15074
  } = core_.VxeUI;
14948
- const tableEditMethodKeys = ['insert', 'insertAt', 'insertNextAt', 'insertChild', 'insertChildAt', 'insertChildNextAt', 'remove', 'removeCheckboxRow', 'removeRadioRow', 'removeCurrentRow', 'getRecordset', 'getInsertRecords', 'getRemoveRecords', 'getUpdateRecords', 'getEditRecord', 'getActiveRecord', 'getSelectedCell', 'clearEdit', 'clearActived', 'clearSelected', 'isEditByRow', 'isActiveByRow', 'setEditRow', 'setActiveRow', 'setEditCell', 'setActiveCell', 'setSelectCell'];
15075
+ const tableEditMethodKeys = ['insert', 'insertAt', 'insertNextAt', 'insertChild', 'insertChildAt', 'insertChildNextAt', 'remove', 'removeCheckboxRow', 'removeRadioRow', 'removeCurrentRow', 'getRecordset', 'getInsertRecords', 'getRemoveRecords', 'getUpdateRecords', 'getEditRecord', 'getActiveRecord', 'getEditCell', 'getSelectedCell', 'clearEdit', 'clearActived', 'clearSelected', 'isEditByRow', 'isActiveByRow', 'setEditRow', 'setActiveRow', 'setEditCell', 'setActiveCell', 'setSelectCell'];
14949
15076
  edit_hook_hooks.add('tableEditModule', {
14950
15077
  setupTable($xeTable) {
14951
15078
  const {
@@ -15844,23 +15971,56 @@ edit_hook_hooks.add('tableEditModule', {
15844
15971
  return [];
15845
15972
  },
15846
15973
  getActiveRecord() {
15847
- warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
15848
- return $xeTable.getEditRecord();
15974
+ warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditCell']);
15975
+ const {
15976
+ editStore
15977
+ } = reactData;
15978
+ const {
15979
+ fullAllDataRowIdData
15980
+ } = internalData;
15981
+ const {
15982
+ args,
15983
+ row
15984
+ } = editStore.actived;
15985
+ if (args && row && fullAllDataRowIdData[getRowid($xeTable, row)]) {
15986
+ return Object.assign({}, args, {
15987
+ row
15988
+ });
15989
+ }
15990
+ return null;
15849
15991
  },
15850
15992
  getEditRecord() {
15993
+ warnLog('vxe.error.delFunc', ['getEditRecord', 'getEditCell']);
15851
15994
  const {
15852
15995
  editStore
15853
15996
  } = reactData;
15854
15997
  const {
15855
- afterFullData
15998
+ fullAllDataRowIdData
15856
15999
  } = internalData;
15857
- const el = refElem.value;
15858
16000
  const {
15859
16001
  args,
15860
16002
  row
15861
16003
  } = editStore.actived;
15862
- if (args && $xeTable.findRowIndexOf(afterFullData, row) > -1 && el.querySelectorAll('.vxe-body--column.col--active').length) {
15863
- return Object.assign({}, args);
16004
+ if (args && row && fullAllDataRowIdData[getRowid($xeTable, row)]) {
16005
+ return Object.assign({}, args, {
16006
+ row
16007
+ });
16008
+ }
16009
+ return null;
16010
+ },
16011
+ getEditCell() {
16012
+ const {
16013
+ editStore
16014
+ } = reactData;
16015
+ const {
16016
+ row,
16017
+ column
16018
+ } = editStore.actived;
16019
+ if (column && row) {
16020
+ return {
16021
+ row,
16022
+ column
16023
+ };
15864
16024
  }
15865
16025
  return null;
15866
16026
  },
@@ -15872,11 +16032,14 @@ edit_hook_hooks.add('tableEditModule', {
15872
16032
  editStore
15873
16033
  } = reactData;
15874
16034
  const {
15875
- args,
16035
+ row,
15876
16036
  column
15877
16037
  } = editStore.selected;
15878
- if (args && column) {
15879
- return Object.assign({}, args);
16038
+ if (row && column) {
16039
+ return {
16040
+ row,
16041
+ column
16042
+ };
15880
16043
  }
15881
16044
  return null;
15882
16045
  },
@@ -16506,11 +16669,20 @@ export_hook_hooks.add('tableExportModule', {
16506
16669
  const childrenField = treeOpts.children || treeOpts.childrenField;
16507
16670
  // 如果是树表格只允许导出数据源
16508
16671
  const rest = [];
16509
- const expandMaps = new Map();
16672
+ const expandMaps = {};
16673
+ const useMaps = {};
16674
+ const {
16675
+ handleGetRowId
16676
+ } = createHandleGetRowId($xeTable);
16510
16677
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(datas, (item, $rowIndex, items, path, parent, nodes) => {
16511
16678
  const row = item._row || item;
16679
+ const rowid = handleGetRowId(row);
16680
+ if (useMaps[rowid]) {
16681
+ return;
16682
+ }
16512
16683
  const parentRow = parent && parent._row ? parent._row : parent;
16513
- if (isAllExpand || !parentRow || expandMaps.has(parentRow) && $xeTable.isTreeExpandByRow(parentRow)) {
16684
+ const pRowid = parentRow ? handleGetRowId(parentRow) : '';
16685
+ if (isAllExpand || !parentRow || expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)) {
16514
16686
  const hasRowChild = hasTreeChildren(row);
16515
16687
  const item = {
16516
16688
  _row: row,
@@ -16581,7 +16753,10 @@ export_hook_hooks.add('tableExportModule', {
16581
16753
  }
16582
16754
  item[column.id] = toStringValue(cellValue);
16583
16755
  });
16584
- expandMaps.set(row, 1);
16756
+ useMaps[rowid] = true;
16757
+ if (pRowid) {
16758
+ expandMaps[pRowid] = true;
16759
+ }
16585
16760
  rest.push(Object.assign(item, row));
16586
16761
  }
16587
16762
  }, {
@@ -17455,6 +17630,7 @@ export_hook_hooks.add('tableExportModule', {
17455
17630
  const {
17456
17631
  tableFullColumn,
17457
17632
  afterFullData,
17633
+ afterTreeFullData,
17458
17634
  collectColumn,
17459
17635
  mergeBodyList,
17460
17636
  mergeFooterList
@@ -17734,8 +17910,10 @@ export_hook_hooks.add('tableExportModule', {
17734
17910
  }
17735
17911
  }
17736
17912
  if (mode === 'current') {
17737
- handleOptions.data = afterFullData;
17913
+ handleOptions.data = treeConfig ? afterTreeFullData : afterFullData;
17738
17914
  }
17915
+ } else {
17916
+ handleOptions._isCustomData = true;
17739
17917
  }
17740
17918
  return handleExport(handleOptions);
17741
17919
  },
@@ -19260,7 +19438,7 @@ validator_hook_hooks.add('tableValidatorModule', {
19260
19438
 
19261
19439
 
19262
19440
 
19263
- const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox'];
19441
+ const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'toggleCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox'];
19264
19442
  core_.VxeUI.hooks.add('tableCustomModule', {
19265
19443
  setupTable($xeTable) {
19266
19444
  const {
@@ -19338,6 +19516,15 @@ core_.VxeUI.hooks.add('tableCustomModule', {
19338
19516
  }
19339
19517
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
19340
19518
  };
19519
+ const toggleCustom = () => {
19520
+ const {
19521
+ customStore
19522
+ } = reactData;
19523
+ if (customStore.visible) {
19524
+ return closeCustom();
19525
+ }
19526
+ return openCustom();
19527
+ };
19341
19528
  const saveCustom = () => {
19342
19529
  const {
19343
19530
  customColumnList,
@@ -19494,6 +19681,7 @@ core_.VxeUI.hooks.add('tableCustomModule', {
19494
19681
  const customMethods = {
19495
19682
  openCustom,
19496
19683
  closeCustom,
19684
+ toggleCustom,
19497
19685
  saveCustom,
19498
19686
  cancelCustom,
19499
19687
  resetCustom(options) {
@@ -21106,6 +21294,7 @@ const Toolbar = VxeToolbar;
21106
21294
  customCancel: '取消',
21107
21295
  customRestore: '恢复默认',
21108
21296
  maxFixedCol: '最大冻结列的数量不能超过 {0} 个',
21297
+ maxGroupCol: '最大分组字段的数量不能超过 {0} 个',
21109
21298
  dragTip: '移动:{0}',
21110
21299
  resizeColTip: '宽:{0} 像素',
21111
21300
  resizeRowTip: '高:{0} 像素',
@@ -21588,7 +21777,10 @@ const Toolbar = VxeToolbar;
21588
21777
  extendPivotTable: {
21589
21778
  aggregation: {
21590
21779
  grouping: '分组',
21591
- values: '值'
21780
+ values: '值',
21781
+ groupPlaceholder: '拖至此处进行分组',
21782
+ valuesPlaceholder: '拖至此处进行聚合',
21783
+ dragExistCol: '该列已存在'
21592
21784
  }
21593
21785
  },
21594
21786
  filterComplexInput: {