vxe-table 4.19.22 → 4.19.23

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 (179) hide show
  1. package/dist/all.esm.js +630 -332
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/{iconfont.1782890314097.ttf → iconfont.1783046321610.ttf} +0 -0
  5. package/es/iconfont.1783046321610.woff +0 -0
  6. package/es/iconfont.1783046321610.woff2 +0 -0
  7. package/es/index.css +1 -1
  8. package/es/index.min.css +1 -1
  9. package/es/locale/lang/ar-EG.js +12 -3
  10. package/es/locale/lang/de-DE.js +12 -3
  11. package/es/locale/lang/en-US.js +16 -7
  12. package/es/locale/lang/es-ES.js +12 -3
  13. package/es/locale/lang/fr-FR.js +12 -3
  14. package/es/locale/lang/hu-HU.js +12 -3
  15. package/es/locale/lang/hy-AM.js +12 -3
  16. package/es/locale/lang/id-ID.js +12 -3
  17. package/es/locale/lang/it-IT.js +11 -2
  18. package/es/locale/lang/ja-JP.js +12 -3
  19. package/es/locale/lang/ko-KR.js +12 -3
  20. package/es/locale/lang/ms-MY.js +12 -3
  21. package/es/locale/lang/nb-NO.js +12 -3
  22. package/es/locale/lang/pt-BR.js +12 -3
  23. package/es/locale/lang/ru-RU.js +12 -3
  24. package/es/locale/lang/th-TH.js +12 -3
  25. package/es/locale/lang/ug-CN.js +12 -3
  26. package/es/locale/lang/uk-UA.js +12 -3
  27. package/es/locale/lang/uz-UZ.js +12 -3
  28. package/es/locale/lang/vi-VN.js +11 -2
  29. package/es/locale/lang/zh-CHT.js +14 -5
  30. package/es/locale/lang/zh-CN.js +14 -5
  31. package/es/style.css +1 -1
  32. package/es/style.min.css +1 -1
  33. package/es/table/module/custom/hook.js +83 -12
  34. package/es/table/module/custom/panel.js +398 -257
  35. package/es/table/src/columnInfo.js +14 -8
  36. package/es/table/src/emits.js +3 -0
  37. package/es/table/src/table.js +76 -45
  38. package/es/table/src/util.js +32 -1
  39. package/es/table/style.css +96 -49
  40. package/es/table/style.min.css +1 -1
  41. package/es/ui/index.js +16 -4
  42. package/es/ui/src/log.js +1 -1
  43. package/es/vxe-table/style.css +96 -49
  44. package/es/vxe-table/style.min.css +1 -1
  45. package/lib/{iconfont.1782890314097.ttf → iconfont.1783046321610.ttf} +0 -0
  46. package/lib/iconfont.1783046321610.woff +0 -0
  47. package/lib/iconfont.1783046321610.woff2 +0 -0
  48. package/lib/index.css +1 -1
  49. package/lib/index.min.css +1 -1
  50. package/lib/index.umd.js +518 -179
  51. package/lib/index.umd.min.js +1 -1
  52. package/lib/locale/lang/ar-EG.js +12 -3
  53. package/lib/locale/lang/ar-EG.min.js +1 -1
  54. package/lib/locale/lang/ar-EG.umd.js +12 -3
  55. package/lib/locale/lang/de-DE.js +12 -3
  56. package/lib/locale/lang/de-DE.min.js +1 -1
  57. package/lib/locale/lang/de-DE.umd.js +12 -3
  58. package/lib/locale/lang/en-US.js +16 -7
  59. package/lib/locale/lang/en-US.min.js +1 -1
  60. package/lib/locale/lang/en-US.umd.js +16 -7
  61. package/lib/locale/lang/es-ES.js +12 -3
  62. package/lib/locale/lang/es-ES.min.js +1 -1
  63. package/lib/locale/lang/es-ES.umd.js +12 -3
  64. package/lib/locale/lang/fr-FR.js +12 -3
  65. package/lib/locale/lang/fr-FR.min.js +1 -1
  66. package/lib/locale/lang/fr-FR.umd.js +12 -3
  67. package/lib/locale/lang/hu-HU.js +12 -3
  68. package/lib/locale/lang/hu-HU.min.js +1 -1
  69. package/lib/locale/lang/hu-HU.umd.js +12 -3
  70. package/lib/locale/lang/hy-AM.js +12 -3
  71. package/lib/locale/lang/hy-AM.min.js +1 -1
  72. package/lib/locale/lang/hy-AM.umd.js +12 -3
  73. package/lib/locale/lang/id-ID.js +12 -3
  74. package/lib/locale/lang/id-ID.min.js +1 -1
  75. package/lib/locale/lang/id-ID.umd.js +12 -3
  76. package/lib/locale/lang/it-IT.js +11 -2
  77. package/lib/locale/lang/it-IT.min.js +1 -1
  78. package/lib/locale/lang/it-IT.umd.js +11 -2
  79. package/lib/locale/lang/ja-JP.js +12 -3
  80. package/lib/locale/lang/ja-JP.min.js +1 -1
  81. package/lib/locale/lang/ja-JP.umd.js +12 -3
  82. package/lib/locale/lang/ko-KR.js +12 -3
  83. package/lib/locale/lang/ko-KR.min.js +1 -1
  84. package/lib/locale/lang/ko-KR.umd.js +12 -3
  85. package/lib/locale/lang/ms-MY.js +12 -3
  86. package/lib/locale/lang/ms-MY.min.js +1 -1
  87. package/lib/locale/lang/ms-MY.umd.js +12 -3
  88. package/lib/locale/lang/nb-NO.js +12 -3
  89. package/lib/locale/lang/nb-NO.min.js +1 -1
  90. package/lib/locale/lang/nb-NO.umd.js +12 -3
  91. package/lib/locale/lang/pt-BR.js +12 -3
  92. package/lib/locale/lang/pt-BR.min.js +1 -1
  93. package/lib/locale/lang/pt-BR.umd.js +12 -3
  94. package/lib/locale/lang/ru-RU.js +12 -3
  95. package/lib/locale/lang/ru-RU.min.js +1 -1
  96. package/lib/locale/lang/ru-RU.umd.js +12 -3
  97. package/lib/locale/lang/th-TH.js +12 -3
  98. package/lib/locale/lang/th-TH.min.js +1 -1
  99. package/lib/locale/lang/th-TH.umd.js +12 -3
  100. package/lib/locale/lang/ug-CN.js +12 -3
  101. package/lib/locale/lang/ug-CN.min.js +1 -1
  102. package/lib/locale/lang/ug-CN.umd.js +12 -3
  103. package/lib/locale/lang/uk-UA.js +12 -3
  104. package/lib/locale/lang/uk-UA.min.js +1 -1
  105. package/lib/locale/lang/uk-UA.umd.js +12 -3
  106. package/lib/locale/lang/uz-UZ.js +12 -3
  107. package/lib/locale/lang/uz-UZ.min.js +1 -1
  108. package/lib/locale/lang/uz-UZ.umd.js +12 -3
  109. package/lib/locale/lang/vi-VN.js +11 -2
  110. package/lib/locale/lang/vi-VN.min.js +1 -1
  111. package/lib/locale/lang/vi-VN.umd.js +11 -2
  112. package/lib/locale/lang/zh-CHT.js +14 -5
  113. package/lib/locale/lang/zh-CHT.min.js +1 -1
  114. package/lib/locale/lang/zh-CHT.umd.js +14 -5
  115. package/lib/locale/lang/zh-CN.js +14 -5
  116. package/lib/locale/lang/zh-CN.min.js +1 -1
  117. package/lib/locale/lang/zh-CN.umd.js +14 -5
  118. package/lib/style.css +1 -1
  119. package/lib/style.min.css +1 -1
  120. package/lib/table/module/custom/hook.js +90 -10
  121. package/lib/table/module/custom/hook.min.js +1 -1
  122. package/lib/table/module/custom/panel.js +333 -141
  123. package/lib/table/module/custom/panel.min.js +1 -1
  124. package/lib/table/src/columnInfo.js +17 -7
  125. package/lib/table/src/columnInfo.min.js +1 -1
  126. package/lib/table/src/emits.js +1 -1
  127. package/lib/table/src/emits.min.js +1 -1
  128. package/lib/table/src/table.js +9 -9
  129. package/lib/table/src/table.min.js +1 -1
  130. package/lib/table/src/util.js +38 -1
  131. package/lib/table/src/util.min.js +1 -1
  132. package/lib/table/style/style.css +96 -49
  133. package/lib/table/style/style.min.css +1 -1
  134. package/lib/ui/index.js +16 -4
  135. package/lib/ui/index.min.js +1 -1
  136. package/lib/ui/src/log.js +1 -1
  137. package/lib/ui/src/log.min.js +1 -1
  138. package/lib/vxe-table/style/style.css +96 -49
  139. package/lib/vxe-table/style/style.min.css +1 -1
  140. package/package.json +2 -2
  141. package/packages/locale/lang/ar-EG.ts +12 -3
  142. package/packages/locale/lang/de-DE.ts +12 -3
  143. package/packages/locale/lang/en-US.ts +16 -7
  144. package/packages/locale/lang/es-ES.ts +12 -3
  145. package/packages/locale/lang/fr-FR.ts +12 -3
  146. package/packages/locale/lang/hu-HU.ts +12 -3
  147. package/packages/locale/lang/hy-AM.ts +12 -3
  148. package/packages/locale/lang/id-ID.ts +12 -3
  149. package/packages/locale/lang/it-IT.ts +11 -2
  150. package/packages/locale/lang/ja-JP.ts +12 -3
  151. package/packages/locale/lang/ko-KR.ts +12 -3
  152. package/packages/locale/lang/ms-MY.ts +12 -3
  153. package/packages/locale/lang/nb-NO.ts +12 -3
  154. package/packages/locale/lang/pt-BR.ts +12 -3
  155. package/packages/locale/lang/ru-RU.ts +12 -3
  156. package/packages/locale/lang/th-TH.ts +12 -3
  157. package/packages/locale/lang/ug-CN.ts +12 -3
  158. package/packages/locale/lang/uk-UA.ts +12 -3
  159. package/packages/locale/lang/uz-UZ.ts +12 -3
  160. package/packages/locale/lang/vi-VN.ts +11 -2
  161. package/packages/locale/lang/zh-CHT.ts +14 -5
  162. package/packages/locale/lang/zh-CN.ts +14 -5
  163. package/packages/table/module/custom/hook.ts +83 -12
  164. package/packages/table/module/custom/panel.ts +481 -286
  165. package/packages/table/src/columnInfo.ts +14 -8
  166. package/packages/table/src/emits.ts +3 -0
  167. package/packages/table/src/table.ts +87 -46
  168. package/packages/table/src/util.ts +35 -1
  169. package/packages/ui/index.ts +15 -3
  170. package/styles/components/icon.scss +29 -2
  171. package/styles/components/table-module/custom.scss +88 -67
  172. package/styles/icon/iconfont.ttf +0 -0
  173. package/styles/icon/iconfont.woff +0 -0
  174. package/styles/icon/iconfont.woff2 +0 -0
  175. package/styles/theme/base.scss +11 -0
  176. package/es/iconfont.1782890314097.woff +0 -0
  177. package/es/iconfont.1782890314097.woff2 +0 -0
  178. package/lib/iconfont.1782890314097.woff +0 -0
  179. package/lib/iconfont.1782890314097.woff2 +0 -0
