vxe-table 4.19.21 → 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 (183) hide show
  1. package/dist/all.esm.js +682 -359
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/{iconfont.1782656047498.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 +16 -3
  10. package/es/locale/lang/de-DE.js +16 -3
  11. package/es/locale/lang/en-US.js +20 -7
  12. package/es/locale/lang/es-ES.js +16 -3
  13. package/es/locale/lang/fr-FR.js +16 -3
  14. package/es/locale/lang/hu-HU.js +16 -3
  15. package/es/locale/lang/hy-AM.js +16 -3
  16. package/es/locale/lang/id-ID.js +16 -3
  17. package/es/locale/lang/it-IT.js +15 -2
  18. package/es/locale/lang/ja-JP.js +16 -3
  19. package/es/locale/lang/ko-KR.js +16 -3
  20. package/es/locale/lang/ms-MY.js +16 -3
  21. package/es/locale/lang/nb-NO.js +16 -3
  22. package/es/locale/lang/pt-BR.js +16 -3
  23. package/es/locale/lang/ru-RU.js +16 -3
  24. package/es/locale/lang/th-TH.js +16 -3
  25. package/es/locale/lang/ug-CN.js +16 -3
  26. package/es/locale/lang/uk-UA.js +16 -3
  27. package/es/locale/lang/uz-UZ.js +16 -3
  28. package/es/locale/lang/vi-VN.js +15 -2
  29. package/es/locale/lang/zh-CHT.js +18 -5
  30. package/es/locale/lang/zh-CN.js +18 -5
  31. package/es/style.css +1 -1
  32. package/es/style.min.css +1 -1
  33. package/es/table/module/custom/hook.js +114 -37
  34. package/es/table/module/custom/panel.js +405 -257
  35. package/es/table/module/edit/hook.js +0 -1
  36. package/es/table/src/columnInfo.js +14 -8
  37. package/es/table/src/emits.js +8 -0
  38. package/es/table/src/table.js +81 -46
  39. package/es/table/src/util.js +32 -1
  40. package/es/table/style.css +96 -49
  41. package/es/table/style.min.css +1 -1
  42. package/es/ui/index.js +16 -4
  43. package/es/ui/src/log.js +1 -1
  44. package/es/vxe-table/style.css +96 -49
  45. package/es/vxe-table/style.min.css +1 -1
  46. package/lib/{iconfont.1782656047498.ttf → iconfont.1783046321610.ttf} +0 -0
  47. package/lib/iconfont.1783046321610.woff +0 -0
  48. package/lib/iconfont.1783046321610.woff2 +0 -0
  49. package/lib/index.css +1 -1
  50. package/lib/index.min.css +1 -1
  51. package/lib/index.umd.js +561 -206
  52. package/lib/index.umd.min.js +1 -1
  53. package/lib/locale/lang/ar-EG.js +16 -3
  54. package/lib/locale/lang/ar-EG.min.js +1 -1
  55. package/lib/locale/lang/ar-EG.umd.js +16 -3
  56. package/lib/locale/lang/de-DE.js +16 -3
  57. package/lib/locale/lang/de-DE.min.js +1 -1
  58. package/lib/locale/lang/de-DE.umd.js +16 -3
  59. package/lib/locale/lang/en-US.js +20 -7
  60. package/lib/locale/lang/en-US.min.js +1 -1
  61. package/lib/locale/lang/en-US.umd.js +20 -7
  62. package/lib/locale/lang/es-ES.js +16 -3
  63. package/lib/locale/lang/es-ES.min.js +1 -1
  64. package/lib/locale/lang/es-ES.umd.js +16 -3
  65. package/lib/locale/lang/fr-FR.js +16 -3
  66. package/lib/locale/lang/fr-FR.min.js +1 -1
  67. package/lib/locale/lang/fr-FR.umd.js +16 -3
  68. package/lib/locale/lang/hu-HU.js +16 -3
  69. package/lib/locale/lang/hu-HU.min.js +1 -1
  70. package/lib/locale/lang/hu-HU.umd.js +16 -3
  71. package/lib/locale/lang/hy-AM.js +16 -3
  72. package/lib/locale/lang/hy-AM.min.js +1 -1
  73. package/lib/locale/lang/hy-AM.umd.js +16 -3
  74. package/lib/locale/lang/id-ID.js +16 -3
  75. package/lib/locale/lang/id-ID.min.js +1 -1
  76. package/lib/locale/lang/id-ID.umd.js +16 -3
  77. package/lib/locale/lang/it-IT.js +15 -2
  78. package/lib/locale/lang/it-IT.min.js +1 -1
  79. package/lib/locale/lang/it-IT.umd.js +15 -2
  80. package/lib/locale/lang/ja-JP.js +16 -3
  81. package/lib/locale/lang/ja-JP.min.js +1 -1
  82. package/lib/locale/lang/ja-JP.umd.js +16 -3
  83. package/lib/locale/lang/ko-KR.js +16 -3
  84. package/lib/locale/lang/ko-KR.min.js +1 -1
  85. package/lib/locale/lang/ko-KR.umd.js +16 -3
  86. package/lib/locale/lang/ms-MY.js +16 -3
  87. package/lib/locale/lang/ms-MY.min.js +1 -1
  88. package/lib/locale/lang/ms-MY.umd.js +16 -3
  89. package/lib/locale/lang/nb-NO.js +16 -3
  90. package/lib/locale/lang/nb-NO.min.js +1 -1
  91. package/lib/locale/lang/nb-NO.umd.js +16 -3
  92. package/lib/locale/lang/pt-BR.js +16 -3
  93. package/lib/locale/lang/pt-BR.min.js +1 -1
  94. package/lib/locale/lang/pt-BR.umd.js +16 -3
  95. package/lib/locale/lang/ru-RU.js +16 -3
  96. package/lib/locale/lang/ru-RU.min.js +1 -1
  97. package/lib/locale/lang/ru-RU.umd.js +16 -3
  98. package/lib/locale/lang/th-TH.js +16 -3
  99. package/lib/locale/lang/th-TH.min.js +1 -1
  100. package/lib/locale/lang/th-TH.umd.js +16 -3
  101. package/lib/locale/lang/ug-CN.js +16 -3
  102. package/lib/locale/lang/ug-CN.min.js +1 -1
  103. package/lib/locale/lang/ug-CN.umd.js +16 -3
  104. package/lib/locale/lang/uk-UA.js +16 -3
  105. package/lib/locale/lang/uk-UA.min.js +1 -1
  106. package/lib/locale/lang/uk-UA.umd.js +16 -3
  107. package/lib/locale/lang/uz-UZ.js +16 -3
  108. package/lib/locale/lang/uz-UZ.min.js +1 -1
  109. package/lib/locale/lang/uz-UZ.umd.js +16 -3
  110. package/lib/locale/lang/vi-VN.js +15 -2
  111. package/lib/locale/lang/vi-VN.min.js +1 -1
  112. package/lib/locale/lang/vi-VN.umd.js +15 -2
  113. package/lib/locale/lang/zh-CHT.js +18 -5
  114. package/lib/locale/lang/zh-CHT.min.js +1 -1
  115. package/lib/locale/lang/zh-CHT.umd.js +18 -5
  116. package/lib/locale/lang/zh-CN.js +18 -5
  117. package/lib/locale/lang/zh-CN.min.js +1 -1
  118. package/lib/locale/lang/zh-CN.umd.js +18 -5
  119. package/lib/style.css +1 -1
  120. package/lib/style.min.css +1 -1
  121. package/lib/table/module/custom/hook.js +120 -34
  122. package/lib/table/module/custom/hook.min.js +1 -1
  123. package/lib/table/module/custom/panel.js +340 -141
  124. package/lib/table/module/custom/panel.min.js +1 -1
  125. package/lib/table/module/edit/hook.js +0 -1
  126. package/lib/table/module/edit/hook.min.js +1 -1
  127. package/lib/table/src/columnInfo.js +17 -7
  128. package/lib/table/src/columnInfo.min.js +1 -1
  129. package/lib/table/src/emits.js +1 -1
  130. package/lib/table/src/emits.min.js +1 -1
  131. package/lib/table/src/table.js +11 -11
  132. package/lib/table/src/table.min.js +1 -1
  133. package/lib/table/src/util.js +38 -1
  134. package/lib/table/src/util.min.js +1 -1
  135. package/lib/table/style/style.css +96 -49
  136. package/lib/table/style/style.min.css +1 -1
  137. package/lib/ui/index.js +16 -4
  138. package/lib/ui/index.min.js +1 -1
  139. package/lib/ui/src/log.js +1 -1
  140. package/lib/ui/src/log.min.js +1 -1
  141. package/lib/vxe-table/style/style.css +96 -49
  142. package/lib/vxe-table/style/style.min.css +1 -1
  143. package/package.json +2 -2
  144. package/packages/locale/lang/ar-EG.ts +16 -3
  145. package/packages/locale/lang/de-DE.ts +16 -3
  146. package/packages/locale/lang/en-US.ts +20 -7
  147. package/packages/locale/lang/es-ES.ts +16 -3
  148. package/packages/locale/lang/fr-FR.ts +16 -3
  149. package/packages/locale/lang/hu-HU.ts +16 -3
  150. package/packages/locale/lang/hy-AM.ts +16 -3
  151. package/packages/locale/lang/id-ID.ts +16 -3
  152. package/packages/locale/lang/it-IT.ts +15 -2
  153. package/packages/locale/lang/ja-JP.ts +16 -3
  154. package/packages/locale/lang/ko-KR.ts +16 -3
  155. package/packages/locale/lang/ms-MY.ts +16 -3
  156. package/packages/locale/lang/nb-NO.ts +16 -3
  157. package/packages/locale/lang/pt-BR.ts +16 -3
  158. package/packages/locale/lang/ru-RU.ts +16 -3
  159. package/packages/locale/lang/th-TH.ts +16 -3
  160. package/packages/locale/lang/ug-CN.ts +16 -3
  161. package/packages/locale/lang/uk-UA.ts +16 -3
  162. package/packages/locale/lang/uz-UZ.ts +16 -3
  163. package/packages/locale/lang/vi-VN.ts +15 -2
  164. package/packages/locale/lang/zh-CHT.ts +18 -5
  165. package/packages/locale/lang/zh-CN.ts +18 -5
  166. package/packages/table/module/custom/hook.ts +113 -36
  167. package/packages/table/module/custom/panel.ts +488 -286
  168. package/packages/table/module/edit/hook.ts +0 -1
  169. package/packages/table/src/columnInfo.ts +14 -8
  170. package/packages/table/src/emits.ts +8 -0
  171. package/packages/table/src/table.ts +91 -47
  172. package/packages/table/src/util.ts +35 -1
  173. package/packages/ui/index.ts +15 -3
  174. package/styles/components/icon.scss +29 -2
  175. package/styles/components/table-module/custom.scss +88 -67
  176. package/styles/icon/iconfont.ttf +0 -0
  177. package/styles/icon/iconfont.woff +0 -0
  178. package/styles/icon/iconfont.woff2 +0 -0
  179. package/styles/theme/base.scss +13 -1
  180. package/es/iconfont.1782656047498.woff +0 -0
  181. package/es/iconfont.1782656047498.woff2 +0 -0
  182. package/lib/iconfont.1782656047498.woff +0 -0
  183. package/lib/iconfont.1782656047498.woff2 +0 -0
@@ -107,13 +107,16 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
107
107
  $xeTable.saveCustom();
108
108
  $xeTable.closeCustom();
109
109
  $xeTable.emitCustomEvent('confirm', $event);
110
+ $xeTable.dispatchEvent('custom-confirm', {}, $event);
110
111
  $xeTable.emitCustomEvent('close', $event);
112
+ $xeTable.dispatchEvent('custom-close', {}, $event);
111
113
  };
