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
@@ -251,6 +251,22 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
251
251
  }, evnt);
252
252
  }
253
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
+ };
254
270
  const allOptionEvent = evnt => {
255
271
  const {
256
272
  customStore
@@ -768,7 +784,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
768
784
  const customOpts = computeCustomOpts.value;
769
785
  const columnDragOpts = computeColumnDragOpts.value;
770
786
  const {
771
- popupStyle
787
+ defPopupStyle
772
788
  } = customStore;
773
789
  const {
774
790
  immediate,
@@ -912,7 +928,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
912
928
  }
913
929
  }) : renderEmptyElement($xeTable)] : []) : renderEmptyElement($xeTable), !parentItem && allowFixed ? (0, _vue.h)('div', {
914
930
  class: 'vxe-table-custom--fixed-option'
915
- }, [VxeUIButtonComponent ? (0, _vue.h)(VxeUIButtonComponent, {
931
+ }, VxeUIButtonComponent ? [(0, _vue.h)(VxeUIButtonComponent, {
916
932
  mode: 'text',
917
933
  icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
918
934
  status: column.renderFixed === 'left' ? 'primary' : '',
@@ -923,7 +939,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
923
939
  }) => {
924
940
  changeFixedOption(column, 'left', $event);
925
941
  }
926
- }) : renderEmptyElement($xeTable), VxeUIButtonComponent ? (0, _vue.h)(VxeUIButtonComponent, {
942
+ }), (0, _vue.h)(VxeUIButtonComponent, {
927
943
  mode: 'text',
928
944
  icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
929
945
  status: column.renderFixed === 'right' ? 'primary' : '',
@@ -934,7 +950,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
934
950
  }) => {
935
951
  changeFixedOption(column, 'right', $event);
936
952
  }
937
- }) : renderEmptyElement($xeTable)]) : renderEmptyElement($xeTable)]));
953
+ })] : []) : renderEmptyElement($xeTable)]));
938
954
  }
939
955
  });
940
956
  return (0, _vue.h)('div', {
@@ -944,7 +960,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
944
960
  [`size--${vSize}`]: vSize,
945
961
  'is--active': customStore.visible
946
962
  }],
947
- style: popupStyle
963
+ style: defPopupStyle
948
964
  }, customStore.visible ? [(0, _vue.h)('div', {
949
965
  ref: refBodyWrapperElem,
950
966
  class: 'vxe-table-custom-simple--body-wrapper'
@@ -1010,39 +1026,26 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1010
1026
  onClick: confirmCustomEvent
1011
1027
  }) : renderEmptyElement($xeTable)])]) : null]), renderDragTip()])] : []);
1012
1028
  };