package/lib/index.umd.js CHANGED
@@ -3314,7 +3314,7 @@ function getDefaultConfig(val1, def1) {
3314
3314
  /* unused harmony import specifier */ var VxeUI;
3315
3315
 
3316
3316
 
3317
- const version = "4.19.22";
3317
+ const version = "4.19.23";
3318
3318
  core_.VxeUI.version = version;
3319
3319
  core_.VxeUI.tableVersion = version;
3320
3320
  core_.VxeUI.setConfig({
@@ -3425,6 +3425,7 @@ core_.VxeUI.setConfig({
3425
3425
  allowResizable: true,
3426
3426
  allowFixed: true,
3427
3427
  allowSort: true,
3428
+ allowAlign: true,
3428
3429
  showSortDragButton: true,
3429
3430
  showFooter: true,
3430
3431
  placement: 'top-right',
@@ -3433,9 +3434,11 @@ core_.VxeUI.setConfig({
3433
3434
  visible: true,
3434
3435
  resizable: true,
3435
3436
  sort: true,
3436
- fixed: true
3437
- // rowGroup: false,
3438
- // aggFunc: false
3437
+ fixed: true,
3438
+ align: true,
3439
+ headerAlign: true,
3440
+ footerAlign: true,
3441
+ aggFunc: true
3439
3442
  },
3440
3443
  // autoAggGroupValues: false,
3441
3444
  // checkMethod () {},
@@ -3658,6 +3661,15 @@ core_.VxeUI.setIcon({
3658
3661
  TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
3659
3662
  TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
3660
3663
  TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
3664
+ TABLE_CUSTOM_FIXED_LEFT: iconPrefix + 'fixed-left',
3665
+ TABLE_CUSTOM_FIXED_RIGHT: iconPrefix + 'fixed-right',
3666
+ TABLE_CUSTOM_ALIGN_LEFT: iconPrefix + 'align-left',
3667
+ TABLE_CUSTOM_ALIGN_CENTER: iconPrefix + 'align-center',
3668
+ TABLE_CUSTOM_ALIGN_RIGHT: iconPrefix + 'align-right',
3669
+ TABLE_CUSTOM_MOVE_UP: iconPrefix + 'arrows-up',
3670
+ TABLE_CUSTOM_MOVE_DN: iconPrefix + 'arrows-down',
3671
+ TABLE_CUSTOM_PUT_TOP: iconPrefix + 'top',
3672
+ TABLE_CUSTOM_PUT_BOTTOM: iconPrefix + 'bottom',
3661
3673
  TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
3662
3674
  TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
3663
3675
  TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
@@ -4101,7 +4113,7 @@ function wheelScrollTopTo(diffNum, cb) {
4101
4113
  const {
4102
4114
  log: log_log
4103
4115
  } = core_.VxeUI;
4104
- const tableVersion = `table v${"4.19.22"}`;
4116
+ const tableVersion = `table v${"4.19.23"}`;
4105
4117
  function createComponentLog(name) {
4106
4118
  const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
4107
4119
  const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
@@ -4147,6 +4159,10 @@ class ColumnInfo {
4147
4159
  field,
4148
4160
  width,
4149
4161
  visible,
4162
+ fixed,
4163
+ align,
4164
+ headerAlign,
4165
+ footerAlign,
4150
4166
  aggFunc,
4151
4167
  formatter,
4152
4168
  filterMultiple,
@@ -4218,10 +4234,10 @@ class ColumnInfo {
4218
4234
  minWidth: colConfs.minWidth,
4219
4235
  maxWidth: colConfs.maxWidth,
4220
4236
  resizable: colConfs.resizable,
4221
- fixed: colConfs.fixed,
4222
- align: colConfs.align,
4223
- headerAlign: colConfs.headerAlign,
4224
- footerAlign: colConfs.footerAlign,
4237
+ fixed,
4238
+ align,
4239
+ headerAlign,
4240
+ footerAlign,
4225
4241
  showOverflow: colConfs.showOverflow,
4226
4242
  showHeaderOverflow: colConfs.showHeaderOverflow,
4227
4243
  showFooterOverflow: colConfs.showFooterOverflow,
@@ -4258,7 +4274,7 @@ class ColumnInfo {
4258
4274
  titleHelp: colConfs.titleHelp,
4259
4275
  titlePrefix: colConfs.titlePrefix,
4260
4276
  titleSuffix: colConfs.titleSuffix,
4261
- aggFunc: colConfs.aggFunc,
4277
+ aggFunc,
4262
4278
  copyMethod: colConfs.copyMethod,
4263
4279
  cutMethod: colConfs.cutMethod,
4264
4280
  pasteMethod: colConfs.pasteMethod,
@@ -4272,8 +4288,11 @@ class ColumnInfo {
4272
4288
  defaultParentId: null,
4273
4289
  halfVisible: false,
4274
4290
  defaultVisible: defaultVisible,
4275
- defaultFixed: colConfs.fixed,
4276
- defaultAggFunc: colConfs.aggFunc,
4291
+ defaultFixed: fixed,
4292
+ defaultAlign: align,
4293
+ defaultHeaderAlign: headerAlign,
4294
+ defaultFooterAlign: footerAlign,
4295
+ defaultAggFunc: aggFunc,
4277
4296
  checked: false,
4278
4297
  halfChecked: false,
4279
4298
  disabled: false,
@@ -4296,6 +4315,9 @@ class ColumnInfo {
4296
4315
  renderAggFn: '',
4297
4316
  renderAggDigits: null,
4298
4317
  renderAggFormat: null,
4318
+ renderAlign: '',
4319
+ renderHeaderAlign: '',
4320
+ renderFooterAlign: '',
4299
4321
  renderFixed: '',
4300
4322
  renderVisible: false,
4301
4323
  renderWidth: defaultRenderWidth,
@@ -4586,7 +4608,8 @@ function createReactData() {
4586
4608
  activeWrapper: false,
4587
4609
  visible: false,
4588
4610
  maxHeight: null,
4589
- popupStyle: {},
4611
+ defPopupStyle: {},
4612
+ panePopupStyle: {},
4590
4613
  oldSortMaps: {},
4591
4614
  oldFixedMaps: {},
4592
4615
  oldVisibleMaps: {}
@@ -5468,6 +5491,41 @@ function colToVisible($xeTable, isForce, column, row) {
5468
5491
  }
5469
5492
  return Promise.resolve();
5470
5493
  }
5494
+ function hangleBolleanDefaultValue(currVal, defVal) {
5495
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(currVal) ? currVal : defVal;
5496
+ }
5497
+ function handleCustomStoreConfig($xeTable) {
5498
+ const {
5499
+ computeCustomOpts
5500
+ } = $xeTable.getComputeMaps();
5501
+ const customOpts = computeCustomOpts.value;
5502
+ const {
5503
+ storage,
5504
+ storeOptions
5505
+ } = customOpts;
5506
+ const isAllCustom = storage === true;
5507
+ const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
5508
+ const isCustomAlign = hangleBolleanDefaultValue(storageOpts.align, isAllCustom);
5509
+ const isCustomHeaderAlign = hangleBolleanDefaultValue(storageOpts.headerAlign, isAllCustom);
5510
+ const isCustomFooterAlign = hangleBolleanDefaultValue(storageOpts.footerAlign, isAllCustom);
5511
+ const isCustomResizable = hangleBolleanDefaultValue(storageOpts.resizable, isAllCustom);
5512
+ const isCustomVisible = hangleBolleanDefaultValue(storageOpts.visible, isAllCustom);
5513
+ const isCustomFixed = hangleBolleanDefaultValue(storageOpts.fixed, isAllCustom);
5514
+ const isCustomSort = hangleBolleanDefaultValue(storageOpts.sort, isAllCustom);
5515
+ const isCustomAggGroup = hangleBolleanDefaultValue(storageOpts.aggGroup, isAllCustom);
5516
+ const isCustomAggFunc = hangleBolleanDefaultValue(storageOpts.aggFunc, isAllCustom);
5517
+ return {
5518
+ isCustomAlign,
5519
+ isCustomHeaderAlign,
5520
+ isCustomFooterAlign,
5521
+ isCustomResizable,
5522
+ isCustomVisible,
5523
+ isCustomFixed,
5524
+ isCustomSort,
5525
+ isCustomAggGroup,
5526
+ isCustomAggFunc
5527
+ };
5528
+ }
5471
5529
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.every.js
5472
5530
  var es_iterator_every = __webpack_require__(1148);
5473
5531
  ;// ./packages/ui/src/vn.ts
@@ -7760,7 +7818,7 @@ const tableEmits = ['ready', 'init-rendered', 'data-rendered', 'update:data', 'k
7760
7818
  // 废弃
7761
7819
  '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', 'row-remove-dragend', 'row-insert-dragend', 'column-dragstart', 'column-dragover', 'column-dragend', 'enter-append-row', 'tab-append-row', 'edit-actived',
7762
7820
  // 废弃
7763
- 'edit-activated', 'edit-disabled', 'valid-error', 'scroll', 'scroll-boundary', 'custom', 'custom-open', 'custom-close', 'custom-cancel', 'custom-reset', 'custom-confirm', 'custom-visible-change', 'custom-visible-all', 'custom-fixed-change', 'custom-sort-change', 'change-fnr',
7821
+ 'edit-activated', 'edit-disabled', 'valid-error', 'scroll', 'scroll-boundary', 'custom', 'custom-open', 'custom-close', 'custom-cancel', 'custom-reset', 'custom-confirm', 'custom-visible-change', 'custom-visible-all', 'custom-fixed-change', 'custom-sort-change', 'custom-align-change', 'custom-header-align-change', 'custom-footer-align-change', 'change-fnr',
7764
7822
  // 废弃
7765
7823
  '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-extension-fill', 'cell-area-selection-all-start', 'cell-area-selection-all-end', 'cell-area-arrows-start', 'cell-area-arrows-end', 'cell-area-fill-copy', 'active-cell-change-start', 'active-cell-change-end'];
7766
7824
  ;// ./packages/grid/src/emits.ts
@@ -10125,6 +10183,22 @@ function panel_createInternalData() {
10125
10183
  }, evnt);
10126
10184
  }
10127
10185
  };
10186
+ const changeAlignOption = (column, targetAlign, colProperty, renderProperty, eName, evnt) => {
10187
+ const customOpts = computeCustomOpts.value;
10188
+ if (customOpts.immediate) {
10189
+ column[colProperty] = targetAlign;
10190
+ column[renderProperty] = targetAlign;
10191
+ tableReactData.isCustomStatus = true;
10192
+ $xeTable.handleCustom();
10193
+ $xeTable.saveCustomStore(`update:${colProperty}`);
10194
+ } else {
10195
+ column[renderProperty] = targetAlign;
10196
+ }
10197
+ $xeTable.dispatchEvent(eName, {
10198
+ column,
10199
+ [colProperty]: targetAlign
10200
+ }, evnt);
10201
+ };
10128
10202
  const allOptionEvent = evnt => {
10129
10203
  const {
10130
10204
  customStore
@@ -10642,7 +10716,7 @@ function panel_createInternalData() {
10642
10716
  const customOpts = computeCustomOpts.value;
10643
10717
  const columnDragOpts = computeColumnDragOpts.value;
10644
10718
  const {
10645
- popupStyle
10719
+ defPopupStyle
10646
10720
  } = customStore;
10647
10721
  const {
10648
10722
  immediate,
@@ -10787,7 +10861,7 @@ function panel_createInternalData() {
10787
10861
  }
10788
10862
  }) : panel_renderEmptyElement($xeTable)] : []) : panel_renderEmptyElement($xeTable), !parentItem && allowFixed ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
10789
10863
  class: 'vxe-table-custom--fixed-option'
10790
- }, [VxeUIButtonComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
10864
+ }, VxeUIButtonComponent ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
10791
10865
  mode: 'text',
10792
10866
  icon: column.renderFixed === 'left' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
10793
10867
  status: column.renderFixed === 'left' ? 'primary' : '',
@@ -10798,7 +10872,7 @@ function panel_createInternalData() {
10798
10872
  }) => {
10799
10873
  changeFixedOption(column, 'left', $event);
10800
10874
  }
10801
- }) : panel_renderEmptyElement($xeTable), VxeUIButtonComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
10875
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
10802
10876
  mode: 'text',
10803
10877
  icon: column.renderFixed === 'right' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
10804
10878
  status: column.renderFixed === 'right' ? 'primary' : '',
@@ -10809,7 +10883,7 @@ function panel_createInternalData() {
10809
10883
  }) => {
10810
10884
  changeFixedOption(column, 'right', $event);
10811
10885
  }
10812
- }) : panel_renderEmptyElement($xeTable)]) : panel_renderEmptyElement($xeTable)]));
10886
+ })] : []) : panel_renderEmptyElement($xeTable)]));
10813
10887
  }
10814
10888
  });
10815
10889
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
@@ -10819,7 +10893,7 @@ function panel_createInternalData() {
10819
10893
  [`size--${vSize}`]: vSize,
10820
10894
  'is--active': customStore.visible
10821
10895
  }],
10822
- style: popupStyle
10896
+ style: defPopupStyle
10823
10897
  }, customStore.visible ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
10824
10898
  ref: refBodyWrapperElem,
10825
10899
  class: 'vxe-table-custom-simple--body-wrapper'
@@ -10886,39 +10960,26 @@ function panel_createInternalData() {
10886
10960
  onClick: confirmCustomEvent
10887
10961
  }) : panel_renderEmptyElement($xeTable)])]) : null]), renderDragTip()])] : []);
10888
10962
  };