112
114
  const cancelCloseEvent = ({
113
115
  $event
114
116
  }) => {
115
117
  $xeTable.closeCustom();
116
118
  $xeTable.emitCustomEvent('close', $event);
119
+ $xeTable.dispatchEvent('custom-close', {}, $event);
117
120
  };
118
121
  const cancelCustomEvent = ({
119
122
  $event
@@ -121,13 +124,17 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
121
124
  $xeTable.cancelCustom();
122
125
  $xeTable.closeCustom();
123
126
  $xeTable.emitCustomEvent('cancel', $event);
127
+ $xeTable.dispatchEvent('custom-cancel', {}, $event);
124
128
  $xeTable.emitCustomEvent('close', $event);
129
+ $xeTable.dispatchEvent('custom-close', {}, $event);
125
130
  };
126
131
  const handleResetCustomEvent = evnt => {
127
132
  $xeTable.resetCustom(true);
128
133
  $xeTable.closeCustom();
129
134
  $xeTable.emitCustomEvent('reset', evnt);
135
+ $xeTable.dispatchEvent('custom-reset', {}, evnt);
130
136
  $xeTable.emitCustomEvent('close', evnt);
137
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
131
138
  };
132
139
  const resetCustomEvent = ({
133
140
  $event
@@ -244,6 +251,22 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
244
251
  }, evnt);
245
252
  }