1013
- const renderPopupPanel = () => {
1014
- const $xeGrid = $xeTable.xeGrid;
1015
- const $xeGantt = $xeTable.xeGantt;
1016
- const {
1017
- customStore
1018
- } = props;
1029
+ const renderPopupBodys = () => {
1019
1030
  const {
1020
- treeConfig,
1021
- rowGroupConfig,
1022
- aggregateConfig,
1023
1031
  resizable: allResizable
1024
1032
  } = tableProps;
1025
1033
  const {
1026
- isCustomStatus,
1027
1034
  customColumnList
1028
1035
  } = tableReactData;
1029
1036
  const customOpts = computeCustomOpts.value;
1030
1037
  const columnDragOpts = computeColumnDragOpts.value;
1031
- const aggregateOpts = computeAggregateOpts.value;
1032
1038
  const {
1033
- placement: aggPlacement
1034
- } = aggregateOpts;
1035
- const {
1036
- mode,
1037
1039
  immediate,
1038
1040
  showSortDragButton,
1039
1041
  showSortMoveButton,
1040
1042
  showSortPutButton,
1041
- modalOptions,
1042
- drawerOptions,
1043
1043
  allowVisible,
1044
1044
  allowSort,
1045
1045
  allowFixed,
1046
+ allowAlign,
1047
+ allowHeaderAlign,
1048
+ allowFooterAlign,
1046
1049
  allowResizable,
1047
1050
  allowGroup,
1048
1051
  allowValues,
@@ -1050,40 +1053,17 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1050
1053
  visibleMethod
1051
1054
  } = customOpts;
1052
1055
  const columnOpts = computeColumnOpts.value;
1053
- const {
1054
- maxFixedSize
1055
- } = columnOpts;
1056
1056
  const resizableOpts = computeResizableOpts.value;
1057
1057
  const {
1058
1058
  minWidth: reMinWidth,
1059
1059
  maxWidth: reMaxWidth
1060
1060
  } = resizableOpts;
1061
- const modalOpts = Object.assign({}, modalOptions);
1062
- const drawerOpts = Object.assign({}, drawerOptions);
1063
1061
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
1064
1062
  const {
1065
1063
  isCrossDrag,
1066
1064
  isPeerDrag
1067
1065
  } = columnDragOpts;
1068
- const slots = customOpts.slots || {};
1069
- const headerSlot = slots.header;
1070
- const topSlot = slots.top;
1071
- const bottomSlot = slots.bottom;
1072
- const defaultSlot = slots.default;
1073
- const footerSlot = slots.footer;
1074
1066
  const trVNs = [];
1075
- const isAllChecked = customStore.isAll;
1076
- const isAllIndeterminate = customStore.isIndeterminate;
1077
- const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
1078
- const params = {
1079
- $table: $xeTable,
1080
- $grid: $xeGrid,
1081
- $gantt: $xeGantt,
1082
- columns: customColumnList,
1083
- isAllChecked,
1084
- isAllIndeterminate,
1085
- isCustomStatus
1086
- };
1087
1067
  _xeUtils.default.eachTree(customColumnList, (column, index, items, path, parentItem) => {
1088
1068
  const isVisible = visibleMethod ? visibleMethod({
1089
1069
  $table: $xeTable,
@@ -1121,33 +1101,46 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1121
1101
  }) : false;
1122
1102
  const isHidden = !isChecked;
1123
1103
  const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
1124
- trVNs.push((0, _vue.h)('tr', {
1125
- key: column.id,
1126
- colid: column.id,
1127
- class: [`vxe-table-custom-popup--row level--${column.level}`, {
1128
- 'is--group': isColGroup
1129
- }],
1130
- onDragstart: sortDragstartEvent,
1131
- onDragend: sortDragendEvent,
1132
- onDragover: sortDragoverEvent
1133
- }, [allowVisible ? (0, _vue.h)('td', {
1134
- class: 'vxe-table-custom-popup--column-item col--visible'
1135
- }, [(0, _vue.h)('div', {
1136
- class: ['vxe-table-custom--checkbox-option', {
1137
- 'is--checked': isChecked,
1138
- 'is--indeterminate': isIndeterminate,
1139
- 'is--disabled': isDisabled
1140
- }],
1141
- title: getI18n('vxe.custom.setting.colVisible'),
1142
- onClick: evnt => {
1143
- if (!isDisabled) {
1144
- 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
+ }
1145
1136
  }
1146
- }
1147
- }, [(0, _vue.h)('span', {
1148
- class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1149
- })])]) : renderEmptyElement($xeTable), (0, _vue.h)('td', {
1150
- 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'
1151
1144
  }, [(0, _vue.h)('div', {
1152
1145
  class: 'vxe-table-custom-popup--name'
1153
1146
  }, [allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0, _vue.h)('div', Object.assign({
@@ -1174,7 +1167,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1174
1167
  class: 'vxe-table-custom-popup--move-btn'
1175
1168
  }, VxeUIButtonComponent ? [showSortMoveButton ? (0, _vue.h)(VxeUIButtonComponent, {
1176
1169
  mode: 'text',
1177
- content: getI18n('vxe.custom.setting.moveUp'),
1170
+ icon: 'vxe-icon-arrows-up',
1178
1171
  title: getI18n('vxe.custom.setting.moveUpTitle'),
1179
1172
  disabled: index <= 0,
1180
1173
  onClick(evntParame) {
@@ -1182,7 +1175,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1182
1175
  }
1183
1176
  }) : renderEmptyElement($xeTable), showSortMoveButton ? (0, _vue.h)(VxeUIButtonComponent, {
1184
1177
  mode: 'text',
1185
- content: getI18n('vxe.custom.setting.moveDn'),
1178
+ icon: 'vxe-icon-arrows-down',
1186
1179
  title: getI18n('vxe.custom.setting.moveDnTitle'),
1187
1180
  disabled: index >= items.length - 1,
1188
1181
  onClick(evntParame) {
@@ -1190,7 +1183,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1190
1183
  }
1191
1184
  }) : renderEmptyElement($xeTable), showSortPutButton && !parentItem ? (0, _vue.h)(VxeUIButtonComponent, {
1192
1185
  mode: 'text',
1193
- content: getI18n('vxe.custom.setting.putTop'),
1186
+ icon: 'vxe-icon-top',
1194
1187
  title: getI18n('vxe.custom.setting.putTopTitle'),
1195
1188
  disabled: index <= 0,
1196
1189
  onClick(evntParame) {
@@ -1198,62 +1191,278 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1198
1191
  }
1199
1192
  }) : renderEmptyElement($xeTable), showSortPutButton && !parentItem ? (0, _vue.h)(VxeUIButtonComponent, {
1200
1193
  mode: 'text',
1201
- content: getI18n('vxe.custom.setting.putBottom'),
1194
+ icon: 'vxe-icon-bottom',
1202
1195
  title: getI18n('vxe.custom.setting.putBottomTitle'),
1203
1196
  disabled: index >= items.length - 1,
1204
1197
  onClick(evntParame) {
1205
1198
  sortMoveBottomEvent(evntParame, column);
1206
1199
  }
1207
- }) : renderEmptyElement($xeTable)] : []) : renderEmptyElement($xeTable)])]), allowResizable ? (0, _vue.h)('td', {
1208
- class: 'vxe-table-custom-popup--column-item col--resizable'
1209
- }, [column.children && column.children.length || !(_xeUtils.default.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? (0, _vue.h)('span', '-') : VxeUINumberInputComponent ? (0, _vue.h)(VxeUINumberInputComponent, {
1210
- type: 'integer',
1211
- immediate: false,
1212
- disabled: isHidden,
1213
- modelValue: column.renderResizeWidth,
1214
- min: customMinWidth || undefined,
1215
- max: customMaxWidth || undefined,
1216
- 'onUpdate:modelValue'(value) {
1217
- const width = Math.max(0, Number(value));
1218
- column.renderResizeWidth = width;
1219
- },
1220
- onChange() {
1221
- changeColumnWidth(column);
1222
- }
1223
- }) : renderEmptyElement($xeTable)]) : renderEmptyElement($xeTable), allowFixed ? (0, _vue.h)('td', {
1224
- class: 'vxe-table-custom-popup--column-item col--fixed'
1225
- }, [parentItem ? (0, _vue.h)('span', '-') : VxeUIRadioGroupComponent ? (0, _vue.h)(VxeUIRadioGroupComponent, {
1226
- modelValue: column.renderFixed || '',
1227
- type: 'button',
1228
- size: 'mini',
1229
- disabled: isHidden,
1230
- options: [{
1231
- label: getI18n('vxe.custom.setting.fixedLeft'),
1232
- value: 'left',
1233
- disabled: isHidden || isMaxFixedColumn
1234
- }, {
1235
- label: getI18n('vxe.custom.setting.fixedUnset'),
1236
- value: '',
1237
- disabled: isHidden
1238
- }, {
1239
- label: getI18n('vxe.custom.setting.fixedRight'),
1240
- value: 'right',
1241
- 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
1242
1306
  }],
1243
- onChange({
1244
- label,
1245
- $event
1246
- }) {
1247
- changeFixedOption(column, label, $event);
1248
- }
1249
- }) : renderEmptyElement($xeTable)]) : renderEmptyElement($xeTable)]));
1307
+ onDragstart: sortDragstartEvent,
1308
+ onDragend: sortDragendEvent,
1309
+ onDragover: sortDragoverEvent
1310
+ }, tdVNs));
1250
1311
  }