10889
- const renderPopupPanel = () => {
10890
- const $xeGrid = $xeTable.xeGrid;
10891
- const $xeGantt = $xeTable.xeGantt;
10963
+ const renderPopupBodys = () => {
10892
10964
  const {
10893
- customStore
10894
- } = props;
10895
- const {
10896
- treeConfig,
10897
- rowGroupConfig,
10898
- aggregateConfig,
10899
10965
  resizable: allResizable
10900
10966
  } = tableProps;
10901
10967
  const {
10902
- isCustomStatus,
10903
10968
  customColumnList
10904
10969
  } = tableReactData;
10905
10970
  const customOpts = computeCustomOpts.value;
10906
10971
  const columnDragOpts = computeColumnDragOpts.value;
10907
- const aggregateOpts = computeAggregateOpts.value;
10908
10972
  const {
10909
- placement: aggPlacement
10910
- } = aggregateOpts;
10911
- const {
10912
- mode,
10913
10973
  immediate,
10914
10974
  showSortDragButton,
10915
10975
  showSortMoveButton,
10916
10976
  showSortPutButton,
10917
- modalOptions,
10918
- drawerOptions,
10919
10977
  allowVisible,
10920
10978
  allowSort,
10921
10979
  allowFixed,
10980
+ allowAlign,
10981
+ allowHeaderAlign,
10982
+ allowFooterAlign,
10922
10983
  allowResizable,
10923
10984
  allowGroup,
10924
10985
  allowValues,
@@ -10926,40 +10987,17 @@ function panel_createInternalData() {
10926
10987
  visibleMethod
10927
10988
  } = customOpts;
10928
10989
  const columnOpts = computeColumnOpts.value;
10929
- const {
10930
- maxFixedSize
10931
- } = columnOpts;
10932
10990
  const resizableOpts = computeResizableOpts.value;
10933
10991
  const {
10934
10992
  minWidth: reMinWidth,
10935
10993
  maxWidth: reMaxWidth
10936
10994
  } = resizableOpts;
10937
- const modalOpts = Object.assign({}, modalOptions);
10938
- const drawerOpts = Object.assign({}, drawerOptions);
10939
10995
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
10940
10996
  const {
10941
10997
  isCrossDrag,
10942
10998
  isPeerDrag
10943
10999
  } = columnDragOpts;
10944
- const slots = customOpts.slots || {};
10945
- const headerSlot = slots.header;
10946
- const topSlot = slots.top;
10947
- const bottomSlot = slots.bottom;
10948
- const defaultSlot = slots.default;
10949
- const footerSlot = slots.footer;
10950
11000
  const trVNs = [];
10951
- const isAllChecked = customStore.isAll;
10952
- const isAllIndeterminate = customStore.isIndeterminate;
10953
- const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
10954
- const params = {
10955
- $table: $xeTable,
10956
- $grid: $xeGrid,
10957
- $gantt: $xeGantt,
10958
- columns: customColumnList,
10959
- isAllChecked,
10960
- isAllIndeterminate,
10961
- isCustomStatus
10962
- };
10963
11001
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parentItem) => {
10964
11002
  const isVisible = visibleMethod ? visibleMethod({
10965
11003
  $table: $xeTable,
@@ -10997,33 +11035,46 @@ function panel_createInternalData() {
10997
11035
  }) : false;
10998
11036
  const isHidden = !isChecked;
10999
11037
  const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
11000
- trVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', {
11001
- key: column.id,
11002
- colid: column.id,
11003
- class: [`vxe-table-custom-popup--row level--${column.level}`, {
11004
- 'is--group': isColGroup
11005
- }],
11006
- onDragstart: sortDragstartEvent,
11007
- onDragend: sortDragendEvent,
11008
- onDragover: sortDragoverEvent
11009
- }, [allowVisible ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11010
- class: 'vxe-table-custom-popup--column-item col--visible'
11011
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
11012
- class: ['vxe-table-custom--checkbox-option', {
11013
- 'is--checked': isChecked,
11014
- 'is--indeterminate': isIndeterminate,
11015
- 'is--disabled': isDisabled
11016
- }],
11017
- title: panel_getI18n('vxe.custom.setting.colVisible'),
11018
- onClick: evnt => {
11019
- if (!isDisabled) {
11020
- changeCheckboxOption(column, evnt);
11038
+ const alignList = [{
11039
+ icon: panel_getIcon().TABLE_CUSTOM_ALIGN_LEFT,
11040
+ value: 'left',
11041
+ title: panel_getI18n('vxe.custom.setting.anLeftTitle'),
11042
+ disabled: isHidden
11043
+ }, {
11044
+ icon: panel_getIcon().TABLE_CUSTOM_ALIGN_CENTER,
11045
+ value: 'center',
11046
+ title: panel_getI18n('vxe.custom.setting.anCenterTitle'),
11047
+ disabled: isHidden
11048
+ }, {
11049
+ icon: panel_getIcon().TABLE_CUSTOM_ALIGN_RIGHT,
11050
+ value: 'right',
11051
+ title: panel_getI18n('vxe.custom.setting.anRightTitle'),
11052
+ disabled: isHidden
11053
+ }];
11054
+ const tdVNs = [];
11055
+ if (allowVisible) {
11056
+ tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11057
+ key: 'av',
11058
+ class: 'vxe-table-custom-popup--column-td col--visible'
11059
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
11060
+ class: ['vxe-table-custom--checkbox-option', {
11061
+ 'is--checked': isChecked,
11062
+ 'is--indeterminate': isIndeterminate,
11063
+ 'is--disabled': isDisabled
11064
+ }],
11065
+ title: panel_getI18n('vxe.custom.setting.colVisible'),
11066
+ onClick: evnt => {
11067
+ if (!isDisabled) {
11068
+ changeCheckboxOption(column, evnt);
11069
+ }
11021
11070
  }
11022
- }
11023
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
11024
- class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
11025
- })])]) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11026
- class: 'vxe-table-custom-popup--column-item col--name'
11071
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
11072
+ class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
11073
+ })])]));
11074
+ }
11075
+ tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11076
+ key: 'at',
11077
+ class: 'vxe-table-custom-popup--column-td col--name'
11027
11078
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
11028
11079
  class: 'vxe-table-custom-popup--name'
11029
11080
  }, [allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
@@ -11051,7 +11102,7 @@ function panel_createInternalData() {
11051
11102
  class: 'vxe-table-custom-popup--move-btn'
11052
11103
  }, VxeUIButtonComponent ? [showSortMoveButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
11053
11104
  mode: 'text',
11054
- content: panel_getI18n('vxe.custom.setting.moveUp'),
11105
+ icon: 'vxe-icon-arrows-up',
11055
11106
  title: panel_getI18n('vxe.custom.setting.moveUpTitle'),
11056
11107
  disabled: index <= 0,
11057
11108
  onClick(evntParame) {
@@ -11059,7 +11110,7 @@ function panel_createInternalData() {
11059
11110
  }
11060
11111
  }) : panel_renderEmptyElement($xeTable), showSortMoveButton ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
11061
11112
  mode: 'text',
11062
- content: panel_getI18n('vxe.custom.setting.moveDn'),
11113
+ icon: 'vxe-icon-arrows-down',
11063
11114
  title: panel_getI18n('vxe.custom.setting.moveDnTitle'),
11064
11115
  disabled: index >= items.length - 1,
11065
11116
  onClick(evntParame) {
@@ -11067,7 +11118,7 @@ function panel_createInternalData() {
11067
11118
  }
11068
11119
  }) : panel_renderEmptyElement($xeTable), showSortPutButton && !parentItem ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
11069
11120
  mode: 'text',
11070
- content: panel_getI18n('vxe.custom.setting.putTop'),
11121
+ icon: 'vxe-icon-top',
11071
11122
  title: panel_getI18n('vxe.custom.setting.putTopTitle'),
11072
11123
  disabled: index <= 0,
11073
11124
  onClick(evntParame) {
@@ -11075,62 +11126,278 @@ function panel_createInternalData() {
11075
11126
  }
11076
11127
  }) : panel_renderEmptyElement($xeTable), showSortPutButton && !parentItem ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
11077
11128
  mode: 'text',
11078
- content: panel_getI18n('vxe.custom.setting.putBottom'),
11129
+ icon: 'vxe-icon-bottom',
11079
11130
  title: panel_getI18n('vxe.custom.setting.putBottomTitle'),
11080
11131
  disabled: index >= items.length - 1,
11081
11132
  onClick(evntParame) {
11082
11133
  sortMoveBottomEvent(evntParame, column);
11083
11134
  }
11084
- }) : panel_renderEmptyElement($xeTable)] : []) : panel_renderEmptyElement($xeTable)])]), allowResizable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11085
- class: 'vxe-table-custom-popup--column-item col--resizable'
11086
- }, [column.children && column.children.length || !(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-') : VxeUINumberInputComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUINumberInputComponent, {
11087
- type: 'integer',
11088
- immediate: false,
11089
- disabled: isHidden,
11090
- modelValue: column.renderResizeWidth,
11091
- min: customMinWidth || undefined,
11092
- max: customMaxWidth || undefined,
11093
- 'onUpdate:modelValue'(value) {
11094
- const width = Math.max(0, Number(value));
11095
- column.renderResizeWidth = width;
11096
- },
11097
- onChange() {
11098
- changeColumnWidth(column);
11099
- }
11100
- }) : panel_renderEmptyElement($xeTable)]) : panel_renderEmptyElement($xeTable), allowFixed ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11101
- class: 'vxe-table-custom-popup--column-item col--fixed'
11102
- }, [parentItem ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-') : VxeUIRadioGroupComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIRadioGroupComponent, {
11103
- modelValue: column.renderFixed || '',
11104
- type: 'button',
11105
- size: 'mini',
11106
- disabled: isHidden,
11107
- options: [{
11108
- label: panel_getI18n('vxe.custom.setting.fixedLeft'),
11109
- value: 'left',
11110
- disabled: isHidden || isMaxFixedColumn
11111
- }, {
11112
- label: panel_getI18n('vxe.custom.setting.fixedUnset'),
11113
- value: '',
11114
- disabled: isHidden
11115
- }, {
11116
- label: panel_getI18n('vxe.custom.setting.fixedRight'),
11117
- value: 'right',
11118
- disabled: isHidden || isMaxFixedColumn
11135
+ }) : panel_renderEmptyElement($xeTable)] : []) : panel_renderEmptyElement($xeTable)])]));
11136
+ if (allowResizable) {
11137
+ tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11138
+ key: 'aw',
11139
+ class: 'vxe-table-custom-popup--column-td col--resizable'
11140
+ }, [column.children && column.children.length || !(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-') : VxeUINumberInputComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUINumberInputComponent, {
11141
+ type: 'integer',
11142
+ immediate: false,
11143
+ disabled: isHidden,
11144
+ modelValue: column.renderResizeWidth,
11145
+ min: customMinWidth || undefined,
11146
+ max: customMaxWidth || undefined,
11147
+ 'onUpdate:modelValue'(value) {
11148
+ const width = Math.max(0, Number(value));
11149
+ column.renderResizeWidth = width;
11150
+ },
11151
+ onChange() {
11152
+ changeColumnWidth(column);
11153
+ }
11154
+ }) : panel_renderEmptyElement($xeTable)]));
11155
+ }
11156
+ if (allowFixed) {
11157
+ tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11158
+ key: 'af',
11159
+ class: 'vxe-table-custom-popup--column-td col--fixed'
11160
+ }, parentItem ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-')] : VxeUIRadioGroupComponent ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
11161
+ icon: column.renderFixed === 'left' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
11162
+ status: column.renderFixed === 'left' ? 'primary' : '',
11163
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
11164
+ title: panel_getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
11165
+ onClick: ({
11166
+ $event
11167
+ }) => {
11168
+ changeFixedOption(column, 'left', $event);
11169
+ }
11170
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
11171
+ icon: column.renderFixed === 'right' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
11172
+ status: column.renderFixed === 'right' ? 'primary' : '',
11173
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
11174
+ title: panel_getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
11175
+ onClick: ({
11176
+ $event
11177
+ }) => {
11178
+ changeFixedOption(column, 'right', $event);
11179
+ }
11180
+ })] : []));
11181
+ }
11182
+ if (allowAlign) {
11183
+ tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11184
+ key: 'aa',
11185
+ class: 'vxe-table-custom-popup--column-td col--align'
11186
+ }, VxeUIRadioGroupComponent ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIRadioGroupComponent, {
11187
+ modelValue: column.renderAlign || '',
11188
+ type: 'button',
11189
+ strict: false,
11190
+ disabled: isHidden,
11191
+ options: alignList,
11192
+ onChange({
11193
+ value,
11194
+ $event
11195
+ }) {
11196
+ changeAlignOption(column, value, 'align', 'renderAlign', 'custom-align-change', $event);
11197
+ }
11198
+ })] : []));
11199
+ }
11200
+ if (allowHeaderAlign) {
11201
+ tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11202
+ key: 'aha',
11203
+ class: 'vxe-table-custom-popup--column-td col--header-align'
11204
+ }, isColGroup ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-')] : VxeUIRadioGroupComponent ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIRadioGroupComponent, {
11205
+ modelValue: column.renderHeaderAlign || '',
11206
+ type: 'button',
11207
+ strict: false,
11208
+ disabled: isHidden,
11209
+ options: alignList,
11210
+ onChange({
11211
+ value,
11212
+ $event
11213
+ }) {
11214
+ changeAlignOption(column, value, 'headerAlign', 'renderHeaderAlign', 'custom-header-align-change', $event);
11215
+ }
11216
+ })] : []));
11217
+ }
11218
+ if (allowFooterAlign) {
11219
+ tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
11220
+ key: 'afa',
11221
+ class: 'vxe-table-custom-popup--column-td col--footer-align'
11222
+ }, isColGroup ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-')] : VxeUIRadioGroupComponent ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIRadioGroupComponent, {
11223
+ modelValue: column.renderFooterAlign || '',
11224
+ type: 'button',
11225
+ strict: false,
11226
+ disabled: isHidden,
11227
+ options: alignList,
11228
+ onChange({
11229
+ value,
11230
+ $event
11231
+ }) {
11232
+ changeAlignOption(column, value, 'footerAlign', 'renderFooterAlign', 'custom-footer-align-change', $event);
11233
+ }
11234
+ })] : []));
11235
+ }
11236
+ trVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', {
11237
+ key: column.id,
11238
+ colid: column.id,
11239
+ class: [`vxe-table-custom-popup--row level--${column.level}`, {
11240
+ 'is--group': isColGroup
11119
11241
  }],
11120
- onChange({
11121
- label,
11122
- $event
11123
- }) {
11124
- changeFixedOption(column, label, $event);
11125
- }
11126
- }) : panel_renderEmptyElement($xeTable)]) : panel_renderEmptyElement($xeTable)]));
11242
+ onDragstart: sortDragstartEvent,
11243
+ onDragend: sortDragendEvent,
11244
+ onDragover: sortDragoverEvent
11245
+ }, tdVNs));
11127
11246
  }
11128
11247
  });