246
253
  };
254
+ const changeAlignOption = (column, targetAlign, colProperty, renderProperty, eName, evnt) => {
255
+ const customOpts = computeCustomOpts.value;
256
+ if (customOpts.immediate) {
257
+ column[colProperty] = targetAlign;
258
+ column[renderProperty] = targetAlign;
259
+ tableReactData.isCustomStatus = true;
260
+ $xeTable.handleCustom();
261
+ $xeTable.saveCustomStore(`update:${colProperty}`);
262
+ } else {
263
+ column[renderProperty] = targetAlign;
264
+ }
265
+ $xeTable.dispatchEvent(eName, {
266
+ column,
267
+ [colProperty]: targetAlign
268
+ }, evnt);
269
+ };
247
270
  const allOptionEvent = evnt => {
248
271
  const {
249
272
  customStore
@@ -761,7 +784,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
761
784
  const customOpts = computeCustomOpts.value;
762
785
  const columnDragOpts = computeColumnDragOpts.value;
763
786
  const {
764
- popupStyle
787
+ defPopupStyle
765
788
  } = customStore;
766
789
  const {
767
790
  immediate,
@@ -905,7 +928,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
905
928
  }
906
929
  }) : renderEmptyElement($xeTable)] : []) : renderEmptyElement($xeTable), !parentItem && allowFixed ? (0, _vue.h)('div', {
907
930
  class: 'vxe-table-custom--fixed-option'
908
- }, [VxeUIButtonComponent ? (0, _vue.h)(VxeUIButtonComponent, {
931
+ }, VxeUIButtonComponent ? [(0, _vue.h)(VxeUIButtonComponent, {
909
932
  mode: 'text',
910
933
  icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
911
934
  status: column.renderFixed === 'left' ? 'primary' : '',
@@ -916,7 +939,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
916
939
  }) => {
917
940
  changeFixedOption(column, 'left', $event);
918
941
  }
919
- }) : renderEmptyElement($xeTable), VxeUIButtonComponent ? (0, _vue.h)(VxeUIButtonComponent, {
942
+ }), (0, _vue.h)(VxeUIButtonComponent, {
920
943
  mode: 'text',
921
944
  icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
922
945
  status: column.renderFixed === 'right' ? 'primary' : '',
@@ -927,7 +950,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
927
950
  }) => {
928
951
  changeFixedOption(column, 'right', $event);
929
952
  }
930
- }) : renderEmptyElement($xeTable)]) : renderEmptyElement($xeTable)]));
953
+ })] : []) : renderEmptyElement($xeTable)]));
931
954
  }
932
955
  });
933
956
  return (0, _vue.h)('div', {
@@ -937,7 +960,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
937
960
  [`size--${vSize}`]: vSize,
938
961
  'is--active': customStore.visible
939
962
  }],
940
- style: popupStyle
963
+ style: defPopupStyle
941
964
  }, customStore.visible ? [(0, _vue.h)('div', {
942
965
  ref: refBodyWrapperElem,
943
966
  class: 'vxe-table-custom-simple--body-wrapper'
@@ -1003,39 +1026,26 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1003
1026
  onClick: confirmCustomEvent
1004
1027
  }) : renderEmptyElement($xeTable)])]) : null]), renderDragTip()])] : []);
1005
1028
  };