1251
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
+ }
1252
1458
  const scopedSlots = {
1253
1459
  default: () => {
1254
1460
  return (0, _vue.h)('div', {
1255
1461
  ref: refBodyWrapperElem,
1256
- 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
1257
1466
  }, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [!isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, _vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
1258
1467
  customStore
1259
1468
  }) : renderEmptyElement($xeTable), (0, _vue.h)('div', {
@@ -1263,31 +1472,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1263
1472
  class: 'vxe-table-custom-popup--table-top'
1264
1473
  }, $xeTable.callSlot(topSlot, params)) : renderEmptyElement($xeTable), (0, _vue.h)('div', {
1265
1474
  class: 'vxe-table-custom-popup--table-wrapper'
1266
- }, [(0, _vue.h)('table', {}, [(0, _vue.h)('colgroup', {}, [allowVisible ? (0, _vue.h)('col', {
1267
- class: 'vxe-table-custom-popup--table-col-seq'
1268
- }) : renderEmptyElement($xeTable), (0, _vue.h)('col', {
1269
- class: 'vxe-table-custom-popup--table-col-title'
1270
- }), allowResizable ? (0, _vue.h)('col', {
1271
- class: 'vxe-table-custom-popup--table-col-width'
1272
- }) : renderEmptyElement($xeTable), allowFixed ? (0, _vue.h)('col', {
1273
- class: 'vxe-table-custom-popup--table-col-fixed'
1274
- }) : renderEmptyElement($xeTable)]), (0, _vue.h)('thead', {}, [(0, _vue.h)('tr', {}, [allowVisible ? (0, _vue.h)('th', {}, [(0, _vue.h)('div', {
1275
- class: ['vxe-table-custom--checkbox-option', {
1276
- 'is--checked': isAllChecked,
1277
- 'is--indeterminate': isAllIndeterminate
1278
- }],
1279
- title: getI18n('vxe.table.allTitle'),
1280
- onClick: allOptionEvent
1281
- }, [(0, _vue.h)('span', {
1282
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1283
- }), (0, _vue.h)('span', {
1284
- class: 'vxe-checkbox--label'
1285
- }, 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, {
1286
1476
  class: 'vxe-table-custom--panel-list',
1287
1477
  tag: 'tbody',
1288
1478
  name: 'vxe-table-custom--list'
1289
1479
  }, {
1290
- default: () => trVNs
1480
+ default: () => renderPopupBodys()
1291
1481
  })])]), bottomSlot ? (0, _vue.h)('div', {
1292
1482
  class: 'vxe-table-custom-popup--table-bottom'
1293
1483
  }, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable), renderDragTip()]), isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, _vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
@@ -1305,6 +1495,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1305
1495
  disabled: !isCustomStatus,
1306
1496
  onClick: resetCustomEvent
1307
1497
  }) : renderEmptyElement($xeTable), immediate ? VxeUIButtonComponent ? (0, _vue.h)(VxeUIButtonComponent, {
1498
+ status: 'primary',
1308
1499
  content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
1309
1500
  onClick: cancelCloseEvent
1310
1501
  }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, _vue.h)(VxeUIButtonComponent, {
@@ -1343,8 +1534,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1343
1534
  className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
1344
1535
  modelValue: customStore.visible,
1345
1536
  title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
1346
- width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
1347
- minWidth: modalOpts.minWidth || 700,
1537
+ width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
1538
+ minWidth: modalOpts.minWidth || 800,
1348
1539
  height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
1349
1540
  minHeight: modalOpts.minHeight || 400,
1350
1541
  showZoom: modalOpts.showZoom,
@@ -1353,6 +1544,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1353
1544
  mask: modalOpts.mask,
1354
1545
  lockView: modalOpts.lockView,
1355
1546
  resize: modalOpts.resize,
1547
+ transfer: modalOpts.transfer,
1356
1548
  escClosable: !!modalOpts.escClosable,
1357
1549
  maskClosable: !!modalOpts.maskClosable,
1358
1550
  destroyOnClose: true,