11248
+ return trVNs;
11249
+ };
11250
+ const renderPopupPanel = () => {
11251
+ const $xeGrid = $xeTable.xeGrid;
11252
+ const $xeGantt = $xeTable.xeGantt;
11253
+ const {
11254
+ customStore
11255
+ } = props;
11256
+ const {
11257
+ treeConfig,
11258
+ rowGroupConfig,
11259
+ aggregateConfig
11260
+ } = tableProps;
11261
+ const {
11262
+ isCustomStatus,
11263
+ customColumnList
11264
+ } = tableReactData;
11265
+ const vSize = computeSize.value;
11266
+ const customOpts = computeCustomOpts.value;
11267
+ const aggregateOpts = computeAggregateOpts.value;
11268
+ const {
11269
+ panePopupStyle
11270
+ } = customStore;
11271
+ const {
11272
+ placement: aggPlacement
11273
+ } = aggregateOpts;
11274
+ const {
11275
+ mode,
11276
+ immediate,
11277
+ modalOptions,
11278
+ drawerOptions,
11279
+ allowVisible,
11280
+ allowFixed,
11281
+ allowAlign,
11282
+ allowHeaderAlign,
11283
+ allowFooterAlign,
11284
+ allowResizable
11285
+ } = customOpts;
11286
+ const columnOpts = computeColumnOpts.value;
11287
+ const {
11288
+ maxFixedSize
11289
+ } = columnOpts;
11290
+ const modalOpts = Object.assign({}, modalOptions);
11291
+ const drawerOpts = Object.assign({}, drawerOptions);
11292
+ const slots = customOpts.slots || {};
11293
+ const headerSlot = slots.header;
11294
+ const topSlot = slots.top;
11295
+ const bottomSlot = slots.bottom;
11296
+ const defaultSlot = slots.default;
11297
+ const footerSlot = slots.footer;
11298
+ const isAllChecked = customStore.isAll;
11299
+ const isAllIndeterminate = customStore.isIndeterminate;
11300
+ const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
11301
+ const params = {
11302
+ $table: $xeTable,
11303
+ $grid: $xeGrid,
11304
+ $gantt: $xeGantt,
11305
+ columns: customColumnList,
11306
+ isAllChecked,
11307
+ isAllIndeterminate,
11308
+ isCustomStatus
11309
+ };
11310
+ const colVNs = [];
11311
+ const headVNs = [];
11312
+ if (allowVisible) {
11313
+ colVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11314
+ key: 'av',
11315
+ class: 'vxe-table-custom-popup--column-col col--checkbox'
11316
+ }));
11317
+ headVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
11318
+ key: 'av',
11319
+ class: 'vxe-table-custom-popup--column-th col--checkbox'
11320
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
11321
+ class: ['vxe-table-custom--checkbox-option', {
11322
+ 'is--checked': isAllChecked,
11323
+ 'is--indeterminate': isAllIndeterminate
11324
+ }],
11325
+ title: panel_getI18n('vxe.table.allTitle'),
11326
+ onClick: allOptionEvent
11327
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
11328
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
11329
+ })
11330
+ // h('span', {
11331
+ // class: 'vxe-checkbox--label'
11332
+ // }, getI18n('vxe.toolbar.customAll'))
11333
+ ])]));
11334
+ }
11335
+ colVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11336
+ key: 'at',
11337
+ class: 'vxe-table-custom-popup--column-col col--title'
11338
+ }));
11339
+ headVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
11340
+ key: 'at',
11341
+ class: 'vxe-table-custom-popup--column-th col--title'
11342
+ }, panel_getI18n('vxe.custom.setting.colTitle')));
11343
+ if (allowResizable) {
11344
+ colVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11345
+ key: 'aw',
11346
+ class: 'vxe-table-custom-popup--column-col col--width'
11347
+ }));
11348
+ headVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
11349
+ key: 'aw',
11350
+ class: 'vxe-table-custom-popup--column-th col--width'
11351
+ }, panel_getI18n('vxe.custom.setting.colResizable')));
11352
+ }
11353
+ if (allowFixed) {
11354
+ colVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11355
+ key: 'af',
11356
+ class: 'vxe-table-custom-popup--column-col col--fixed'
11357
+ }));
11358
+ headVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
11359
+ key: 'af',
11360
+ class: 'vxe-table-custom-popup--column-th col--fixed'
11361
+ }, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])));
11362
+ }
11363
+ if (allowAlign) {
11364
+ colVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11365
+ key: 'aa',
11366
+ class: 'vxe-table-custom-popup--column-col col--align'
11367
+ }));
11368
+ headVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
11369
+ key: 'aa',
11370
+ class: 'vxe-table-custom-popup--column-th col--align'
11371
+ }, panel_getI18n('vxe.custom.setting.colAlign')));
11372
+ }
11373
+ if (allowHeaderAlign) {
11374
+ colVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11375
+ key: 'aha',
11376
+ class: 'vxe-table-custom-popup--column-col col--header-align'
11377
+ }));
11378
+ headVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
11379
+ key: 'aha',
11380
+ class: 'vxe-table-custom-popup--column-th col--header-align'
11381
+ }, panel_getI18n('vxe.custom.setting.colHeadAlign')));
11382
+ }
11383
+ if (allowFooterAlign) {
11384
+ colVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11385
+ key: 'afa',
11386
+ class: 'vxe-table-custom-popup--column-col col--footer-align'
11387
+ }));
11388
+ headVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
11389
+ key: 'afa',
11390
+ class: 'vxe-table-custom-popup--column-th col--footer-align'
11391
+ }, panel_getI18n('vxe.custom.setting.colFootAlign')));
11392
+ }
11129
11393
  const scopedSlots = {
11130
11394
  default: () => {
11131
11395
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
11132
11396
  ref: refBodyWrapperElem,
11133
- class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`]
11397
+ class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`, {
11398
+ [`size--${vSize}`]: vSize
11399
+ }],
11400
+ style: panePopupStyle
11134
11401
  }, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [!isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)($xeTable.getPivotTableAggregatePopupPanel(), {
11135
11402
  customStore
11136
11403
  }) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
@@ -11140,31 +11407,12 @@ function panel_createInternalData() {
11140
11407
  class: 'vxe-table-custom-popup--table-top'
11141
11408
  }, $xeTable.callSlot(topSlot, params)) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
11142
11409
  class: 'vxe-table-custom-popup--table-wrapper'
11143
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('colgroup', {}, [allowVisible ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11144
- class: 'vxe-table-custom-popup--table-col-seq'
11145
- }) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11146
- class: 'vxe-table-custom-popup--table-col-title'
11147
- }), allowResizable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11148
- class: 'vxe-table-custom-popup--table-col-width'
11149
- }) : panel_renderEmptyElement($xeTable), allowFixed ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
11150
- class: 'vxe-table-custom-popup--table-col-fixed'
11151
- }) : panel_renderEmptyElement($xeTable)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('thead', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', {}, [allowVisible ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
11152
- class: ['vxe-table-custom--checkbox-option', {
11153
- 'is--checked': isAllChecked,
11154
- 'is--indeterminate': isAllIndeterminate
11155
- }],
11156
- title: panel_getI18n('vxe.table.allTitle'),
11157
- onClick: allOptionEvent
11158
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
11159
- class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
11160
- }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
11161
- class: 'vxe-checkbox--label'
11162
- }, panel_getI18n('vxe.toolbar.customAll'))])]) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : panel_renderEmptyElement($xeTable), allowFixed ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : panel_renderEmptyElement($xeTable)])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.TransitionGroup, {
11410
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('colgroup', {}, colVNs), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('thead', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', {}, headVNs)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.TransitionGroup, {
11163
11411
  class: 'vxe-table-custom--panel-list',
11164
11412
  tag: 'tbody',
11165
11413
  name: 'vxe-table-custom--list'
11166
11414
  }, {
11167
- default: () => trVNs
11415
+ default: () => renderPopupBodys()
11168
11416
  })])]), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
11169
11417
  class: 'vxe-table-custom-popup--table-bottom'
11170
11418
  }, $xeTable.callSlot(bottomSlot, params)) : panel_renderEmptyElement($xeTable), renderDragTip()]), isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)($xeTable.getPivotTableAggregatePopupPanel(), {
@@ -11182,6 +11430,7 @@ function panel_createInternalData() {
11182
11430
  disabled: !isCustomStatus,
11183
11431
  onClick: resetCustomEvent
11184
11432
  }) : panel_renderEmptyElement($xeTable), immediate ? VxeUIButtonComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
11433
+ status: 'primary',
11185
11434
  content: customOpts.closeButtonText || panel_getI18n('vxe.table.customClose'),
11186
11435
  onClick: cancelCloseEvent
11187
11436
  }) : panel_renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