1006
- const renderPopupPanel = () => {
1007
- const $xeGrid = $xeTable.xeGrid;
1008
- const $xeGantt = $xeTable.xeGantt;
1009
- const {
1010
- customStore
1011
- } = props;
1029
+ const renderPopupBodys = () => {
1012
1030
  const {
1013
- treeConfig,
1014
- rowGroupConfig,
1015
- aggregateConfig,
1016
1031
  resizable: allResizable
1017
1032
  } = tableProps;
1018
1033
  const {
1019
- isCustomStatus,
1020
1034
  customColumnList
1021
1035
  } = tableReactData;
1022
1036
  const customOpts = computeCustomOpts.value;
1023
1037
  const columnDragOpts = computeColumnDragOpts.value;
1024
- const aggregateOpts = computeAggregateOpts.value;
1025
1038
  const {
1026
- placement: aggPlacement
1027
- } = aggregateOpts;
1028
- const {
1029
- mode,
1030
1039
  immediate,
1031
1040
  showSortDragButton,
1032
1041
  showSortMoveButton,
1033
1042
  showSortPutButton,
1034
- modalOptions,
1035
- drawerOptions,
1036
1043
  allowVisible,
1037
1044
  allowSort,
1038
1045
  allowFixed,
1046
+ allowAlign,
1047
+ allowHeaderAlign,
1048
+ allowFooterAlign,
1039
1049
  allowResizable,
1040
1050
  allowGroup,
1041
1051
  allowValues,
@@ -1043,40 +1053,17 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1043
1053
  visibleMethod
1044
1054
  } = customOpts;
1045
1055
  const columnOpts = computeColumnOpts.value;
1046
- const {
1047
- maxFixedSize
1048
- } = columnOpts;
1049
1056
  const resizableOpts = computeResizableOpts.value;
1050
1057
  const {
1051
1058
  minWidth: reMinWidth,
1052
1059
  maxWidth: reMaxWidth
1053
1060
  } = resizableOpts;
1054
- const modalOpts = Object.assign({}, modalOptions);
1055
- const drawerOpts = Object.assign({}, drawerOptions);
1056
1061
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
1057
1062
  const {
1058
1063
  isCrossDrag,
1059
1064
  isPeerDrag
1060
1065
  } = columnDragOpts;
1061
- const slots = customOpts.slots || {};
1062
- const headerSlot = slots.header;
1063
- const topSlot = slots.top;
1064
- const bottomSlot = slots.bottom;
1065
- const defaultSlot = slots.default;
1066
- const footerSlot = slots.footer;
1067
1066
  const trVNs = [];
1068
- const isAllChecked = customStore.isAll;
1069
- const isAllIndeterminate = customStore.isIndeterminate;
1070
- const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
1071
- const params = {
1072
- $table: $xeTable,
1073
- $grid: $xeGrid,
1074
- $gantt: $xeGantt,
1075
- columns: customColumnList,
1076
- isAllChecked,
1077
- isAllIndeterminate,
1078
- isCustomStatus
1079
- };
1080
1067
  _xeUtils.default.eachTree(customColumnList, (column, index, items, path, parentItem) => {
1081
1068
  const isVisible = visibleMethod ? visibleMethod({
1082
1069
  $table: $xeTable,
@@ -1114,33 +1101,46 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1114
1101
  }) : false;
1115
1102
  const isHidden = !isChecked;
1116
1103
  const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
1117
- trVNs.push((0, _vue.h)('tr', {
1118
- key: column.id,
1119
- colid: column.id,
1120
- class: [`vxe-table-custom-popup--row level--${column.level}`, {
1121
- 'is--group': isColGroup
1122
- }],
1123
- onDragstart: sortDragstartEvent,
1124
- onDragend: sortDragendEvent,
1125
- onDragover: sortDragoverEvent
1126
- }, [allowVisible ? (0, _vue.h)('td', {
1127
- class: 'vxe-table-custom-popup--column-item col--visible'
1128
- }, [(0, _vue.h)('div', {
1129
- class: ['vxe-table-custom--checkbox-option', {
1130
- 'is--checked': isChecked,
1131
- 'is--indeterminate': isIndeterminate,
1132
- 'is--disabled': isDisabled
1133
- }],
1134
- title: getI18n('vxe.custom.setting.colVisible'),
1135
- onClick: evnt => {
1136
- if (!isDisabled) {
1137
- changeCheckboxOption(column, evnt);
1104
+ const alignList = [{
1105
+ icon: getIcon().TABLE_CUSTOM_ALIGN_LEFT,
1106
+ value: 'left',
1107
+ title: getI18n('vxe.custom.setting.anLeftTitle'),
1108
+ disabled: isHidden
1109
+ }, {
1110
+ icon: getIcon().TABLE_CUSTOM_ALIGN_CENTER,
1111
+ value: 'center',
1112
+ title: getI18n('vxe.custom.setting.anCenterTitle'),
1113
+ disabled: isHidden
1114
+ }, {
1115
+ icon: getIcon().TABLE_CUSTOM_ALIGN_RIGHT,
1116
+ value: 'right',
1117
+ title: getI18n('vxe.custom.setting.anRightTitle'),
1118
+ disabled: isHidden
1119
+ }];
1120
+ const tdVNs = [];
1121
+ if (allowVisible) {
1122
+ tdVNs.push((0, _vue.h)('td', {
1123
+ key: 'av',
1124
+ class: 'vxe-table-custom-popup--column-td col--visible'
1125
+ }, [(0, _vue.h)('div', {
1126
+ class: ['vxe-table-custom--checkbox-option', {
1127
+ 'is--checked': isChecked,
1128
+ 'is--indeterminate': isIndeterminate,
1129
+ 'is--disabled': isDisabled
1130
+ }],
1131
+ title: getI18n('vxe.custom.setting.colVisible'),
1132
+ onClick: evnt => {
1133
+ if (!isDisabled) {
1134
+ changeCheckboxOption(column, evnt);
1135
+ }
1138
1136
  }
1139
- }
1140
- }, [(0, _vue.h)('span', {
1141
- class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1142
- })])]) : renderEmptyElement($xeTable), (0, _vue.h)('td', {
1143
- class: 'vxe-table-custom-popup--column-item col--name'
1137
+ }, [(0, _vue.h)('span', {
1138
+ class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1139
+ })])]));
1140
+ }
1141
+ tdVNs.push((0, _vue.h)('td', {
1142
+ key: 'at',
1143
+ class: 'vxe-table-custom-popup--column-td col--name'
1144
1144
  }, [(0, _vue.h)('div', {
1145
1145
  class: 'vxe-table-custom-popup--name'
1146
1146
  }, [allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0, _vue.h)('div', Object.assign({
@@ -1167,7 +1167,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1167
1167
  class: 'vxe-table-custom-popup--move-btn'
1168
1168
  }, VxeUIButtonComponent ? [showSortMoveButton ? (0, _vue.h)(VxeUIButtonComponent, {
1169
1169
  mode: 'text',
1170
- content: getI18n('vxe.custom.setting.moveUp'),
1170
+ icon: 'vxe-icon-arrows-up',
1171
1171
  title: getI18n('vxe.custom.setting.moveUpTitle'),
1172
1172
  disabled: index <= 0,
1173
1173
  onClick(evntParame) {
@@ -1175,7 +1175,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1175
1175
  }
1176
1176
  }) : renderEmptyElement($xeTable), showSortMoveButton ? (0, _vue.h)(VxeUIButtonComponent, {
1177
1177
  mode: 'text',
1178
- content: getI18n('vxe.custom.setting.moveDn'),
1178
+ icon: 'vxe-icon-arrows-down',
1179
1179
  title: getI18n('vxe.custom.setting.moveDnTitle'),
1180
1180
  disabled: index >= items.length - 1,
1181
1181
  onClick(evntParame) {
@@ -1183,7 +1183,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1183
1183
  }
1184
1184
  }) : renderEmptyElement($xeTable), showSortPutButton && !parentItem ? (0, _vue.h)(VxeUIButtonComponent, {
1185
1185
  mode: 'text',
1186
- content: getI18n('vxe.custom.setting.putTop'),
1186
+ icon: 'vxe-icon-top',
1187
1187
  title: getI18n('vxe.custom.setting.putTopTitle'),
1188
1188
  disabled: index <= 0,
1189
1189
  onClick(evntParame) {
@@ -1191,62 +1191,278 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1191
1191
  }
1192
1192
  }) : renderEmptyElement($xeTable), showSortPutButton && !parentItem ? (0, _vue.h)(VxeUIButtonComponent, {
1193
1193
  mode: 'text',
1194
- content: getI18n('vxe.custom.setting.putBottom'),
1194
+ icon: 'vxe-icon-bottom',
1195
1195
  title: getI18n('vxe.custom.setting.putBottomTitle'),
1196
1196
  disabled: index >= items.length - 1,
1197
1197
  onClick(evntParame) {
1198
1198
  sortMoveBottomEvent(evntParame, column);
1199
1199
  }
1200
- }) : renderEmptyElement($xeTable)] : []) : renderEmptyElement($xeTable)])]), allowResizable ? (0, _vue.h)('td', {
1201
- class: 'vxe-table-custom-popup--column-item col--resizable'
1202
- }, [column.children && column.children.length || !(_xeUtils.default.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? (0, _vue.h)('span', '-') : VxeUINumberInputComponent ? (0, _vue.h)(VxeUINumberInputComponent, {
1203
- type: 'integer',
1204
- immediate: false,
1205
- disabled: isHidden,
1206
- modelValue: column.renderResizeWidth,
1207
- min: customMinWidth || undefined,
1208
- max: customMaxWidth || undefined,
1209
- 'onUpdate:modelValue'(value) {
1210
- const width = Math.max(0, Number(value));
1211
- column.renderResizeWidth = width;
1212
- },
1213
- onChange() {
1214
- changeColumnWidth(column);
1215
- }
1216
- }) : renderEmptyElement($xeTable)]) : renderEmptyElement($xeTable), allowFixed ? (0, _vue.h)('td', {
1217
- class: 'vxe-table-custom-popup--column-item col--fixed'
1218
- }, [parentItem ? (0, _vue.h)('span', '-') : VxeUIRadioGroupComponent ? (0, _vue.h)(VxeUIRadioGroupComponent, {
1219
- modelValue: column.renderFixed || '',
1220
- type: 'button',
1221
- size: 'mini',
1222
- disabled: isHidden,
1223
- options: [{
1224
- label: getI18n('vxe.custom.setting.fixedLeft'),
1225
- value: 'left',
1226
- disabled: isHidden || isMaxFixedColumn
1227
- }, {
1228
- label: getI18n('vxe.custom.setting.fixedUnset'),
1229
- value: '',
1230
- disabled: isHidden
1231
- }, {
1232
- label: getI18n('vxe.custom.setting.fixedRight'),
1233
- value: 'right',
1234
- disabled: isHidden || isMaxFixedColumn
1200
+ }) : renderEmptyElement($xeTable)] : []) : renderEmptyElement($xeTable)])]));
1201
+ if (allowResizable) {
1202
+ tdVNs.push((0, _vue.h)('td', {
1203
+ key: 'aw',
1204
+ class: 'vxe-table-custom-popup--column-td col--resizable'
1205
+ }, [column.children && column.children.length || !(_xeUtils.default.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? (0, _vue.h)('span', '-') : VxeUINumberInputComponent ? (0, _vue.h)(VxeUINumberInputComponent, {
1206
+ type: 'integer',
1207
+ immediate: false,
1208
+ disabled: isHidden,
1209
+ modelValue: column.renderResizeWidth,
1210
+ min: customMinWidth || undefined,
1211
+ max: customMaxWidth || undefined,
1212
+ 'onUpdate:modelValue'(value) {
1213
+ const width = Math.max(0, Number(value));
1214
+ column.renderResizeWidth = width;
1215
+ },
1216
+ onChange() {
1217
+ changeColumnWidth(column);
1218
+ }
1219
+ }) : renderEmptyElement($xeTable)]));
1220
+ }
1221
+ if (allowFixed) {
1222
+ tdVNs.push((0, _vue.h)('td', {
1223
+ key: 'af',
1224
+ class: 'vxe-table-custom-popup--column-td col--fixed'
1225
+ }, parentItem ? [(0, _vue.h)('span', '-')] : VxeUIRadioGroupComponent ? [(0, _vue.h)(VxeUIButtonComponent, {
1226
+ icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
1227
+ status: column.renderFixed === 'left' ? 'primary' : '',
1228
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
1229
+ title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
1230
+ onClick: ({
1231
+ $event
1232
+ }) => {
1233
+ changeFixedOption(column, 'left', $event);
1234
+ }
1235
+ }), (0, _vue.h)(VxeUIButtonComponent, {
1236
+ icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
1237
+ status: column.renderFixed === 'right' ? 'primary' : '',
1238
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
1239
+ title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
1240
+ onClick: ({
1241
+ $event
1242
+ }) => {
1243
+ changeFixedOption(column, 'right', $event);
1244
+ }
1245
+ })] : []));
1246
+ }
1247
+ if (allowAlign) {
1248
+ tdVNs.push((0, _vue.h)('td', {
1249
+ key: 'aa',
1250
+ class: 'vxe-table-custom-popup--column-td col--align'
1251
+ }, VxeUIRadioGroupComponent ? [(0, _vue.h)(VxeUIRadioGroupComponent, {
1252
+ modelValue: column.renderAlign || '',
1253
+ type: 'button',
1254
+ strict: false,
1255
+ disabled: isHidden,
1256
+ options: alignList,
1257
+ onChange({
1258
+ value,
1259
+ $event
1260
+ }) {
1261
+ changeAlignOption(column, value, 'align', 'renderAlign', 'custom-align-change', $event);
1262
+ }
1263
+ })] : []));
1264
+ }
1265
+ if (allowHeaderAlign) {
1266
+ tdVNs.push((0, _vue.h)('td', {
1267
+ key: 'aha',
1268
+ class: 'vxe-table-custom-popup--column-td col--header-align'
1269
+ }, isColGroup ? [(0, _vue.h)('span', '-')] : VxeUIRadioGroupComponent ? [(0, _vue.h)(VxeUIRadioGroupComponent, {
1270
+ modelValue: column.renderHeaderAlign || '',
1271
+ type: 'button',
1272
+ strict: false,
1273
+ disabled: isHidden,
1274
+ options: alignList,
1275
+ onChange({
1276
+ value,
1277
+ $event
1278
+ }) {
1279
+ changeAlignOption(column, value, 'headerAlign', 'renderHeaderAlign', 'custom-header-align-change', $event);
1280
+ }
1281
+ })] : []));
1282
+ }
1283
+ if (allowFooterAlign) {
1284
+ tdVNs.push((0, _vue.h)('td', {
1285
+ key: 'afa',
1286
+ class: 'vxe-table-custom-popup--column-td col--footer-align'
1287
+ }, isColGroup ? [(0, _vue.h)('span', '-')] : VxeUIRadioGroupComponent ? [(0, _vue.h)(VxeUIRadioGroupComponent, {
1288
+ modelValue: column.renderFooterAlign || '',
1289
+ type: 'button',
1290
+ strict: false,
1291
+ disabled: isHidden,
1292
+ options: alignList,
1293
+ onChange({
1294
+ value,
1295
+ $event
1296
+ }) {
1297
+ changeAlignOption(column, value, 'footerAlign', 'renderFooterAlign', 'custom-footer-align-change', $event);
1298
+ }
1299
+ })] : []));
1300
+ }
1301
+ trVNs.push((0, _vue.h)('tr', {
1302
+ key: column.id,
1303
+ colid: column.id,
1304
+ class: [`vxe-table-custom-popup--row level--${column.level}`, {
1305
+ 'is--group': isColGroup
1235
1306
  }],
1236
- onChange({
1237
- label,
1238
- $event
1239
- }) {
1240
- changeFixedOption(column, label, $event);
1241
- }
1242
- }) : renderEmptyElement($xeTable)]) : renderEmptyElement($xeTable)]));
1307
+ onDragstart: sortDragstartEvent,
1308
+ onDragend: sortDragendEvent,
1309
+ onDragover: sortDragoverEvent
1310
+ }, tdVNs));
1243
1311
  }
1244
1312
  });