@@ -11220,8 +11469,8 @@ function panel_createInternalData() {
11220
11469
  className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
11221
11470
  modelValue: customStore.visible,
11222
11471
  title: modalOpts.title || panel_getI18n('vxe.custom.cstmTitle'),
11223
- width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
11224
- minWidth: modalOpts.minWidth || 700,
11472
+ width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
11473
+ minWidth: modalOpts.minWidth || 800,
11225
11474
  height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
11226
11475
  minHeight: modalOpts.minHeight || 400,
11227
11476
  showZoom: modalOpts.showZoom,
@@ -11230,6 +11479,7 @@ function panel_createInternalData() {
11230
11479
  mask: modalOpts.mask,
11231
11480
  lockView: modalOpts.lockView,
11232
11481
  resize: modalOpts.resize,
11482
+ transfer: modalOpts.transfer,
11233
11483
  escClosable: !!modalOpts.escClosable,
11234
11484
  maskClosable: !!modalOpts.maskClosable,
11235
11485
  destroyOnClose: true,
@@ -18266,6 +18516,7 @@ validator_hook_hooks.add('tableValidatorModule', {
18266
18516
 
18267
18517
 
18268
18518
  const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'getCustomVisible', 'toggleCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox'];
18519
+ const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align'];
18269
18520
  core_.VxeUI.hooks.add('tableCustomModule', {
18270
18521
  setupTable($xeTable) {
18271
18522
  const {
@@ -18296,6 +18547,8 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18296
18547
  const showSimple = !(mode === 'modal' || mode === 'drawer');
18297
18548
  const {
18298
18549
  transfer,
18550
+ minWidth,
18551
+ maxWidth,
18299
18552
  maxHeight
18300
18553
  } = popupOptions || {};
18301
18554
  const customSimpleMode = computeCustomSimpleMode.value;
@@ -18304,7 +18557,8 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18304
18557
  let wrapperEl = refElem.value;
18305
18558
  let popupTop = 0;
18306
18559
  let popupMaxHeight = 0;
18307
- const popupStys = {};
18560
+ const defPupStys = {};
18561
+ const panePupStys = {};
18308
18562
  if ($xeGantt) {
18309
18563
  const {
18310
18564
  refGanttContainerElem
@@ -18337,23 +18591,40 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18337
18591
  }
18338
18592
  if (!placement || !['left', 'right', 'bottom-left', 'bottom-right'].includes(placement)) {
18339
18593
  if (popupTop) {
18340
- popupStys.top = toCssUnit(popupTop);
18594
+ defPupStys.top = toCssUnit(popupTop);
18341
18595
  }
18342
18596
  }
18343
18597
  if (showSimple && transfer) {
18344
18598
  if (placement === 'bottom-left' || placement === 'bottom-right') {
18345
- popupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
18599
+ defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
18346
18600
  }
18347
18601
  if (placement === 'top-left' || placement === 'bottom-left') {
18348
- popupStys.left = toCssUnit(tableRect.left);
18602
+ defPupStys.left = toCssUnit(tableRect.left);
18349
18603
  } else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
18350
- popupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
18604
+ defPupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
18351
18605
  }
18352
18606
  }
18607
+ // 同步表格的css变量到弹窗中
18608
+ const bodyComputeStyle = getComputedStyle(bodyEl);
18609
+ const tableComputeStyle = getComputedStyle(wrapperEl);
18610
+ customColumnCssKeys.forEach(key => {
18611
+ const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === 'title' ? 'min-' : ''}width`;
18612
+ const currCssVal = tableComputeStyle.getPropertyValue(currCssKey);
18613
+ if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
18614
+ panePupStys[currCssKey] = currCssVal;
18615
+ }
18616
+ });
18617
+ if (minWidth) {
18618
+ defPupStys['--vxe-ui-vxe-table-custom-default-min-width'] = toCssUnit(minWidth);
18619
+ }
18620
+ if (maxWidth) {
18621
+ defPupStys['--vxe-ui-vxe-table-custom-default-max-width'] = toCssUnit(maxWidth);
18622
+ }
18353
18623
  if (popupMxHeight) {
18354
- popupStys.maxHeight = toCssUnit(popupMxHeight);
18624
+ defPupStys.maxHeight = toCssUnit(popupMxHeight);
18355
18625
  }
18356
- customStore.popupStyle = popupStys;
18626
+ customStore.defPopupStyle = defPupStys;
18627
+ customStore.panePopupStyle = panePupStys;
18357
18628
  customStore.maxHeight = popupMxHeight;
18358
18629
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
18359
18630
  };
@@ -18415,6 +18686,9 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18415
18686
  column.renderFixed = column.fixed;
18416
18687
  column.renderVisible = column.visible;
18417
18688
  column.renderResizeWidth = column.renderWidth;
18689
+ column.renderAlign = column.align;
18690
+ column.renderHeaderAlign = column.headerAlign;
18691
+ column.renderFooterAlign = column.footerAlign;
18418
18692
  sortMaps[colid] = column.renderSortNumber;
18419
18693
  fixedMaps[colid] = column.fixed;
18420
18694
  visibleMaps[colid] = column.visible;
@@ -18459,10 +18733,21 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18459
18733
  allowSort,
18460
18734
  allowFixed,
18461
18735
  allowResizable,
18736
+ allowAlign,
18737
+ allowHeaderAlign,
18738
+ allowFooterAlign,
18462
18739
  allowGroup,
18463
18740
  allowValues
18464
18741
  } = customOpts;
18465
- if (!isDirectly) {
18742
+ if (isDirectly) {
18743
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
18744
+ if (allowResizable) {
18745
+ if (column.renderVisible && (!column.children || !column.children.length)) {
18746
+ column.resizeWidth = Math.max(0, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(column.renderWidth));
18747
+ }
18748
+ }
18749
+ });
18750
+ } else {
18466
18751
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parentColumn) => {
18467
18752
  if (parentColumn) {
18468
18753
  // 更新子列信息
@@ -18487,6 +18772,15 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18487
18772
  if (allowVisible) {
18488
18773
  column.visible = column.renderVisible;
18489
18774
  }
18775
+ if (allowAlign) {
18776
+ column.align = column.renderAlign;
18777
+ }
18778
+ if (allowHeaderAlign) {
18779
+ column.headerAlign = column.renderHeaderAlign;
18780
+ }
18781
+ if (allowFooterAlign) {
18782
+ column.footerAlign = column.renderFooterAlign;
18783
+ }
18490
18784
  if (allowGroup && allowValues) {
18491
18785
  column.aggFunc = column.renderAggFn;
18492
18786
  }
@@ -18526,7 +18820,12 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18526
18820
  allowVisible,
18527
18821
  allowSort,
18528
18822
  allowFixed,
18529
- allowResizable
18823
+ allowAlign,
18824
+ allowHeaderAlign,
18825
+ allowFooterAlign,
18826
+ allowResizable,
18827
+ allowGroup,
18828
+ allowValues
18530
18829
  } = customOpts;
18531
18830
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
18532
18831
  const colid = column.getKey();
@@ -18546,6 +18845,21 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18546
18845
  if (allowResizable) {
18547
18846
  column.renderResizeWidth = column.renderWidth;
18548
18847
  }
18848
+ if (allowAlign) {
18849
+ column.align = column.renderAlign;
18850
+ }
18851
+ if (allowHeaderAlign) {
18852
+ column.headerAlign = column.renderHeaderAlign;
18853
+ }
18854
+ if (allowFooterAlign) {
18855
+ column.footerAlign = column.renderFooterAlign;
18856
+ }
18857
+ if (allowGroup) {
18858
+ // 无
18859
+ }
18860
+ if (allowValues) {
18861
+ // 无
18862
+ }
18549
18863
  }, {
18550
18864
  children: 'children'
18551
18865
  });
@@ -18636,7 +18950,10 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18636
18950
  resizable: options === true,
18637
18951
  fixed: options === true,
18638
18952
  sort: options === true,
18639
- aggFunc: options === true
18953
+ aggFunc: options === true,
18954
+ align: options === true,
18955
+ headerAlign: options === true,
18956
+ footerAlign: options === true
18640
18957
  }, options);
18641
18958
  const allCols = [];
18642
18959
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
@@ -18645,6 +18962,7 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18645
18962
  }
18646
18963
  if (opts.fixed) {
18647
18964
  column.fixed = column.defaultFixed;
18965
+ column.renderFixed = column.defaultFixed;
18648
18966
  }
18649
18967
  if (opts.sort) {
18650
18968
  column.renderSortNumber = column.sortNumber;
@@ -18656,6 +18974,18 @@ core_.VxeUI.hooks.add('tableCustomModule', {
18656
18974
  })) {
18657
18975
  column.visible = column.defaultVisible;
18658
18976
  }
18977
+ if (opts.align) {
18978
+ column.align = column.defaultAlign;
18979
+ column.renderAlign = column.defaultAlign;
18980
+ }
18981
+ if (opts.headerAlign) {
18982
+ column.headerAlign = column.defaultHeaderAlign;
18983
+ column.renderHeaderAlign = column.defaultHeaderAlign;
18984
+ }
18985
+ if (opts.footerAlign) {
18986
+ column.footerAlign = column.defaultFooterAlign;
18987
+ column.renderFooterAlign = column.defaultFooterAlign;
18988
+ }
18659
18989
  if (opts.aggFunc) {
18660
18990
  column.aggFunc = column.defaultAggFunc;
18661
18991
  column.renderAggFn = column.defaultAggFunc;
@@ -20769,17 +21099,17 @@ if(scrollXLoad&&allColumnFooterOverflow){if(spanMethod||footerSpanMethod){// 如
20769
21099
  if(tableColumn.length&&collectColumn.length){collectColumn.forEach(column=>{if(column.renderFixed){fixedSize++;}});}return fixedSize;});const computeIsMaxFixedColumn=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{const fixedColumnSize=computeFixedColumnSize.value;const columnOpts=computeColumnOpts.value;const{maxFixedSize}=columnOpts;if(maxFixedSize){return fixedColumnSize>=maxFixedSize;}return false;});const computeKeepFields=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{const{tableFullColumn}=internalData;const{updateColFlag}=reactData;const editDirtyOpts=computeEditDirtyOpts.value;const{extraFields,includeFields,excludeFields}=editDirtyOpts;const kpFields=[];if(updateColFlag){if(includeFields&&includeFields.length){return includeFields;}const excludeFdMaps={};if(excludeFields&&excludeFields.length){excludeFields.forEach(field=>{excludeFdMaps[field]=1;});}const addFdMaps={};if(extraFields&&extraFields.length){extraFields.forEach(field=>{if(!addFdMaps[field]){addFdMaps[field]=1;kpFields.push(field);}});}for(let i=0;i<tableFullColumn.length;i++){const column=tableFullColumn[i];const{field,type,editRender,cellRender}=column;if(field&&!type&&(editRender||cellRender)&&!addFdMaps[field]&&!excludeFdMaps[field]){addFdMaps[field]=1;kpFields.push(field);}}}return kpFields;});const computeTableBorder=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{const{border}=props;if(border===true){return'full';}if(border){return border;}return'default';});const computeIsAllCheckboxDisabled=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{const{treeConfig}=props;const{tableData}=reactData;const{tableFullData}=internalData;const checkboxOpts=computeCheckboxOpts.value;const{strict,checkMethod}=checkboxOpts;if(strict){if(tableData.length||tableFullData.length){if(checkMethod){if(treeConfig){// 暂时不支持树形结构
20770
21100
  }// 如果所有行都被禁用
20771
21101
  return tableFullData.every(row=>!checkMethod({$table:$xeTable,row}));}return false;}return true;}return false;});const computeVirtualScrollBars=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{const{overflowX,scrollXLoad,overflowY,scrollYLoad}=reactData;return{x:overflowX&&scrollXLoad,y:overflowY&&scrollYLoad};});const computeRowGroupFields=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{const rowGroupOpts=computeRowGroupOpts.value;return rowGroupOpts.groupFields;});const computeRowGroupColumns=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{const{rowGroupList}=reactData;const{fullColumnFieldData}=internalData;const rgColumns=[];rowGroupList.forEach(aggConf=>{const colRest=fullColumnFieldData[aggConf.field];if(colRest){rgColumns.push(colRest.column);}});return rgColumns;});const computeAggFuncColumns=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{const{rowGroupList,tableColumn}=reactData;if(rowGroupList.length){return tableColumn.filter(column=>column.aggFunc);}return[];});const combineTabsResizeFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{return $xeTabs?$xeTabs.reactData.resizeFlag:null;});const combineModalResizeFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{return $xeModal?$xeModal.reactData.resizeFlag:null;});const combineSplitterResizeFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(()=>{return $xeSplitter?$xeSplitter.reactData.resizeFlag:null;});const refMaps={refElem,refTooltip,refValidTooltip,refTableFilter,refTableCustom,refTableMenu,refTableHeader,refTableBody,refTableFooter,refTableLeftHeader,refTableLeftBody,refTableLeftFooter,refTableRightHeader,refTableRightBody,refTableRightFooter,refLeftContainer,refRightContainer,refColResizeBar,refRowResizeBar,refCustomContainerElem,refScrollXVirtualElem,refScrollYVirtualElem,refScrollXHandleElem,refScrollYHandleElem,refScrollXSpaceElem,refScrollYSpaceElem};const computeMaps={computeSize,computeTableId,computeValidOpts,computeRowField,computeVirtualXOpts,computeVirtualYOpts,computeScrollbarOpts,computeScrollbarXOpts,computeScrollbarYOpts,computeScrollbarXToTop,computeScrollbarYToLeft,computeColumnOpts,computeCurrentColumnOpts,computeScrollXThreshold,computeScrollYThreshold,computeRowHeightMaps,computeDefaultRowHeight,computeCellOpts,computeHeaderCellOpts,computeFooterCellOpts,computeRowOpts,computeAggregateOpts,computeAggregateAccuracyOpts,computeRowGroupOpts,computeCurrentRowOpts,computeRowDragOpts,computeColumnDragOpts,computeResizeOpts,computeResizableOpts,computeSeqOpts,computeRadioOpts,computeCheckboxOpts,computeTooltipOpts,computeHeaderTooltipOpts,computeFooterTooltipOpts,computeEditOpts,computeEditDirtyOpts,computeSortOpts,computeFilterOpts,computeFloatingFilterOpts,computeMouseOpts,computeAreaOpts,computeKeyboardOpts,computeClipOpts,computeFnrOpts,computeHeaderMenu,computeBodyMenu,computeFooterMenu,computeIsMenu,computeIsContentMenu,computeMenuList,computeMenuOpts,computeExportOpts,computeImportOpts,computePrintOpts,computeExpandOpts,computeTreeOpts,computeEmptyOpts,computeLoadingOpts,computeCellOffsetWidth,computeCustomOpts,computeCustomSimpleMode,computeLeftFixedWidth,computeRightFixedWidth,computeBodyMergeCoverFixed,computeFixedColumnSize,computeIsMaxFixedColumn,computeKeepFields,computeIsAllCheckboxDisabled,computeIsHeaderRenderOptimize,computeIsBodyRenderOptimize,computeIsFooterRenderOptimize,computeVirtualScrollBars,computeRowGroupFields,computeRowGroupColumns,computeAggFuncColumns,computeUndoRedoHistoryOpts,computeFNROpts,computeSXOpts,computeSYOpts};const $xeTable={xID,props:props,context,reactData,internalData,getRefMaps:()=>refMaps,getComputeMaps:()=>computeMaps,xeGrid:$xeGrid,xeGantt:$xeGantt,// 已废弃
20772
- xegrid:$xeGrid};const eqCellValue=(newRow,oldRow,field)=>{const val1=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(newRow,field);const val2=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oldRow,field);let result=false;if(eqEmptyValue(val1)&&eqEmptyValue(val2)){result=true;}else if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val1)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val1)){result=''+val1===''+val2;}else{result=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val1,val2);}return{newValue:val1,oldValue:val2,result};};const handleKeyField=()=>{const keyField=computeRowField.value;internalData.currKeyField=keyField;internalData.isCurrDeepKey=hasDeepKey(keyField);};const hangleStorageDefaultValue=(value,isAll)=>{return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(value)?value:isAll;};const getNextSortOrder=column=>{const sortOpts=computeSortOpts.value;const{orders=[]}=sortOpts;const currOrder=column.order||null;const oIndex=orders.indexOf(currOrder)+1;return orders[oIndex<orders.length?oIndex:0];};const getCustomStorageMap=id=>{const version=table_getConfig().version;const rest=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringJSON(localStorage.getItem(customStorageKey)||'');const maps=rest&&rest._v===version?rest:{_v:version};return(id?maps[id]:maps)||{};};const setCustomStorageMap=(id,data)=>{const version=table_getConfig().version;const maps=getCustomStorageMap();maps[id]=data||undefined;maps._v=version;localStorage.setItem(customStorageKey,external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(maps));};const getRecoverRowMaps=keyMaps=>{const{fullAllDataRowIdData}=internalData;const restKeys={};external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(keyMaps,(row,rowid)=>{if(fullAllDataRowIdData[rowid]){restKeys[rowid]=row;}});return restKeys;};const handleReserveRow=reserveRowMap=>{const{fullDataRowIdData}=internalData;const reserveList=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(reserveRowMap,(item,rowid)=>{if(fullDataRowIdData[rowid]&&$xeTable.findRowIndexOf(reserveList,fullDataRowIdData[rowid].row)===-1){reserveList.push(fullDataRowIdData[rowid].row);}});return reserveList;};const handleVirtualXVisible=()=>{const{isScrollXBig,scrollXWidth}=reactData;const{elemStore,visibleColumn,fullColumnIdData}=internalData;const leftFixedWidth=computeLeftFixedWidth.value;const rightFixedWidth=computeRightFixedWidth.value;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(bodyScrollElem){const clientWidth=bodyScrollElem.clientWidth;let scrollLeft=bodyScrollElem.scrollLeft;if(isScrollXBig){scrollLeft=Math.ceil((scrollXWidth-clientWidth)*Math.min(1,scrollLeft/(maxXWidth-clientWidth)));}const startLeft=scrollLeft+leftFixedWidth;const endLeft=scrollLeft+clientWidth-rightFixedWidth;let leftIndex=0;let rightIndex=visibleColumn.length;while(leftIndex<rightIndex){const cIndex=Math.floor((leftIndex+rightIndex)/2);const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid]||{};if(colRest.oLeft<=startLeft){leftIndex=cIndex+1;}else{rightIndex=cIndex;}}let visibleSize=0;const toVisibleIndex=leftIndex===visibleColumn.length?leftIndex:Math.max(0,leftIndex<visibleColumn.length?leftIndex-2:0);for(let cIndex=toVisibleIndex,cLen=visibleColumn.length;cIndex<cLen;cIndex++){const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid]||{};visibleSize++;if(colRest.oLeft>endLeft||visibleSize>=60){break;}}return{toVisibleIndex:Math.max(0,toVisibleIndex),visibleSize:Math.max(1,visibleSize)};}return{toVisibleIndex:0,visibleSize:6};};const calcVarRowHeightConfig=(sizeKey,sizeEl)=>{const{rowHeightStore}=reactData;if(sizeEl&&sizeEl.clientHeight){rowHeightStore[sizeKey]=sizeEl.clientHeight;}};const computeRowHeight=()=>{const{isAllOverflow}=reactData;const tableHeader=refTableHeader.value;const tableBody=refTableBody.value;const tableBodyElem=tableBody?tableBody.$el:null;const defaultRowHeight=computeDefaultRowHeight.value;let rowHeight=0;if(isAllOverflow){if(tableBodyElem){const tableHeaderElem=tableHeader?tableHeader.$el:null;let firstTrElem;firstTrElem=tableBodyElem.querySelector('tr');if(!firstTrElem&&tableHeaderElem){firstTrElem=tableHeaderElem.querySelector('tr');}if(firstTrElem){rowHeight=firstTrElem.clientHeight;}}if(!rowHeight){rowHeight=defaultRowHeight;}}else{rowHeight=defaultRowHeight;}// 最低支持 18px 行高
21102
+ xegrid:$xeGrid};const eqCellValue=(newRow,oldRow,field)=>{const val1=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(newRow,field);const val2=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oldRow,field);let result=false;if(eqEmptyValue(val1)&&eqEmptyValue(val2)){result=true;}else if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val1)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val1)){result=''+val1===''+val2;}else{result=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val1,val2);}return{newValue:val1,oldValue:val2,result};};const handleKeyField=()=>{const keyField=computeRowField.value;internalData.currKeyField=keyField;internalData.isCurrDeepKey=hasDeepKey(keyField);};const getNextSortOrder=column=>{const sortOpts=computeSortOpts.value;const{orders=[]}=sortOpts;const currOrder=column.order||null;const oIndex=orders.indexOf(currOrder)+1;return orders[oIndex<orders.length?oIndex:0];};const getCustomStorageMap=id=>{const version=table_getConfig().version;const rest=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringJSON(localStorage.getItem(customStorageKey)||'');const maps=rest&&rest._v===version?rest:{_v:version};return(id?maps[id]:maps)||{};};const setCustomStorageMap=(id,data)=>{const version=table_getConfig().version;const maps=getCustomStorageMap();maps[id]=data||undefined;maps._v=version;localStorage.setItem(customStorageKey,external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(maps));};const getRecoverRowMaps=keyMaps=>{const{fullAllDataRowIdData}=internalData;const restKeys={};external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(keyMaps,(row,rowid)=>{if(fullAllDataRowIdData[rowid]){restKeys[rowid]=row;}});return restKeys;};const handleReserveRow=reserveRowMap=>{const{fullDataRowIdData}=internalData;const reserveList=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(reserveRowMap,(item,rowid)=>{if(fullDataRowIdData[rowid]&&$xeTable.findRowIndexOf(reserveList,fullDataRowIdData[rowid].row)===-1){reserveList.push(fullDataRowIdData[rowid].row);}});return reserveList;};const handleVirtualXVisible=()=>{const{isScrollXBig,scrollXWidth}=reactData;const{elemStore,visibleColumn,fullColumnIdData}=internalData;const leftFixedWidth=computeLeftFixedWidth.value;const rightFixedWidth=computeRightFixedWidth.value;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(bodyScrollElem){const clientWidth=bodyScrollElem.clientWidth;let scrollLeft=bodyScrollElem.scrollLeft;if(isScrollXBig){scrollLeft=Math.ceil((scrollXWidth-clientWidth)*Math.min(1,scrollLeft/(maxXWidth-clientWidth)));}const startLeft=scrollLeft+leftFixedWidth;const endLeft=scrollLeft+clientWidth-rightFixedWidth;let leftIndex=0;let rightIndex=visibleColumn.length;while(leftIndex<rightIndex){const cIndex=Math.floor((leftIndex+rightIndex)/2);const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid]||{};if(colRest.oLeft<=startLeft){leftIndex=cIndex+1;}else{rightIndex=cIndex;}}let visibleSize=0;const toVisibleIndex=leftIndex===visibleColumn.length?leftIndex:Math.max(0,leftIndex<visibleColumn.length?leftIndex-2:0);for(let cIndex=toVisibleIndex,cLen=visibleColumn.length;cIndex<cLen;cIndex++){const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid]||{};visibleSize++;if(colRest.oLeft>endLeft||visibleSize>=60){break;}}return{toVisibleIndex:Math.max(0,toVisibleIndex),visibleSize:Math.max(1,visibleSize)};}return{toVisibleIndex:0,visibleSize:6};};const calcVarRowHeightConfig=(sizeKey,sizeEl)=>{const{rowHeightStore}=reactData;if(sizeEl&&sizeEl.clientHeight){rowHeightStore[sizeKey]=sizeEl.clientHeight;}};const computeRowHeight=()=>{const{isAllOverflow}=reactData;const tableHeader=refTableHeader.value;const tableBody=refTableBody.value;const tableBodyElem=tableBody?tableBody.$el:null;const defaultRowHeight=computeDefaultRowHeight.value;let rowHeight=0;if(isAllOverflow){if(tableBodyElem){const tableHeaderElem=tableHeader?tableHeader.$el:null;let firstTrElem;firstTrElem=tableBodyElem.querySelector('tr');if(!firstTrElem&&tableHeaderElem){firstTrElem=tableHeaderElem.querySelector('tr');}if(firstTrElem){rowHeight=firstTrElem.clientHeight;}}if(!rowHeight){rowHeight=defaultRowHeight;}}else{rowHeight=defaultRowHeight;}// 最低支持 18px 行高
20773
21103
  return Math.max(18,rowHeight);};const handleVirtualYVisible=()=>{const{isAllOverflow,expandColumn,isScrollYBig,scrollYHeight}=reactData;const{elemStore,isResizeCellHeight,afterFullData,fullAllDataRowIdData}=internalData;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(bodyScrollElem){const clientHeight=bodyScrollElem.clientHeight;let scrollTop=bodyScrollElem.scrollTop;if(isScrollYBig){scrollTop=Math.ceil((scrollYHeight-clientHeight)*Math.min(1,scrollTop/(maxYHeight-clientHeight)));}const startTop=scrollTop;const endTop=scrollTop+clientHeight;let toVisibleIndex=-1;let visibleSize=0;const isCustomCellHeight=isResizeCellHeight||cellOpts.height||rowOpts.height;if(!isCustomCellHeight&&!expandColumn&&isAllOverflow){toVisibleIndex=Math.floor(startTop/defaultRowHeight)-1;visibleSize=Math.ceil(clientHeight/defaultRowHeight)+1;}else{const{handleGetRowId}=createHandleGetRowId($xeTable);let leftIndex=0;let rightIndex=afterFullData.length;while(leftIndex<rightIndex){const rIndex=Math.floor((leftIndex+rightIndex)/2);const row=afterFullData[rIndex];const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid]||{};if(rowRest.oTop<=startTop){leftIndex=rIndex+1;}else{rightIndex=rIndex;}}toVisibleIndex=leftIndex===afterFullData.length?leftIndex:Math.max(0,leftIndex<afterFullData.length?leftIndex-2:0);for(let rIndex=toVisibleIndex,rLen=afterFullData.length;rIndex<rLen;rIndex++){const row=afterFullData[rIndex];const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid]||{};visibleSize++;if(rowRest.oTop>endTop||visibleSize>=100){break;}}}return{toVisibleIndex:Math.max(0,toVisibleIndex),visibleSize:Math.max(6,visibleSize)};}return{toVisibleIndex:0,visibleSize:6};};const calculateMergerOffsetIndex=(list,mergeMaps,offsetItem,type)=>{const mKey=`${offsetItem.startIndex}:${offsetItem.endIndex}`;const mObj=mergeMaps[mKey];// 缓存
20774
21104
  if(mObj){offsetItem.startIndex=mObj.startIndex;offsetItem.endIndex=mObj.endIndex;}else{for(let mcIndex=0,len=list.length;mcIndex<len;mcIndex++){const mergeItem=list[mcIndex];const{startIndex,endIndex}=offsetItem;const mergeStartIndex=mergeItem[type];const mergeSpanNumber=mergeItem[type+'span'];const mergeEndIndex=mergeStartIndex+mergeSpanNumber;if(mergeStartIndex<startIndex&&startIndex<mergeEndIndex){offsetItem.startIndex=mergeStartIndex;}if(mergeStartIndex<endIndex&&endIndex<mergeEndIndex){offsetItem.endIndex=mergeEndIndex;}if(offsetItem.startIndex!==startIndex||offsetItem.endIndex!==endIndex){mcIndex=-1;}}mergeMaps[mKey]=offsetItem;}};function buildMergeData(mergeConfigs){const mergeMaps={};const mergeRowMaps={};const mergeColMaps={};if(mergeConfigs&&mergeConfigs.length){for(let mIndex=0;mIndex<mergeConfigs.length;mIndex++){const{row:_rowIndex,col:_columnIndex,rowspan:mergeRowspan,colspan:mergeColspan}=mergeConfigs[mIndex];for(let i=0;i<mergeRowspan;i++){const currRIndex=_rowIndex+i;for(let j=0;j<mergeColspan;j++){const currCIndex=_columnIndex+j;mergeMaps[`${currRIndex}:${currCIndex}`]=!i&&!j?{rowspan:mergeRowspan,colspan:mergeColspan}:{rowspan:0,colspan:0};}}}}return{mergeMaps,mergeRowMaps,mergeColMaps};}const handleUpdateMergeBodyCells=merges=>{internalData.mergeBodyList=[];internalData.mergeBodyMaps={};internalData.mergeBodyCellMaps={};internalData.mergeBodyRowMaps={};internalData.mergeBodyColMaps={};$xeTable.setMergeCells(merges);};const handleBodyMerge=merges=>{const{fullAllDataRowIdData,fullColumnIdData,visibleColumn,afterFullData,mergeBodyList,mergeBodyMaps}=internalData;if(merges){const{handleGetRowId}=createHandleGetRowId($xeTable);if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(merges)){merges=[merges];}merges.forEach(item=>{let{row:margeRow,col:margeCol,rowspan,colspan}=item;let mergeRowIndex=-1;let mergeColumnIndex=-1;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeRow)){mergeRowIndex=margeRow;}else{const rowid=margeRow?handleGetRowId(margeRow):null;const rowRest=rowid?fullAllDataRowIdData[rowid]:null;if(rowRest){mergeRowIndex=rowRest._index;}}if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeCol)){mergeColumnIndex=margeCol;}else{const colid=margeCol?margeCol.id:null;const colRest=colid?fullColumnIdData[colid]:null;if(colRest){mergeColumnIndex=colRest._index;}}if(mergeRowIndex>-1&&mergeColumnIndex>-1&&(rowspan||colspan)){rowspan=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(rowspan)||1;colspan=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(colspan)||1;if(rowspan>1||colspan>1){const row=afterFullData[mergeRowIndex];const column=visibleColumn[mergeColumnIndex];let mergeItem=mergeBodyMaps[`${mergeRowIndex}:${mergeColumnIndex}`];if(mergeItem){mergeItem.rowspan=rowspan;mergeItem.colspan=colspan;mergeItem._rowspan=rowspan;mergeItem._colspan=colspan;}else{mergeItem={row:mergeRowIndex,col:mergeColumnIndex,rowspan,colspan,_row:row,_col:column,_rowspan:rowspan,_colspan:colspan};mergeBodyMaps[`${mergeRowIndex}:${mergeColumnIndex}`]=mergeItem;mergeBodyList.push(mergeItem);}}}});}};const removeBodyMerges=merges=>{const{mergeBodyList,fullColumnIdData,fullAllDataRowIdData,mergeBodyMaps}=internalData;const rest=[];if(merges){const{handleGetRowId}=createHandleGetRowId($xeTable);if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(merges)){merges=[merges];}merges.forEach(item=>{const{row:margeRow,col:margeCol}=item;let mergeRowIndex=-1;let mergeColumnIndex=-1;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeRow)){mergeRowIndex=margeRow;}else{const rowid=margeRow?handleGetRowId(margeRow):null;const rowRest=rowid?fullAllDataRowIdData[rowid]:null;if(rowRest){mergeRowIndex=rowRest._index;}}if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeCol)){mergeColumnIndex=margeCol;}else{const colid=margeCol?margeCol.id:null;const colRest=colid?fullColumnIdData[colid]:null;if(colRest){mergeColumnIndex=colRest._index;}}const mcIndex=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(mergeBodyList,item=>item.row===mergeRowIndex&&item.col===mergeColumnIndex);if(mcIndex>-1){const rItems=mergeBodyList.splice(mcIndex,1);const item=rItems[0];if(item){rest.push(rItems[0]);if(mergeBodyMaps[`${mergeRowIndex}:${mergeColumnIndex}`]){delete mergeBodyMaps[`${mergeRowIndex}:${mergeColumnIndex}`];}}}});}return rest;};const handleUpdateMergeHeaderCells=merges=>{internalData.mergeHeaderList=[];internalData.mergeHeaderMaps={};internalData.mergeHeaderCellMaps={};internalData.mergeHeaderRowMaps={};internalData.mergeBodyColMaps={};$xeTable.setMergeHeaderCells(merges);};const handleHeaderMerge=merges=>{const{showCustomHeader}=props;const{footerTableData}=reactData;const{mergeHeaderList,mergeHeaderMaps,fullColumnIdData}=internalData;if(merges){const{visibleColumn}=internalData;if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(merges)){merges=[merges];}merges.forEach(item=>{let{row:margeRow,col:margeCol,rowspan,colspan}=item;const mergeRowIndex=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeRow)?margeRow:-1;let mergeColumnIndex=-1;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeCol)){mergeColumnIndex=margeCol;}else{const colid=margeCol?margeCol.id:null;const colRest=colid?fullColumnIdData[colid]:null;if(colRest){mergeColumnIndex=colRest._index;}}if(mergeRowIndex>-1&&mergeColumnIndex>-1&&(rowspan||colspan)){rowspan=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(rowspan)||1;colspan=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(colspan)||1;if(!showCustomHeader&&rowspan>1){table_errLog('vxe.error.notSupportProp',['[table] show-custom-header=false',`rowspan=${rowspan}`,'rowspan=1']);return;}if(rowspan>1||colspan>1){const row=footerTableData[mergeRowIndex];const column=visibleColumn[mergeColumnIndex];let mergeItem=mergeHeaderMaps[`${mergeRowIndex}:${mergeColumnIndex}`];if(mergeItem){mergeItem.rowspan=rowspan;mergeItem.colspan=colspan;mergeItem._rowspan=rowspan;mergeItem._colspan=colspan;}else{mergeItem={row:mergeRowIndex,col:mergeColumnIndex,rowspan,colspan,_row:row,_col:column,_rowspan:rowspan,_colspan:colspan};mergeHeaderMaps[`${mergeRowIndex}:${mergeColumnIndex}`]=mergeItem;mergeHeaderList.push(mergeItem);}}}});}};const removeHeaderMerges=merges=>{const{mergeHeaderList,fullColumnIdData,mergeHeaderMaps}=internalData;const rest=[];if(merges){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(merges)){merges=[merges];}merges.forEach(item=>{const{row:margeRow,col:margeCol}=item;const mergeRowIndex=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeRow)?margeRow:-1;let mergeColumnIndex=-1;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeCol)){mergeColumnIndex=margeCol;}else{const colid=margeCol?margeCol.id:null;const colRest=colid?fullColumnIdData[colid]:null;if(colRest){mergeColumnIndex=colRest._index;}}const mcIndex=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(mergeHeaderList,item=>item.row===mergeRowIndex&&item.col===mergeColumnIndex);if(mcIndex>-1){const rItems=mergeHeaderList.splice(mcIndex,1);const item=rItems[0];if(item){rest.push(item);if(mergeHeaderMaps[`${mergeRowIndex}:${mergeColumnIndex}`]){delete mergeHeaderMaps[`${mergeRowIndex}:${mergeColumnIndex}`];}}}});}return rest;};const handleUpdateMergeFooterCells=merges=>{internalData.mergeFooterList=[];internalData.mergeFooterMaps={};internalData.mergeFooterCellMaps={};internalData.mergeFooterRowMaps={};internalData.mergeFooterColMaps={};$xeTable.setMergeFooterCells(merges);};const handleFooterMerge=merges=>{const{footerTableData}=reactData;const{mergeFooterList,mergeFooterMaps,fullColumnIdData}=internalData;if(merges){const{visibleColumn}=internalData;if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(merges)){merges=[merges];}merges.forEach(item=>{let{row:margeRow,col:margeCol,rowspan,colspan}=item;const mergeRowIndex=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeRow)?margeRow:-1;let mergeColumnIndex=-1;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeCol)){mergeColumnIndex=margeCol;}else{const colid=margeCol?margeCol.id:null;const colRest=colid?fullColumnIdData[colid]:null;if(colRest){mergeColumnIndex=colRest._index;}}if(mergeRowIndex>-1&&mergeColumnIndex>-1&&(rowspan||colspan)){rowspan=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(rowspan)||1;colspan=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(colspan)||1;if(rowspan>1||colspan>1){const row=footerTableData[mergeRowIndex];const column=visibleColumn[mergeColumnIndex];let mergeItem=mergeFooterMaps[`${mergeRowIndex}:${mergeColumnIndex}`];if(mergeItem){mergeItem.rowspan=rowspan;mergeItem.colspan=colspan;mergeItem._rowspan=rowspan;mergeItem._colspan=colspan;}else{mergeItem={row:mergeRowIndex,col:mergeColumnIndex,rowspan,colspan,_row:row,_col:column,_rowspan:rowspan,_colspan:colspan};mergeFooterMaps[`${mergeRowIndex}:${mergeColumnIndex}`]=mergeItem;mergeFooterList.push(mergeItem);}}}});}};const removeFooterMerges=merges=>{const{mergeFooterList,fullColumnIdData,mergeFooterMaps}=internalData;const rest=[];if(merges){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(merges)){merges=[merges];}merges.forEach(item=>{const{row:margeRow,col:margeCol}=item;const mergeRowIndex=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeRow)?margeRow:-1;let mergeColumnIndex=-1;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeCol)){mergeColumnIndex=margeCol;}else{const colid=margeCol?margeCol.id:null;const colRest=colid?fullColumnIdData[colid]:null;if(colRest){mergeColumnIndex=colRest._index;}}const mcIndex=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(mergeFooterList,item=>item.row===mergeRowIndex&&item.col===mergeColumnIndex);if(mcIndex>-1){const rItems=mergeFooterList.splice(mcIndex,1);const item=rItems[0];if(item){rest.push(item);if(mergeFooterMaps[`${mergeRowIndex}:${mergeColumnIndex}`]){delete mergeFooterMaps[`${mergeRowIndex}:${mergeColumnIndex}`];}}}});}return rest;};const handleSortEvent=(evnt,sortConfs,isUpdate)=>{const{tableFullColumn}=internalData;const sortOpts=computeSortOpts.value;const{multiple,remote,orders}=sortOpts;if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortConfs)){sortConfs=[sortConfs];}if(sortConfs&&sortConfs.length){const orderActiveMaps={};if(!multiple){sortConfs=[sortConfs[0]];tableFullColumn.forEach(column=>{if(column.order){orderActiveMaps[column.id]=column;}});}const sortColMpps={};let firstColumn=null;sortConfs.forEach((confs,index)=>{let{field,order}=confs;let column=field;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(field)){column=$xeTable.getColumnByField(field);}if(!firstColumn){firstColumn=column;}if(column&&column.sortable){if(orders&&orders.indexOf(order)===-1){order=getNextSortOrder(column);}if(column.order!==order){column.order=order;}column.sortTime=Date.now()+index;sortColMpps[column.id]=column;}});if(!multiple){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(orderActiveMaps,(oaCol,oaId)=>{if(!sortColMpps[oaId]){oaCol.order=null;}});}if(isUpdate){if(!remote){$xeTable.handleTableData(true);}}if(evnt){$xeTable.handleColumnSortEvent(evnt,firstColumn);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{updateRowOffsetTop();$xeTable.updateCellAreas();return updateStyle();});}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();};const clearAllSort=()=>{const{tableFullColumn}=internalData;tableFullColumn.forEach(column=>{column.order=null;});};const calcTableHeight=key=>{const{editConfig,editRules}=props;const{parentHeight,tableColumn}=reactData;let val=props[key];if(key==='minHeight'){const defMinHeight=table_getConfig().table.minHeight;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(val)){if(eqEmptyValue(defMinHeight)){if(!tableColumn.length){// 如果全部列被隐藏
20775
21105
  val=40;}else if(editRules&&isEnableConf(editConfig)){// 编辑模式默认最小高度
20776
- val=144;}}else{val=defMinHeight;}}}let num=0;if(val){if(val==='100%'||val==='auto'){num=parentHeight;}else{const excludeHeight=$xeTable.getExcludeHeight();if(isScale(val)){num=Math.floor((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(val)||1)/100*parentHeight);}else{num=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(val);}num=Math.max(40,num-excludeHeight);}}return num;};const handleCustomRestore=storeData=>{const{aggregateConfig,rowGroupConfig}=props;const{collectColumn}=internalData;const customOpts=computeCustomOpts.value;const{storage,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}: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 isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);let{resizableData,sortData,visibleData,fixedData,aggGroupData,aggFuncData}=storeData;// 处理还原
20777
- if(isCustomResizable&&resizableData||isCustomSort&&sortData||isCustomVisible&&visibleData||isCustomFixed&&fixedData||isCustomAggGroup&&aggGroupData||isCustomAggFunc&&aggFuncData){const sortColMaps={};if(isCustomSort&&sortData){// 转换兼容老版本数据,即将废弃兼容
21106
+ val=144;}}else{val=defMinHeight;}}}let num=0;if(val){if(val==='100%'||val==='auto'){num=parentHeight;}else{const excludeHeight=$xeTable.getExcludeHeight();if(isScale(val)){num=Math.floor((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(val)||1)/100*parentHeight);}else{num=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(val);}num=Math.max(40,num-excludeHeight);}}return num;};const handleCustomRestore=storeData=>{const{aggregateConfig,rowGroupConfig}=props;const{collectColumn}=internalData;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);let{alignData,headerAlignData,footerAlignData,resizableData,sortData,visibleData,fixedData,aggGroupData,aggFuncData}=storeData;// 处理还原
21107
+ if(isCustomAlign&&alignData||isCustomHeaderAlign&&headerAlignData||isCustomFooterAlign&&footerAlignData||isCustomResizable&&resizableData||isCustomSort&&sortData||isCustomVisible&&visibleData||isCustomFixed&&fixedData||isCustomAggGroup&&aggGroupData||isCustomAggFunc&&aggFuncData){const sortColMaps={};if(isCustomSort&&sortData){// 转换兼容老版本数据,即将废弃兼容
20778
21108
  if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortData)){const sortRests=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(sortData,(index,colKey)=>{sortRests.push({key:colKey,index});});sortData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(sortRests,{field:'index',order:'asc'}).map(item=>({k:item.key}));}let colNum=1;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sortData,(sObj,index,sOjs,path,pSObj)=>{sortColMaps[sObj.k]={key:sObj.k,sNum:colNum++,pKey:pSObj?pSObj.k:null};},{children:'c'});}const colKeyMaps={};const allCols=[];const aggGroupConfs=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const colKey=column.getKey();// 支持一级
20779
21109
  if(!parentColumn){if(isCustomFixed&&fixedData&&fixedData[colKey]!==undefined){column.fixed=fixedData[colKey];}}if(isCustomResizable&&resizableData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(resizableData[colKey])){column.resizeWidth=resizableData[colKey];}if(isCustomVisible&&visibleData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(visibleData[colKey])){column.visible=visibleData[colKey];}if(isCustomAggFunc&&aggFuncData&&(aggregateConfig||rowGroupConfig)&&aggFuncData[colKey]){column.aggFunc=aggFuncData[colKey];}if(isCustomAggGroup&&aggGroupData&&aggGroupData[colKey]){aggGroupConfs.push({field:column.field});}colKeyMaps[colKey]=column;allCols.push(column);});if((aggregateConfig||rowGroupConfig)&&aggGroupConfs.length){const groupRest=handleGroupData(internalData.tableFullData,aggGroupConfs);internalData.tableFullTreeData=[];internalData.tableFullGroupData=groupRest.treeData;reactData.isRowGroupStatus=true;reactData.rowGroupList=aggGroupConfs;$xeTable.cacheRowMap(false);}// 如果自定义了顺序
20780
21110
  if(isCustomSort&&sortData){allCols.forEach(column=>{const colKey=column.getKey();const scItem=sortColMaps[colKey];if(scItem){const parentColumn=scItem.pKey?colKeyMaps[scItem.pKey]:null;column.parentId=parentColumn?parentColumn.id:null;column.renderSortNumber=scItem.sNum;}});const newCollectCols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(allCols,'renderSortNumber'),{key:'id',parentKey:'parentId',children:'children'});internalData.collectColumn=newCollectCols;internalData.tableFullColumn=getColumnList(newCollectCols);reactData.updateColFlag++;}reactData.isCustomStatus=true;}else{reactData.isCustomStatus=false;}};/**
20781
21111
  * 还原自定义列操作状态
20782
- */const restoreCustomStorage=()=>{const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{storage,restoreStore,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}: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 isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){if(!tableId){table_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);}}};const updateColumnAllOverflow=()=>{const{showOverflow}=props;const{isGroup}=reactData;const{fullAllDataRowIdData,tableFullColumn,collectColumn}=internalData;let isAllOverflow=!!showOverflow;const handleFunc=column=>{if(isAllOverflow&&column.showOverflow===false){isAllOverflow=false;}};if(isGroup){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,handleFunc);}else{tableFullColumn.forEach(handleFunc);}external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(fullAllDataRowIdData,rowRest=>{rowRest.height=0;});reactData.isAllOverflow=isAllOverflow;};/**
21112
+ */const restoreCustomStorage=()=>{const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{storage,restoreStore}=customOpts;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomAlign||isCustomHeaderAlign||isCustomFooterAlign||isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){if(!tableId){table_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);}}};const updateColumnAllOverflow=()=>{const{showOverflow}=props;const{isGroup}=reactData;const{fullAllDataRowIdData,tableFullColumn,collectColumn}=internalData;let isAllOverflow=!!showOverflow;const handleFunc=column=>{if(isAllOverflow&&column.showOverflow===false){isAllOverflow=false;}};if(isGroup){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,handleFunc);}else{tableFullColumn.forEach(handleFunc);}external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(fullAllDataRowIdData,rowRest=>{rowRest.height=0;});reactData.isAllOverflow=isAllOverflow;};/**
20783
21113
  * 更新数据列的 Map
20784
21114
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
20785
21115
  */const cacheColumnMap=()=>{const{treeConfig,showOverflow}=props;const{tableFullColumn,collectColumn}=internalData;const fullColIdData=internalData.fullColumnIdData={};const fullColFieldData=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 treeOpts=computeTreeOpts.value;const{storage}=customOpts;const rowOpts=computeRowOpts.value;const isGroup=collectColumn.some(hasChildrenList);let isAllOverflow=!!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(fullColFieldData[field]){table_errLog('vxe.error.colRepet',['field',field]);}fullColFieldData[field]=rest;}else{if(storage&&!type){table_errLog('vxe.error.reqSupportProp',['storage',`[${type?`type=${type}`:`title=${column.getTitle()}`}]field=?`]);}if(columnOpts.drag&&(isCrossDrag||isSelfToChildDrag)){table_errLog('vxe.error.reqSupportProp',['column-drag-config.isCrossDrag | column-drag-config.isSelfToChildDrag',`${column.getTitle()||type||''} -> field=?`]);}}if(!hasFixed&&fixed){hasFixed=fixed;}if(!htmlColumn&&type==='html'){htmlColumn=column;}if(treeNode){if(treeNodeColumn){table_warnLog('vxe.error.colRepet',['tree-node',treeNode]);}if(!treeNodeColumn){treeNodeColumn=column;}}if(rowGroupNode){if(treeNodeColumn){table_warnLog('vxe.error.colRepet',['row-group-node',rowGroupNode]);}if(!rowGroupColumn){rowGroupColumn=column;}}if(type==='expand'){if(expandColumn){table_warnLog('vxe.error.colRepet',['type',type]);}if(!expandColumn){expandColumn=column;}}if(type==='checkbox'){if(checkboxColumn){table_warnLog('vxe.error.colRepet',['type',type]);}if(!checkboxColumn){checkboxColumn=column;}}else if(type==='radio'){if(radioColumn){table_warnLog('vxe.error.colRepet',['type',type]);}if(!radioColumn){radioColumn=column;}}if(isAllOverflow&&column.showOverflow===false){isAllOverflow=false;}if(fullColIdData[colid]){table_errLog('vxe.error.colRepet',['colId',colid]);}fullColIdData[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){if(expandOpts.mode!=='fixed'&&virtualYOpts.enabled){table_warnLog('vxe.error.notConflictProp',['column.type="expand','virtual-y-config.enabled=false']);}if(expandOpts.mode!=='fixed'&&mouseOpts.area){table_errLog('vxe.error.errConflicts',['mouse-config.area','column.type=expand']);}if(expandOpts.mode!=='inside'&&treeConfig&&!treeOpts.transform){table_errLog('vxe.error.notConflictProp',['tree-config.transform=false','expand-config.mode=inside']);}// if (props.spanMethod) {
@@ -21339,12 +21669,12 @@ return $xeTable.clearMergeFooterCells();},updateCellAreas(){const{mouseConfig}=p
21339
21669
  * @returns
21340
21670
  */setCustomStoreData(storeData){if(!storeData){return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const customOpts=computeCustomOpts.value;const{checkMethod}=customOpts;// 重置状态
21341
21671
  clearTableAllStatus($xeTable);// 恢复列
21342
- const allCols=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.collectColumn,column=>{column.resizeWidth=0;column.fixed=column.defaultFixed;column.renderSortNumber=column.sortNumber;column.parentId=column.defaultParentId;if(!checkMethod||checkMethod({$table:$xeTable,column})){column.visible=column.defaultVisible;}column.aggFunc=column.defaultAggFunc;column.renderAggFn=column.defaultAggFunc;column.renderResizeWidth=column.renderWidth;allCols.push(column);});const newCollectCols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(allCols,'renderSortNumber'),{key:'id',parentKey:'parentId',children:'children'});internalData.collectColumn=newCollectCols;internalData.tableFullColumn=getColumnList(newCollectCols);reactData.updateColFlag++;reactData.isColLoading=true;initColumnHierarchy();return Promise.resolve(handleCustomRestore(storeData)).then(()=>{return buildColumnInfo();}).then(()=>{// 恢复数据聚合分组
21672
+ const allCols=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.collectColumn,column=>{column.resizeWidth=0;column.fixed=column.defaultFixed;column.renderSortNumber=column.sortNumber;column.parentId=column.defaultParentId;if(!checkMethod||checkMethod({$table:$xeTable,column})){column.visible=column.defaultVisible;}column.align=column.defaultAlign;column.headerAlign=column.defaultHeaderAlign;column.footerAlign=column.defaultFooterAlign;column.aggFunc=column.defaultAggFunc;column.renderAggFn=column.defaultAggFunc;column.renderResizeWidth=column.renderWidth;allCols.push(column);});const newCollectCols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(allCols,'renderSortNumber'),{key:'id',parentKey:'parentId',children:'children'});internalData.collectColumn=newCollectCols;internalData.tableFullColumn=getColumnList(newCollectCols);reactData.updateColFlag++;reactData.isColLoading=true;initColumnHierarchy();return Promise.resolve(handleCustomRestore(storeData)).then(()=>{return buildColumnInfo();}).then(()=>{// 恢复数据聚合分组
21343
21673
  const{isRowGroupStatus,rowGroupList}=reactData;if(isRowGroupStatus&&!!$xeTable.handlePivotTableAggData){const rowGroupFields=computeRowGroupFields.value;if(rowGroupFields?rowGroupFields.length:rowGroupList.length){if(rowGroupFields&&rowGroupFields.length){$xeTable.setRowGroups(rowGroupFields);}else{$xeTable.clearRowGroups();}}else{$xeTable.handleUpdateAggData();}}});},/**
21344
21674
  * 用于 custom-config,用于获取自定义列设置信息,用于自定义保持
21345
21675
  * @returns
21346
- */getCustomStoreData(){const{id}=props;const customOpts=computeCustomOpts.value;const{isRowGroupStatus,rowGroupList}=reactData;const{fullColumnFieldData,collectColumn}=internalData;const{storage,checkMethod,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}: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 isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);const resizableData={};const sortData=[];const visibleData={};const fixedData={};const aggGroupData={};const aggFuncData={};const storeData={resizableData:undefined,sortData:undefined,visibleData:undefined,fixedData:undefined,aggGroupData:undefined,aggFuncData:undefined};if(!id){if(storage){table_errLog('vxe.error.reqProp',['id']);}return storeData;}let hasResizable=0;let hasSort=0;let hasFixed=0;let hasVisible=0;let hasAggFunc=0;const sortMaps={};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){table_errLog('vxe.error.reqProp',[`${column.getTitle()||column.type||''} -> column.field=?`]);return;}if(parentColumn){if(isCustomSort){const pColKey=parentColumn.getKey();const psObj=sortMaps[pColKey];hasSort=1;if(psObj){const sObj={k:colKey};sortMaps[colKey]=sObj;if(!psObj.c){psObj.c=[];}psObj.c.push(sObj);}}}else{if(isCustomSort){hasSort=1;const sObj={k:colKey};sortMaps[colKey]=sObj;sortData.push(sObj);}// 只支持一级
21347
- 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(isCustomAggFunc&&(column.aggFunc||'')!==(column.defaultAggFunc||'')){hasAggFunc=1;aggFuncData[colKey]=column.aggFunc;}});if(hasResizable){storeData.resizableData=resizableData;}if(hasSort){storeData.sortData=sortData;}if(hasFixed){storeData.fixedData=fixedData;}if(hasVisible){storeData.visibleData=visibleData;}if(isCustomAggGroup&&isRowGroupStatus){rowGroupList.forEach(aggConf=>{const colRest=fullColumnFieldData[aggConf.field];if(colRest){aggGroupData[colRest.column.getKey()]=true;}});storeData.aggGroupData=aggGroupData;}if(hasAggFunc){storeData.aggFuncData=aggFuncData;}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)();},/**
21676
+ */getCustomStoreData(){const{id}=props;const customOpts=computeCustomOpts.value;const{isRowGroupStatus,rowGroupList}=reactData;const{fullColumnFieldData,collectColumn}=internalData;const{storage,checkMethod}=customOpts;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);const alignData={};const headerAlignData={};const footerAlignData={};const resizableData={};const sortData=[];const visibleData={};const fixedData={};const aggGroupData={};const aggFuncData={};const storeData={alignData:undefined,headerAlignData:undefined,footerAlignData:undefined,resizableData:undefined,sortData:undefined,visibleData:undefined,fixedData:undefined,aggGroupData:undefined,aggFuncData:undefined};if(!id){if(storage){table_errLog('vxe.error.reqProp',['id']);}return storeData;}let hasAlign=0;let hasHeaderAlign=0;let hasFooterAlign=0;let hasResizable=0;let hasSort=0;let hasFixed=0;let hasVisible=0;let hasAggFunc=0;const sortMaps={};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){table_errLog('vxe.error.reqProp',[`${column.getTitle()||column.type||''} -> column.field=?`]);return;}if(parentColumn){if(isCustomSort){const pColKey=parentColumn.getKey();const psObj=sortMaps[pColKey];hasSort=1;if(psObj){const sObj={k:colKey};sortMaps[colKey]=sObj;if(!psObj.c){psObj.c=[];}psObj.c.push(sObj);}}}else{if(isCustomSort){hasSort=1;const sObj={k:colKey};sortMaps[colKey]=sObj;sortData.push(sObj);}// 只支持一级
21677
+ if(isCustomFixed&&(column.fixed||'')!==(column.defaultFixed||'')){hasFixed=1;fixedData[colKey]=column.fixed;}}if(isCustomAlign&&column.align){hasAlign=1;alignData[colKey]=column.align;}if(isCustomHeaderAlign&&column.headerAlign){hasHeaderAlign=1;headerAlignData[colKey]=column.headerAlign;}if(isCustomFooterAlign&&column.footerAlign){hasFooterAlign=1;footerAlignData[colKey]=column.footerAlign;}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(isCustomAggFunc&&(column.aggFunc||'')!==(column.defaultAggFunc||'')){hasAggFunc=1;aggFuncData[colKey]=column.aggFunc;}});if(hasAlign){storeData.alignData=alignData;}if(hasHeaderAlign){storeData.headerAlignData=headerAlignData;}if(hasFooterAlign){storeData.footerAlignData=footerAlignData;}if(hasResizable){storeData.resizableData=resizableData;}if(hasSort){storeData.sortData=sortData;}if(hasFixed){storeData.fixedData=fixedData;}if(hasVisible){storeData.visibleData=visibleData;}if(isCustomAggGroup&&isRowGroupStatus){rowGroupList.forEach(aggConf=>{const colRest=fullColumnFieldData[aggConf.field];if(colRest){aggGroupData[colRest.column.getKey()]=true;}});storeData.aggGroupData=aggGroupData;}if(hasAggFunc){storeData.aggFuncData=aggFuncData;}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)();},/**
21348
21678
  * 已废弃,被 connectToolbar 替换
21349
21679
  * @deprecated
21350
21680
  */connect($toolbar){return $xeTable.connectToolbar($toolbar);},/**
@@ -21470,8 +21800,8 @@ const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const rtWi
21470
21800
  * @private
21471
21801
  */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(rowid,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();}}},/**
21472
21802
  * @private
21473
- */saveCustomStore(type){const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{updateStore,storage,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}: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 isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
21474
- reactData.isCustomStatus=true;}if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){if(!tableId){table_errLog('vxe.error.reqProp',['id']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const storeData=type==='reset'?{resizableData:{},sortData:[],visibleData:{},fixedData:{},aggGroupData:{},aggFuncData:{}}:$xeTable.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)();},/**
21803
+ */saveCustomStore(type){const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{updateStore,storage}=customOpts;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
21804
+ reactData.isCustomStatus=true;}if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomAlign||isCustomHeaderAlign||isCustomFooterAlign||isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){if(!tableId){table_errLog('vxe.error.reqProp',['id']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const storeData=type==='reset'?{alignData:{},headerAlignData:{},footerAlignData:{},resizableData:{},sortData:[],visibleData:{},fixedData:{},aggGroupData:{},aggFuncData:{}}:$xeTable.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)();},/**
21475
21805
  * @private
21476
21806
  */handleCustom(){const{mouseConfig}=props;if(mouseConfig){if($xeTable.clearSelected){$xeTable.clearSelected();}if($xeTable.clearCellAreas){$xeTable.clearCellAreas();$xeTable.clearCopyCellArea();}}$xeTable.analyColumnWidth();return $xeTable.refreshColumn(true);},handleUpdateDataQueue(){reactData.upDataFlag++;},handleRefreshColumnQueue(){reactData.reColumnFlag++;},handleFilterOptions(column){if(column){const{filterStore}=reactData;const{filterRender,filters}=column;const filterOptions=filters||[];const compConf=isEnableConf(filterRender)?table_renderer.get(filterRender.name):null;const frMethod=column.filterRecoverMethod||(compConf?compConf.tableFilterRecoverMethod||compConf.filterRecoverMethod:null);filterStore.column=column;// 复原状态
21477
21807
  filterOptions.forEach(option=>{const{_checked,checked}=option;option._checked=checked;if(!checked&&_checked!==checked){if(frMethod){frMethod({option,column,$table:$xeTable});}}});$xeTable.checkFilterOptions();}},preventEvent(evnt,type,args,next,end){let evntList=table_interceptor.get(type);// 兼容老版本
@@ -24734,10 +25064,16 @@ const Toolbar = VxeToolbar;
24734
25064
  colResizable: '列宽(像素)',
24735
25065
  colVisible: '是否显示',
24736
25066
  colFixed: '冻结列',
24737
- colFixedMax: '冻结列(最多 {0} 列)',
24738
- fixedLeft: '左侧',
24739
- fixedUnset: '不设置',
24740
- fixedRight: '右侧',
25067
+ colFixedMax: '冻结列({0}',
25068
+ colAlign: '对齐方式',
25069
+ colHeadAlign: '表头对齐方式',
25070
+ colFootAlign: '表尾对齐方式',
25071
+ fixedLeft: '左',
25072
+ fixedUnset: '无',
25073
+ fixedRight: '右',
25074
+ alignLeft: '左',
25075
+ alignCenter: '中',
25076
+ alignRight: '右',
24741
25077
  moveUp: '上移',
24742
25078
  moveDn: '下移',
24743
25079
  putTop: '置顶',
@@ -24745,7 +25081,10 @@ const Toolbar = VxeToolbar;
24745
25081
  moveUpTitle: '点击向上移动',
24746
25082
  moveDnTitle: '点击向下移动',
24747
25083
  putTopTitle: '点击置顶',
24748
- putBottomTitle: '点击置尾'
25084
+ putBottomTitle: '点击置尾',
25085
+ anLeftTitle: '左对齐',
25086
+ anCenterTitle: '居中',
25087
+ anRightTitle: '右对齐'
24749
25088
  }
24750
25089
  },
24751
25090
  import: {