1313
+ return trVNs;
1314
+ };
1315
+ const renderPopupPanel = () => {
1316
+ const $xeGrid = $xeTable.xeGrid;
1317
+ const $xeGantt = $xeTable.xeGantt;
1318
+ const {
1319
+ customStore
1320
+ } = props;
1321
+ const {
1322
+ treeConfig,
1323
+ rowGroupConfig,
1324
+ aggregateConfig
1325
+ } = tableProps;
1326
+ const {
1327
+ isCustomStatus,
1328
+ customColumnList
1329
+ } = tableReactData;
1330
+ const vSize = computeSize.value;
1331
+ const customOpts = computeCustomOpts.value;
1332
+ const aggregateOpts = computeAggregateOpts.value;
1333
+ const {
1334
+ panePopupStyle
1335
+ } = customStore;
1336
+ const {
1337
+ placement: aggPlacement
1338
+ } = aggregateOpts;
1339
+ const {
1340
+ mode,
1341
+ immediate,
1342
+ modalOptions,
1343
+ drawerOptions,
1344
+ allowVisible,
1345
+ allowFixed,
1346
+ allowAlign,
1347
+ allowHeaderAlign,
1348
+ allowFooterAlign,
1349
+ allowResizable
1350
+ } = customOpts;
1351
+ const columnOpts = computeColumnOpts.value;
1352
+ const {
1353
+ maxFixedSize
1354
+ } = columnOpts;
1355
+ const modalOpts = Object.assign({}, modalOptions);
1356
+ const drawerOpts = Object.assign({}, drawerOptions);
1357
+ const slots = customOpts.slots || {};
1358
+ const headerSlot = slots.header;
1359
+ const topSlot = slots.top;
1360
+ const bottomSlot = slots.bottom;
1361
+ const defaultSlot = slots.default;
1362
+ const footerSlot = slots.footer;
1363
+ const isAllChecked = customStore.isAll;
1364
+ const isAllIndeterminate = customStore.isIndeterminate;
1365
+ const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
1366
+ const params = {
1367
+ $table: $xeTable,
1368
+ $grid: $xeGrid,
1369
+ $gantt: $xeGantt,
1370
+ columns: customColumnList,
1371
+ isAllChecked,
1372
+ isAllIndeterminate,
1373
+ isCustomStatus
1374
+ };
1375
+ const colVNs = [];
1376
+ const headVNs = [];
1377
+ if (allowVisible) {
1378
+ colVNs.push((0, _vue.h)('col', {
1379
+ key: 'av',
1380
+ class: 'vxe-table-custom-popup--column-col col--checkbox'
1381
+ }));
1382
+ headVNs.push((0, _vue.h)('th', {
1383
+ key: 'av',
1384
+ class: 'vxe-table-custom-popup--column-th col--checkbox'
1385
+ }, [(0, _vue.h)('div', {
1386
+ class: ['vxe-table-custom--checkbox-option', {
1387
+ 'is--checked': isAllChecked,
1388
+ 'is--indeterminate': isAllIndeterminate
1389
+ }],
1390
+ title: getI18n('vxe.table.allTitle'),
1391
+ onClick: allOptionEvent
1392
+ }, [(0, _vue.h)('span', {
1393
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1394
+ })
1395
+ // h('span', {
1396
+ // class: 'vxe-checkbox--label'
1397
+ // }, getI18n('vxe.toolbar.customAll'))
1398
+ ])]));
1399
+ }
1400
+ colVNs.push((0, _vue.h)('col', {
1401
+ key: 'at',
1402
+ class: 'vxe-table-custom-popup--column-col col--title'
1403
+ }));
1404
+ headVNs.push((0, _vue.h)('th', {
1405
+ key: 'at',
1406
+ class: 'vxe-table-custom-popup--column-th col--title'
1407
+ }, getI18n('vxe.custom.setting.colTitle')));
1408
+ if (allowResizable) {
1409
+ colVNs.push((0, _vue.h)('col', {
1410
+ key: 'aw',
1411
+ class: 'vxe-table-custom-popup--column-col col--width'
1412
+ }));
1413
+ headVNs.push((0, _vue.h)('th', {
1414
+ key: 'aw',
1415
+ class: 'vxe-table-custom-popup--column-th col--width'
1416
+ }, getI18n('vxe.custom.setting.colResizable')));
1417
+ }
1418
+ if (allowFixed) {
1419
+ colVNs.push((0, _vue.h)('col', {
1420
+ key: 'af',
1421
+ class: 'vxe-table-custom-popup--column-col col--fixed'
1422
+ }));
1423
+ headVNs.push((0, _vue.h)('th', {
1424
+ key: 'af',
1425
+ class: 'vxe-table-custom-popup--column-th col--fixed'
1426
+ }, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])));
1427
+ }
1428
+ if (allowAlign) {
1429
+ colVNs.push((0, _vue.h)('col', {
1430
+ key: 'aa',
1431
+ class: 'vxe-table-custom-popup--column-col col--align'
1432
+ }));
1433
+ headVNs.push((0, _vue.h)('th', {
1434
+ key: 'aa',
1435
+ class: 'vxe-table-custom-popup--column-th col--align'
1436
+ }, getI18n('vxe.custom.setting.colAlign')));
1437
+ }
1438
+ if (allowHeaderAlign) {
1439
+ colVNs.push((0, _vue.h)('col', {
1440
+ key: 'aha',
1441
+ class: 'vxe-table-custom-popup--column-col col--header-align'
1442
+ }));
1443
+ headVNs.push((0, _vue.h)('th', {
1444
+ key: 'aha',
1445
+ class: 'vxe-table-custom-popup--column-th col--header-align'
1446
+ }, getI18n('vxe.custom.setting.colHeadAlign')));
1447
+ }
1448
+ if (allowFooterAlign) {
1449
+ colVNs.push((0, _vue.h)('col', {
1450
+ key: 'afa',
1451
+ class: 'vxe-table-custom-popup--column-col col--footer-align'
1452
+ }));
1453
+ headVNs.push((0, _vue.h)('th', {
1454
+ key: 'afa',
1455
+ class: 'vxe-table-custom-popup--column-th col--footer-align'
1456
+ }, getI18n('vxe.custom.setting.colFootAlign')));
1457
+ }
1245
1458
  const scopedSlots = {
1246
1459
  default: () => {
1247
1460
  return (0, _vue.h)('div', {
1248
1461
  ref: refBodyWrapperElem,
1249
- class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`]
1462
+ class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`, {
1463
+ [`size--${vSize}`]: vSize
1464
+ }],
1465
+ style: panePopupStyle
1250
1466
  }, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [!isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, _vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
1251
1467
  customStore
1252
1468
  }) : renderEmptyElement($xeTable), (0, _vue.h)('div', {
@@ -1256,31 +1472,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1256
1472
  class: 'vxe-table-custom-popup--table-top'
1257
1473
  }, $xeTable.callSlot(topSlot, params)) : renderEmptyElement($xeTable), (0, _vue.h)('div', {
1258
1474
  class: 'vxe-table-custom-popup--table-wrapper'
1259
- }, [(0, _vue.h)('table', {}, [(0, _vue.h)('colgroup', {}, [allowVisible ? (0, _vue.h)('col', {
1260
- class: 'vxe-table-custom-popup--table-col-seq'
1261
- }) : renderEmptyElement($xeTable), (0, _vue.h)('col', {
1262
- class: 'vxe-table-custom-popup--table-col-title'
1263
- }), allowResizable ? (0, _vue.h)('col', {
1264
- class: 'vxe-table-custom-popup--table-col-width'
1265
- }) : renderEmptyElement($xeTable), allowFixed ? (0, _vue.h)('col', {
1266
- class: 'vxe-table-custom-popup--table-col-fixed'
1267
- }) : renderEmptyElement($xeTable)]), (0, _vue.h)('thead', {}, [(0, _vue.h)('tr', {}, [allowVisible ? (0, _vue.h)('th', {}, [(0, _vue.h)('div', {
1268
- class: ['vxe-table-custom--checkbox-option', {
1269
- 'is--checked': isAllChecked,
1270
- 'is--indeterminate': isAllIndeterminate
1271
- }],
1272
- title: getI18n('vxe.table.allTitle'),
1273
- onClick: allOptionEvent
1274
- }, [(0, _vue.h)('span', {
1275
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1276
- }), (0, _vue.h)('span', {
1277
- class: 'vxe-checkbox--label'
1278
- }, getI18n('vxe.toolbar.customAll'))])]) : renderEmptyElement($xeTable), (0, _vue.h)('th', {}, getI18n('vxe.custom.setting.colTitle')), allowResizable ? (0, _vue.h)('th', {}, getI18n('vxe.custom.setting.colResizable')) : renderEmptyElement($xeTable), allowFixed ? (0, _vue.h)('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : renderEmptyElement($xeTable)])]), (0, _vue.h)(_vue.TransitionGroup, {
1475
+ }, [(0, _vue.h)('table', {}, [(0, _vue.h)('colgroup', {}, colVNs), (0, _vue.h)('thead', {}, [(0, _vue.h)('tr', {}, headVNs)]), (0, _vue.h)(_vue.TransitionGroup, {
1279
1476
  class: 'vxe-table-custom--panel-list',
1280
1477
  tag: 'tbody',
1281
1478
  name: 'vxe-table-custom--list'
1282
1479
  }, {
1283
- default: () => trVNs
1480
+ default: () => renderPopupBodys()
1284
1481
  })])]), bottomSlot ? (0, _vue.h)('div', {
1285
1482
  class: 'vxe-table-custom-popup--table-bottom'
1286
1483
  }, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable), renderDragTip()]), isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, _vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
@@ -1298,6 +1495,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1298
1495
  disabled: !isCustomStatus,
1299
1496
  onClick: resetCustomEvent
1300
1497
  }) : renderEmptyElement($xeTable), immediate ? VxeUIButtonComponent ? (0, _vue.h)(VxeUIButtonComponent, {
1498
+ status: 'primary',
1301
1499
  content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
1302
1500
  onClick: cancelCloseEvent
1303
1501
  }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, _vue.h)(VxeUIButtonComponent, {
@@ -1336,8 +1534,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1336
1534
  className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
1337
1535
  modelValue: customStore.visible,
1338
1536
  title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
1339
- width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
1340
- minWidth: modalOpts.minWidth || 700,
1537
+ width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
1538
+ minWidth: modalOpts.minWidth || 800,
1341
1539
  height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
1342
1540
  minHeight: modalOpts.minHeight || 400,
1343
1541
  showZoom: modalOpts.showZoom,
@@ -1346,6 +1544,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1346
1544
  mask: modalOpts.mask,
1347
1545
  lockView: modalOpts.lockView,
1348
1546
  resize: modalOpts.resize,
1547
+ transfer: modalOpts.transfer,
1349
1548
  escClosable: !!modalOpts.escClosable,
1350
1549
  maskClosable: !!modalOpts.maskClosable,
1351
1550
  destroyOnClose: true,