vxe-table 4.6.5 → 4.6.6

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 (149) hide show
  1. package/es/button/style.css +6 -6
  2. package/es/checkbox/src/group.js +7 -1
  3. package/es/custom/src/hook.js +1 -0
  4. package/es/custom/src/panel.js +207 -45
  5. package/es/custom/style.css +326 -80
  6. package/es/export/src/export-panel.js +1 -1
  7. package/es/export/src/import-panel.js +1 -1
  8. package/es/icon/style.css +1 -1
  9. package/es/input/style.css +0 -1
  10. package/es/loading/src/loading.js +1 -1
  11. package/es/loading/style.css +1 -1
  12. package/es/locale/lang/en-US.js +18 -7
  13. package/es/locale/lang/es-ES.js +18 -7
  14. package/es/locale/lang/ja-JP.js +18 -6
  15. package/es/locale/lang/pt-BR.js +18 -7
  16. package/es/locale/lang/zh-CN.js +18 -7
  17. package/es/locale/lang/zh-TC.js +18 -7
  18. package/es/modal/src/modal.js +1 -1
  19. package/es/radio/src/group.js +7 -1
  20. package/es/style.css +1 -1
  21. package/es/style.min.css +1 -1
  22. package/es/table/src/columnInfo.js +3 -3
  23. package/es/table/src/table.js +60 -36
  24. package/es/table/style.css +4 -4
  25. package/es/tools/log.js +1 -1
  26. package/es/v-x-e-table/index.js +1 -1
  27. package/es/v-x-e-table/style.css +1 -1
  28. package/es/vxe-button/style.css +6 -6
  29. package/es/vxe-input/style.css +0 -1
  30. package/es/vxe-loading/style.css +1 -1
  31. package/es/vxe-table/style.css +4 -4
  32. package/es/vxe-table-custom-module/style.css +326 -80
  33. package/lib/button/style/style.css +6 -6
  34. package/lib/button/style/style.min.css +1 -1
  35. package/lib/checkbox/src/group.js +7 -1
  36. package/lib/checkbox/src/group.min.js +1 -1
  37. package/lib/custom/src/hook.js +1 -0
  38. package/lib/custom/src/hook.min.js +1 -1
  39. package/lib/custom/src/panel.js +185 -30
  40. package/lib/custom/src/panel.min.js +1 -1
  41. package/lib/custom/style/style.css +326 -80
  42. package/lib/custom/style/style.min.css +1 -1
  43. package/lib/export/src/export-panel.js +1 -1
  44. package/lib/export/src/export-panel.min.js +1 -1
  45. package/lib/export/src/import-panel.js +1 -1
  46. package/lib/export/src/import-panel.min.js +1 -1
  47. package/lib/icon/style/style.css +1 -1
  48. package/lib/icon/style/style.min.css +1 -1
  49. package/lib/index.umd.js +288 -84
  50. package/lib/index.umd.min.js +1 -1
  51. package/lib/input/style/style.css +0 -1
  52. package/lib/input/style/style.min.css +1 -1
  53. package/lib/loading/src/loading.js +1 -1
  54. package/lib/loading/src/loading.min.js +1 -1
  55. package/lib/loading/style/style.css +1 -1
  56. package/lib/loading/style/style.min.css +1 -1
  57. package/lib/locale/lang/en-US.js +18 -7
  58. package/lib/locale/lang/en-US.min.js +1 -1
  59. package/lib/locale/lang/en-US.umd.js +18 -7
  60. package/lib/locale/lang/es-ES.js +18 -7
  61. package/lib/locale/lang/es-ES.min.js +1 -1
  62. package/lib/locale/lang/es-ES.umd.js +18 -7
  63. package/lib/locale/lang/ja-JP.js +18 -6
  64. package/lib/locale/lang/ja-JP.min.js +1 -1
  65. package/lib/locale/lang/ja-JP.umd.js +18 -6
  66. package/lib/locale/lang/pt-BR.js +18 -7
  67. package/lib/locale/lang/pt-BR.min.js +1 -1
  68. package/lib/locale/lang/pt-BR.umd.js +18 -7
  69. package/lib/locale/lang/zh-CN.js +18 -7
  70. package/lib/locale/lang/zh-CN.min.js +1 -1
  71. package/lib/locale/lang/zh-CN.umd.js +18 -7
  72. package/lib/locale/lang/zh-HK.min.js +1 -1
  73. package/lib/locale/lang/zh-HK.umd.js +18 -7
  74. package/lib/locale/lang/zh-MO.min.js +1 -1
  75. package/lib/locale/lang/zh-MO.umd.js +18 -7
  76. package/lib/locale/lang/zh-TC.js +18 -7
  77. package/lib/locale/lang/zh-TC.min.js +1 -1
  78. package/lib/locale/lang/zh-TC.umd.js +18 -7
  79. package/lib/locale/lang/zh-TW.min.js +1 -1
  80. package/lib/locale/lang/zh-TW.umd.js +18 -7
  81. package/lib/modal/src/modal.js +1 -1
  82. package/lib/modal/src/modal.min.js +1 -1
  83. package/lib/radio/src/group.js +7 -1
  84. package/lib/radio/src/group.min.js +1 -1
  85. package/lib/style.css +1 -1
  86. package/lib/style.min.css +1 -1
  87. package/lib/table/src/columnInfo.js +3 -3
  88. package/lib/table/src/columnInfo.min.js +1 -1
  89. package/lib/table/src/table.js +61 -36
  90. package/lib/table/src/table.min.js +1 -1
  91. package/lib/table/style/style.css +4 -4
  92. package/lib/table/style/style.min.css +1 -1
  93. package/lib/tools/log.js +1 -1
  94. package/lib/tools/log.min.js +1 -1
  95. package/lib/v-x-e-table/index.js +1 -1
  96. package/lib/v-x-e-table/index.min.js +1 -1
  97. package/lib/v-x-e-table/style/style.css +1 -1
  98. package/lib/v-x-e-table/style/style.min.css +1 -1
  99. package/lib/vxe-button/style/style.css +6 -6
  100. package/lib/vxe-button/style/style.min.css +1 -1
  101. package/lib/vxe-input/style/style.css +0 -1
  102. package/lib/vxe-input/style/style.min.css +1 -1
  103. package/lib/vxe-loading/style/style.css +1 -1
  104. package/lib/vxe-loading/style/style.min.css +1 -1
  105. package/lib/vxe-table/style/style.css +4 -4
  106. package/lib/vxe-table/style/style.min.css +1 -1
  107. package/lib/vxe-table-custom-module/style/style.css +326 -80
  108. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  109. package/package.json +1 -1
  110. package/packages/checkbox/src/group.ts +8 -1
  111. package/packages/custom/src/hook.ts +1 -0
  112. package/packages/custom/src/panel.ts +213 -45
  113. package/packages/export/src/export-panel.ts +1 -1
  114. package/packages/export/src/import-panel.ts +1 -1
  115. package/packages/loading/src/loading.ts +1 -1
  116. package/packages/locale/lang/en-US.ts +18 -7
  117. package/packages/locale/lang/es-ES.ts +18 -7
  118. package/packages/locale/lang/ja-JP.ts +18 -6
  119. package/packages/locale/lang/pt-BR.ts +18 -7
  120. package/packages/locale/lang/zh-CN.ts +18 -7
  121. package/packages/locale/lang/zh-TC.ts +18 -7
  122. package/packages/modal/src/modal.ts +1 -1
  123. package/packages/radio/src/group.ts +8 -1
  124. package/packages/table/src/columnInfo.ts +9 -6
  125. package/packages/table/src/table.ts +62 -39
  126. package/packages/table/src/util.ts +1 -1
  127. package/styles/base/common.scss +4 -4
  128. package/styles/button.scss +5 -5
  129. package/styles/custom.scss +192 -86
  130. package/styles/helpers/mixin.scss +1 -1
  131. package/styles/input.scss +1 -2
  132. package/styles/loading.scss +1 -1
  133. package/styles/modal.scss +2 -2
  134. package/styles/select.scss +1 -1
  135. package/styles/table.scss +2 -2
  136. package/types/table.d.ts +32 -22
  137. package/types/v-x-e-table/renderer.d.ts +1 -0
  138. /package/es/icon/style/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  139. /package/es/icon/style/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  140. /package/es/icon/style/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  141. /package/es/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  142. /package/es/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  143. /package/es/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  144. /package/lib/icon/style/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  145. /package/lib/icon/style/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  146. /package/lib/icon/style/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  147. /package/lib/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  148. /package/lib/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  149. /package/lib/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue");const tableCustomMethodKeys=["openCustom","closeCustom"],customHook={setupTable(o){const{reactData:l,internalData:s}=o,u=o.getComputeMaps()["computeCustomOpts"],{refTableHeader:a,refTableBody:i,refTableCustom:r}=o.getRefMaps(),m=o.xegrid,n=()=>{var e=l["customStore"],t=a.value,o=i.value,s=r.value,s=s?s.$el:null,t=t.$el,o=o.$el;let u=0;t&&(u+=t.clientHeight),o&&(u+=o.clientHeight),e.maxHeight=Math.max(0,s?Math.min(s.clientHeight,u-80):0)},c=()=>{var{initStore:e,customStore:t}=l;return t.visible=!0,e.custom=!0,b(),n(),(0,_vue.nextTick)().then(()=>n())},v=()=>{var e=l["customStore"],t=u.value;return e.visible&&(e.visible=!1,t.immediate||o.handleCustom()),(0,_vue.nextTick)()};var e={openCustom:c,closeCustom:v};const b=()=>{var e=l["customStore"],t=s["collectColumn"];const o=u.value["checkMethod"];e.isAll=t.every(e=>!!o&&!o({column:e})||e.visible),e.isIndeterminate=!e.isAll&&t.some(e=>(!o||o({column:e}))&&(e.visible||e.halfVisible))},d=(e,t)=>{(m||o).dispatchEvent("custom",{type:e},t)};var t={checkCustomStatus:b,emitCustomEvent:d,triggerCustomEvent(e){var t=o.reactData["customStore"];t.visible?(v(),d("close",e)):(t.btnEl=e.target,c(),d("open",e))},customOpenEvent(e){var t=l["customStore"];t.visible||(t.activeBtn=!0,t.btnEl=e.target,o.openCustom(),o.emitCustomEvent("open",e))},customColseEvent(e){var t=l["customStore"];t.visible&&(t.activeBtn=!1,o.closeCustom(),o.emitCustomEvent("close",e))}};return{...e,...t}},setupGrid(e){return e.extendTableMethods(tableCustomMethodKeys)}};var _default=exports.default=customHook;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue");const tableCustomMethodKeys=["openCustom","closeCustom"],customHook={setupTable(o){const{reactData:l,internalData:s}=o,u=o.getComputeMaps()["computeCustomOpts"],{refTableHeader:a,refTableBody:i,refTableCustom:r}=o.getRefMaps(),c=o.xegrid,m=()=>{var e=l["customStore"],t=a.value,o=i.value,s=r.value,s=s?s.$el:null,t=t.$el,o=o.$el;let u=0;t&&(u+=t.clientHeight),o&&(u+=o.clientHeight),e.maxHeight=Math.max(0,s?Math.min(s.clientHeight,u-80):0)},n=()=>{var{initStore:e,customStore:t}=l;return t.visible=!0,e.custom=!0,l.customColumnList=s.collectColumn.slice(0),C(),m(),(0,_vue.nextTick)().then(()=>m())},v=()=>{var e=l["customStore"],t=u.value;return e.visible&&(e.visible=!1,t.immediate||o.handleCustom()),(0,_vue.nextTick)()};var e={openCustom:n,closeCustom:v};const C=()=>{var e=l["customStore"],t=s["collectColumn"];const o=u.value["checkMethod"];e.isAll=t.every(e=>!!o&&!o({column:e})||e.visible),e.isIndeterminate=!e.isAll&&t.some(e=>(!o||o({column:e}))&&(e.visible||e.halfVisible))},b=(e,t)=>{(c||o).dispatchEvent("custom",{type:e},t)};var t={checkCustomStatus:C,emitCustomEvent:b,triggerCustomEvent(e){var t=o.reactData["customStore"];t.visible?(v(),b("close",e)):(t.btnEl=e.target,n(),b("open",e))},customOpenEvent(e){var t=l["customStore"];t.visible||(t.activeBtn=!0,t.btnEl=e.target,o.openCustom(),o.emitCustomEvent("open",e))},customColseEvent(e){var t=l["customStore"];t.visible&&(t.activeBtn=!1,o.closeCustom(),o.emitCustomEvent("close",e))}};return{...e,...t}},setupGrid(e){return e.extendTableMethods(tableCustomMethodKeys)}};var _default=exports.default=customHook;
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _vue = require("vue");
8
+ var _vXETable = require("../../v-x-e-table");
8
9
  var _utils = require("../../tools/utils");
10
+ var _dom = require("../../tools/dom");
9
11
  var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
10
12
  var _modal = _interopRequireDefault(require("../../modal/src/modal"));
11
13
  var _button = _interopRequireDefault(require("../../button/src/button"));
@@ -23,13 +25,17 @@ var _default = exports.default = (0, _vue.defineComponent)({
23
25
  setup(props) {
24
26
  const $xetable = (0, _vue.inject)('$xetable', {});
25
27
  const {
26
- internalData
28
+ reactData
27
29
  } = $xetable;
28
30
  const {
29
31
  computeCustomOpts,
30
32
  computeIsMaxFixedColumn
31
33
  } = $xetable.getComputeMaps();
32
34
  const refElem = (0, _vue.ref)();
35
+ const bodyElemRef = (0, _vue.ref)();
36
+ const dragHintElemRef = (0, _vue.ref)();
37
+ const dragColumn = (0, _vue.ref)();
38
+ let prevDropTrEl;
33
39
  const handleWrapperMouseenterEvent = evnt => {
34
40
  const {
35
41
  customStore
@@ -62,13 +68,25 @@ var _default = exports.default = (0, _vue.defineComponent)({
62
68
  $xetable.emitCustomEvent('reset', evnt);
63
69
  };
64
70
  const resetPopupCustomEvent = evnt => {
65
- resetCustomEvent(evnt);
71
+ if (_vXETable.VXETable.modal) {
72
+ _vXETable.VXETable.modal.confirm({
73
+ content: _conf.default.i18n('vxe.custom.cstmConfirmRestore'),
74
+ className: 'vxe-table--ignore-clear',
75
+ escClosable: true
76
+ }).then(type => {
77
+ if (type === 'confirm') {
78
+ resetCustomEvent(evnt);
79
+ }
80
+ });
81
+ } else {
82
+ resetCustomEvent(evnt);
83
+ }
66
84
  };
67
85
  const handleOptionCheck = column => {
68
86
  const {
69
- collectColumn
70
- } = internalData;
71
- const matchObj = _xeUtils.default.findTree(collectColumn, item => item === column);
87
+ customColumnList
88
+ } = reactData;
89
+ const matchObj = _xeUtils.default.findTree(customColumnList, item => item === column);
72
90
  if (matchObj && matchObj.parent) {
73
91
  const {
74
92
  parent
@@ -114,14 +132,14 @@ var _default = exports.default = (0, _vue.defineComponent)({
114
132
  customStore
115
133
  } = props;
116
134
  const {
117
- collectColumn
118
- } = internalData;
135
+ customColumnList
136
+ } = reactData;
119
137
  const customOpts = computeCustomOpts.value;
120
138
  const {
121
139
  checkMethod
122
140
  } = customOpts;
123
141
  const isAll = !customStore.isAll;
124
- _xeUtils.default.eachTree(collectColumn, column => {
142
+ _xeUtils.default.eachTree(customColumnList, column => {
125
143
  if (!checkMethod || checkMethod({
126
144
  column
127
145
  })) {
@@ -132,13 +150,117 @@ var _default = exports.default = (0, _vue.defineComponent)({
132
150
  customStore.isAll = isAll;
133
151
  $xetable.checkCustomStatus();
134
152
  };
153
+ const sortMousedownEvent = evnt => {
154
+ const btnEl = evnt.currentTarget;
155
+ const tdEl = btnEl.parentNode;
156
+ const trEl = tdEl.parentNode;
157
+ const colid = trEl.getAttribute('colid');
158
+ const column = $xetable.getColumnById(colid);
159
+ trEl.draggable = true;
160
+ dragColumn.value = column;
161
+ (0, _dom.addClass)(trEl, 'active--drag-origin');
162
+ };
163
+ const sortMouseupEvent = evnt => {
164
+ const btnEl = evnt.currentTarget;
165
+ const tdEl = btnEl.parentNode;
166
+ const trEl = tdEl.parentNode;
167
+ const dragHintEl = dragHintElemRef.value;
168
+ trEl.draggable = false;
169
+ dragColumn.value = null;
170
+ (0, _dom.removeClass)(trEl, 'active--drag-origin');
171
+ if (dragHintEl) {
172
+ dragHintEl.style.display = '';
173
+ }
174
+ };
175
+ const sortDragstartEvent = evnt => {
176
+ const img = new Image();
177
+ if (evnt.dataTransfer) {
178
+ evnt.dataTransfer.setDragImage(img, 0, 0);
179
+ }
180
+ };
181
+ const sortDragendEvent = evnt => {
182
+ const {
183
+ customColumnList
184
+ } = reactData;
185
+ const trEl = evnt.currentTarget;
186
+ const dragHintEl = dragHintElemRef.value;
187
+ if (prevDropTrEl) {
188
+ // 判断是否有拖动
189
+ if (prevDropTrEl !== trEl) {
190
+ const dragOffset = prevDropTrEl.getAttribute('drag-pos');
191
+ const colid = trEl.getAttribute('colid');
192
+ const column = $xetable.getColumnById(colid);
193
+ if (!column) {
194
+ return;
195
+ }
196
+ const cIndex = _xeUtils.default.findIndexOf(customColumnList, item => item.id === column.id);
197
+ const targetColid = prevDropTrEl.getAttribute('colid');
198
+ const targetColumn = $xetable.getColumnById(targetColid);
199
+ if (!targetColumn) {
200
+ return;
201
+ }
202
+ // 移出源位置
203
+ customColumnList.splice(cIndex, 1);
204
+ const tcIndex = _xeUtils.default.findIndexOf(customColumnList, item => item.id === targetColumn.id);
205
+ // 插新位置
206
+ customColumnList.splice(tcIndex + (dragOffset === 'bottom' ? 1 : 0), 0, column);
207
+ }
208
+ prevDropTrEl.draggable = false;
209
+ prevDropTrEl.removeAttribute('drag-pos');
210
+ (0, _dom.removeClass)(prevDropTrEl, 'active--drag-target');
211
+ }
212
+ dragColumn.value = null;
213
+ trEl.draggable = false;
214
+ trEl.removeAttribute('drag-pos');
215
+ if (dragHintEl) {
216
+ dragHintEl.style.display = '';
217
+ }
218
+ (0, _dom.removeClass)(trEl, 'active--drag-target');
219
+ (0, _dom.removeClass)(trEl, 'active--drag-origin');
220
+ // 更新顺序
221
+ customColumnList.forEach((column, index) => {
222
+ column.renderSortNumber = index;
223
+ });
224
+ };
225
+ const sortDragoverEvent = evnt => {
226
+ const trEl = evnt.currentTarget;
227
+ if (prevDropTrEl !== trEl) {
228
+ (0, _dom.removeClass)(prevDropTrEl, 'active--drag-target');
229
+ }
230
+ const colid = trEl.getAttribute('colid');
231
+ const column = $xetable.getColumnById(colid);
232
+ // 是否移入有效元行
233
+ if (column && column.level === 1) {
234
+ evnt.preventDefault();
235
+ const offsetY = evnt.clientY - trEl.getBoundingClientRect().y;
236
+ const dragOffset = offsetY < trEl.clientHeight / 2 ? 'top' : 'bottom';
237
+ (0, _dom.addClass)(trEl, 'active--drag-target');
238
+ trEl.setAttribute('drag-pos', dragOffset);
239
+ prevDropTrEl = trEl;
240
+ }
241
+ updateDropHint(evnt);
242
+ };
243
+ const updateDropHint = evnt => {
244
+ const dragHintEl = dragHintElemRef.value;
245
+ const bodyEl = bodyElemRef.value;
246
+ if (!bodyEl) {
247
+ return;
248
+ }
249
+ if (dragHintEl) {
250
+ const warpperEl = bodyEl.parentNode;
251
+ const warpperRect = warpperEl.getBoundingClientRect();
252
+ dragHintEl.style.display = 'block';
253
+ dragHintEl.style.top = `${Math.min(warpperEl.clientHeight - warpperEl.scrollTop - dragHintEl.clientHeight, evnt.clientY - warpperRect.y)}px`;
254
+ dragHintEl.style.left = `${Math.min(warpperEl.clientWidth - warpperEl.scrollLeft - dragHintEl.clientWidth - 16, evnt.clientX - warpperRect.x)}px`;
255
+ }
256
+ };
135
257
  const renderSimplePanel = () => {
136
258
  const {
137
259
  customStore
138
260
  } = props;
139
261
  const {
140
- collectColumn
141
- } = internalData;
262
+ customColumnList
263
+ } = reactData;
142
264
  const customOpts = computeCustomOpts.value;
143
265
  const {
144
266
  maxHeight
@@ -156,7 +278,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
156
278
  customWrapperOns.onMouseenter = handleWrapperMouseenterEvent;
157
279
  customWrapperOns.onMouseleave = handleWrapperMouseleaveEvent;
158
280
  }
159
- _xeUtils.default.eachTree(collectColumn, (column, index, items, path, parent) => {
281
+ _xeUtils.default.eachTree(customColumnList, (column, index, items, path, parent) => {
160
282
  const isVisible = visibleMethod ? visibleMethod({
161
283
  column
162
284
  }) : true;
@@ -256,8 +378,8 @@ var _default = exports.default = (0, _vue.defineComponent)({
256
378
  customStore
257
379
  } = props;
258
380
  const {
259
- collectColumn
260
- } = internalData;
381
+ customColumnList
382
+ } = reactData;
261
383
  const customOpts = computeCustomOpts.value;
262
384
  const {
263
385
  checkMethod,
@@ -265,7 +387,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
265
387
  } = customOpts;
266
388
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
267
389
  const trVNs = [];
268
- _xeUtils.default.eachTree(collectColumn, (column, index, items, path, parent) => {
390
+ _xeUtils.default.eachTree(customColumnList, (column, index, items, path, parent) => {
269
391
  const isVisible = visibleMethod ? visibleMethod({
270
392
  column
271
393
  }) : true;
@@ -279,16 +401,28 @@ var _default = exports.default = (0, _vue.defineComponent)({
279
401
  }) : false;
280
402
  trVNs.push((0, _vue.h)('tr', {
281
403
  key: column.id,
282
- class: [`vxe-table-custom-popup--row-level${column.level}`, {
404
+ colid: column.id,
405
+ class: [`vxe-table-custom-popup--row level--${column.level}`, {
283
406
  'is--group': isColGroup
284
- }]
407
+ }],
408
+ onDragstart: sortDragstartEvent,
409
+ onDragend: sortDragendEvent,
410
+ onDragover: sortDragoverEvent
285
411
  }, [(0, _vue.h)('td', {
286
- class: 'vxe-table-custom-popup--column-name'
412
+ class: 'vxe-table-custom-popup--column-item col--sort'
413
+ }, [column.level === 1 ? (0, _vue.h)('span', {
414
+ class: 'vxe-table-custom-popup--column-sort-btn',
415
+ onMousedown: sortMousedownEvent,
416
+ onMouseup: sortMouseupEvent
417
+ }, [(0, _vue.h)('i', {
418
+ class: 'vxe-icon-sort'
419
+ })]) : null]), (0, _vue.h)('td', {
420
+ class: 'vxe-table-custom-popup--column-item col--name'
287
421
  }, [(0, _vue.h)('div', {
288
422
  class: 'vxe-table-custom-popup--name',
289
423
  title: colTitle
290
424
  }, colTitle)]), (0, _vue.h)('td', {
291
- class: 'vxe-table-custom-popup--column-visiblw'
425
+ class: 'vxe-table-custom-popup--column-item col--visible'
292
426
  }, [(0, _vue.h)('div', {
293
427
  class: ['vxe-table-custom--checkbox-option', {
294
428
  'is--checked': isChecked,
@@ -303,21 +437,22 @@ var _default = exports.default = (0, _vue.defineComponent)({
303
437
  }, [(0, _vue.h)('span', {
304
438
  class: ['vxe-checkbox--icon', isIndeterminate ? _conf.default.icon.TABLE_CHECKBOX_INDETERMINATE : isChecked ? _conf.default.icon.TABLE_CHECKBOX_CHECKED : _conf.default.icon.TABLE_CHECKBOX_UNCHECKED]
305
439
  })])]), (0, _vue.h)('td', {
306
- class: 'vxe-table-custom-popup--column-fixed'
440
+ class: 'vxe-table-custom-popup--column-item col--fixed'
307
441
  }, [!parent && customOpts.allowFixed ? (0, _vue.h)(_group.default, {
308
442
  modelValue: column.fixed || '',
309
- disabled: isMaxFixedColumn,
310
443
  type: 'button',
311
444
  size: 'mini',
312
445
  options: [{
313
- label: '左侧',
314
- value: 'left'
446
+ label: _conf.default.i18n('vxe.custom.setting.fixedLeft'),
447
+ value: 'left',
448
+ disabled: isMaxFixedColumn
315
449
  }, {
316
- label: '不固定',
450
+ label: _conf.default.i18n('vxe.custom.setting.fixedUnset'),
317
451
  value: ''
318
452
  }, {
319
- label: '右侧',
320
- value: 'right'
453
+ label: _conf.default.i18n('vxe.custom.setting.fixedRight'),
454
+ value: 'right',
455
+ disabled: isMaxFixedColumn
321
456
  }],
322
457
  'onUpdate:modelValue'(value) {
323
458
  column.fixed = value;
@@ -330,23 +465,34 @@ var _default = exports.default = (0, _vue.defineComponent)({
330
465
  });
331
466
  return (0, _vue.h)(_modal.default, {
332
467
  key: 'popup',
333
- className: 'vxe-table-custom-popup-warpper vxe-table--ignore-clear',
468
+ className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
334
469
  modelValue: customStore.visible,
335
470
  title: _conf.default.i18n('vxe.custom.cstmTitle'),
336
- width: 700,
337
- maxHeight: 500,
471
+ width: '40vw',
472
+ minWidth: 500,
473
+ height: '50vh',
474
+ minHeight: 300,
338
475
  mask: true,
339
476
  lockView: true,
340
477
  showFooter: true,
478
+ resize: true,
341
479
  escClosable: true,
480
+ destroyOnClose: true,
342
481
  'onUpdate:modelValue'(value) {
343
482
  customStore.visible = value;
344
483
  }
345
484
  }, {
346
485
  default: () => {
347
486
  return (0, _vue.h)('div', {
487
+ ref: bodyElemRef,
348
488
  class: 'vxe-table-custom-popup--body'
349
- }, [(0, _vue.h)('table', {}, [(0, _vue.h)('colgroup', {}, [(0, _vue.h)('col'), (0, _vue.h)('col', {
489
+ }, [(0, _vue.h)('div', {
490
+ class: 'vxe-table-custom-popup--table-wrapper'
491
+ }, [(0, _vue.h)('table', {}, [(0, _vue.h)('colgroup', {}, [(0, _vue.h)('col', {
492
+ style: {
493
+ width: '60px'
494
+ }
495
+ }), (0, _vue.h)('col'), (0, _vue.h)('col', {
350
496
  style: {
351
497
  width: '80px'
352
498
  }
@@ -354,7 +500,16 @@ var _default = exports.default = (0, _vue.defineComponent)({
354
500
  style: {
355
501
  width: '200px'
356
502
  }
357
- })]), (0, _vue.h)('thead', {}, [(0, _vue.h)('tr', {}, [(0, _vue.h)('th', {}, '标题'), (0, _vue.h)('th', {}, '是否显示'), (0, _vue.h)('th', {}, '是否固定')])]), (0, _vue.h)('tbody', {}, trVNs)])]);
503
+ })]), (0, _vue.h)('thead', {}, [(0, _vue.h)('tr', {}, [(0, _vue.h)('th', {}, _conf.default.i18n('vxe.custom.setting.colSort')), (0, _vue.h)('th', {}, _conf.default.i18n('vxe.custom.setting.colTitle')), (0, _vue.h)('th', {}, _conf.default.i18n('vxe.custom.setting.colVisible')), (0, _vue.h)('th', {}, _conf.default.i18n('vxe.custom.setting.colFixed'))])]), (0, _vue.h)(_vue.TransitionGroup, {
504
+ class: 'vxe-table-custom--body',
505
+ tag: 'tbody',
506
+ name: 'vxe-table-custom--flip'
507
+ }, {
508
+ default: () => trVNs
509
+ })])]), (0, _vue.h)('div', {
510
+ ref: dragHintElemRef,
511
+ class: 'vxe-table-custom-popup--drag-hint'
512
+ }, _conf.default.i18n('vxe.custom.cstmDragTarget', [dragColumn.value ? dragColumn.value.getTitle() : '']))]);
358
513
  },
359
514
  footer: () => {
360
515
  return (0, _vue.h)('div', {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_utils=require("../../tools/utils"),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_modal=_interopRequireDefault(require("../../modal/src/modal")),_button=_interopRequireDefault(require("../../button/src/button")),_group=_interopRequireDefault(require("../../radio/src/group")),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxeTableCustomPanel",props:{customStore:{type:Object,default:()=>({})}},setup(s){const i=(0,_vue.inject)("$xetable",{}),a=i["internalData"],{computeCustomOpts:n,computeIsMaxFixedColumn:C}=i.getComputeMaps(),E=(0,_vue.ref)(),T=e=>{var t=s["customStore"];t.activeWrapper=!0,i.customOpenEvent(e)},k=e=>{const t=s["customStore"];t.activeWrapper=!1,setTimeout(()=>{t.activeBtn||t.activeWrapper||i.customColseEvent(e)},300)},O=e=>{i.closeCustom(),i.emitCustomEvent("confirm",e)},B=e=>{i.closeCustom(),i.emitCustomEvent("cancel",e)},g=e=>{i.resetColumn(!0),i.closeCustom(),i.emitCustomEvent("reset",e)},A=e=>{g(e)},o=t=>{var e=a["collectColumn"],e=_xeUtils.default.findTree(e,e=>e===t);e&&e.parent&&(e=e["parent"],e.children)&&e.children.length&&(e.visible=e.children.every(e=>e.visible),e.halfVisible=!e.visible&&e.children.some(e=>e.visible||e.halfVisible),o(e))},D=e=>{const t=!e.visible;var l=n.value;_xeUtils.default.eachTree([e],e=>{e.visible=t,e.halfVisible=!1}),o(e),l.immediate&&i.handleCustom(),i.checkCustomStatus()},H=(e,t)=>{var l=C.value;e.fixed===t?i.clearColumnFixed(e):l&&!e.fixed||i.setColumnFixed(e,t)},L=e=>{C.value||i.setColumnFixed(e,e.fixed)},R=()=>{var e=s["customStore"],t=a["collectColumn"];const l=n.value["checkMethod"],o=!e.isAll;_xeUtils.default.eachTree(t,e=>{l&&!l({column:e})||(e.visible=o,e.halfVisible=!1)}),e.isAll=o,i.checkCustomStatus()};return()=>{if("popup"===n.value.mode){const u=s["customStore"];var e=a["collectColumn"];const v=n.value,{checkMethod:r,visibleMethod:d}=v,_=C.value,f=[];return _xeUtils.default.eachTree(e,(t,e,l,o,i)=>{if(!d||d({column:t})){var u=t.visible,c=t.halfVisible,s=(0,_utils.formatText)(t.getTitle(),1),a=t.children&&t.children.length;const n=!!r&&!r({column:t});f.push((0,_vue.h)("tr",{key:t.id,class:["vxe-table-custom-popup--row-level"+t.level,{"is--group":a}]},[(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-name"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--name",title:s},s)]),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-visiblw"},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":u,"is--indeterminate":c,"is--disabled":n}],onClick:()=>{n||D(t)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",c?_conf.default.icon.TABLE_CHECKBOX_INDETERMINATE:u?_conf.default.icon.TABLE_CHECKBOX_CHECKED:_conf.default.icon.TABLE_CHECKBOX_UNCHECKED]})])]),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-fixed"},[!i&&v.allowFixed?(0,_vue.h)(_group.default,{modelValue:t.fixed||"",disabled:_,type:"button",size:"mini",options:[{label:"左侧",value:"left"},{label:"不固定",value:""},{label:"右侧",value:"right"}],"onUpdate:modelValue"(e){t.fixed=e},onChange(){L(t)}}):null])]))}}),(0,_vue.h)(_modal.default,{key:"popup",className:"vxe-table-custom-popup-warpper vxe-table--ignore-clear",modelValue:u.visible,title:_conf.default.i18n("vxe.custom.cstmTitle"),width:700,maxHeight:500,mask:!0,lockView:!0,showFooter:!0,escClosable:!0,"onUpdate:modelValue"(e){u.visible=e}},{default:()=>(0,_vue.h)("div",{class:"vxe-table-custom-popup--body"},[(0,_vue.h)("table",{},[(0,_vue.h)("colgroup",{},[(0,_vue.h)("col"),(0,_vue.h)("col",{style:{width:"80px"}}),(0,_vue.h)("col",{style:{width:"200px"}})]),(0,_vue.h)("thead",{},[(0,_vue.h)("tr",{},[(0,_vue.h)("th",{},"标题"),(0,_vue.h)("th",{},"是否显示"),(0,_vue.h)("th",{},"是否固定")])]),(0,_vue.h)("tbody",{},f)])]),footer:()=>(0,_vue.h)("div",{class:"vxe-table-custom-popup--footer"},[(0,_vue.h)(_button.default,{content:v.resetButtonText||_conf.default.i18n("vxe.custom.cstmRestore"),onClick:A}),(0,_vue.h)(_button.default,{content:v.resetButtonText||_conf.default.i18n("vxe.custom.cstmCancel"),onClick:B}),(0,_vue.h)(_button.default,{status:"primary",content:v.confirmButtonText||_conf.default.i18n("vxe.custom.cstmConfirm"),onClick:O})])})}{var e=s["customStore"],t=a["collectColumn"];const h=n.value;var l=e["maxHeight"];const{checkMethod:m,visibleMethod:x,trigger:c}=h,p=C.value,b=[];var o={},t=("hover"===c&&(o.onMouseenter=T,o.onMouseleave=k),_xeUtils.default.eachTree(t,(e,t,l,o,i)=>{if(!x||x({column:e})){var u=e.visible,c=e.halfVisible,s=e.children&&e.children.length,a=(0,_utils.formatText)(e.getTitle(),1);const n=!!m&&!m({column:e});b.push((0,_vue.h)("li",{key:e.id,class:["vxe-table-custom--option","level--"+e.level,{"is--group":s}]},[(0,_vue.h)("div",{title:a,class:["vxe-table-custom--checkbox-option",{"is--checked":u,"is--indeterminate":c,"is--disabled":n}],onClick:()=>{n||D(e)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",c?_conf.default.icon.TABLE_CHECKBOX_INDETERMINATE:u?_conf.default.icon.TABLE_CHECKBOX_CHECKED:_conf.default.icon.TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},a)]),!i&&h.allowFixed?(0,_vue.h)("div",{class:"vxe-table-custom--fixed-option"},[(0,_vue.h)("span",{class:["vxe-table-custom--fixed-left-option","left"===e.fixed?_conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED:_conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT,{"is--checked":"left"===e.fixed,"is--disabled":p&&!e.fixed}],title:_conf.default.i18n("left"===e.fixed?"vxe.toolbar.cancelfixed":"vxe.toolbar.fixedLeft"),onClick:()=>{H(e,"left")}}),(0,_vue.h)("span",{class:["vxe-table-custom--fixed-right-option","right"===e.fixed?_conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED:_conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT,{"is--checked":"right"===e.fixed,"is--disabled":p&&!e.fixed}],title:_conf.default.i18n("right"===e.fixed?"vxe.toolbar.cancelfixed":"vxe.toolbar.fixedRight"),onClick:()=>{H(e,"right")}})]):null]))}}),e.isAll),i=e.isIndeterminate;return(0,_vue.h)("div",{ref:E,key:"simple",class:["vxe-table-custom-wrapper",{"is--active":e.visible}]},[(0,_vue.h)("ul",{class:"vxe-table-custom--header"},[(0,_vue.h)("li",{class:"vxe-table-custom--option"},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":t,"is--indeterminate":i}],title:_conf.default.i18n("vxe.table.allTitle"),onClick:R},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",i?_conf.default.icon.TABLE_CHECKBOX_INDETERMINATE:t?_conf.default.icon.TABLE_CHECKBOX_CHECKED:_conf.default.icon.TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},_conf.default.i18n("vxe.toolbar.customAll"))])])]),(0,_vue.h)("ul",{class:"vxe-table-custom--body",style:l?{maxHeight:l+"px"}:{},...o},b),h.showFooter?(0,_vue.h)("div",{class:"vxe-table-custom--footer"},[(0,_vue.h)("button",{class:"btn--reset",onClick:g},h.resetButtonText||_conf.default.i18n("vxe.toolbar.customRestore")),(0,_vue.h)("button",{class:"btn--confirm",onClick:O},h.confirmButtonText||_conf.default.i18n("vxe.toolbar.customConfirm"))]):null]);return}}}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_vXETable=require("../../v-x-e-table"),_utils=require("../../tools/utils"),_dom=require("../../tools/dom"),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_modal=_interopRequireDefault(require("../../modal/src/modal")),_button=_interopRequireDefault(require("../../button/src/button")),_group=_interopRequireDefault(require("../../radio/src/group")),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxeTableCustomPanel",props:{customStore:{type:Object,default:()=>({})}},setup(s){const c=(0,_vue.inject)("$xetable",{}),n=c["reactData"],{computeCustomOpts:g,computeIsMaxFixedColumn:C}=c.getComputeMaps(),T=(0,_vue.ref)(),E=(0,_vue.ref)(),k=(0,_vue.ref)(),B=(0,_vue.ref)();let r;const y=e=>{var t=s["customStore"];t.activeWrapper=!0,c.customOpenEvent(e)},O=e=>{const t=s["customStore"];t.activeWrapper=!1,setTimeout(()=>{t.activeBtn||t.activeWrapper||c.customColseEvent(e)},300)},A=e=>{c.closeCustom(),c.emitCustomEvent("confirm",e)},D=e=>{c.closeCustom(),c.emitCustomEvent("cancel",e)},L=e=>{c.resetColumn(!0),c.closeCustom(),c.emitCustomEvent("reset",e)},I=t=>{_vXETable.VXETable.modal?_vXETable.VXETable.modal.confirm({content:_conf.default.i18n("vxe.custom.cstmConfirmRestore"),className:"vxe-table--ignore-clear",escClosable:!0}).then(e=>{"confirm"===e&&L(t)}):L(t)},o=t=>{var e=n["customColumnList"],e=_xeUtils.default.findTree(e,e=>e===t);e&&e.parent&&(e=e["parent"],e.children)&&e.children.length&&(e.visible=e.children.every(e=>e.visible),e.halfVisible=!e.visible&&e.children.some(e=>e.visible||e.halfVisible),o(e))},H=e=>{const t=!e.visible;var l=g.value;_xeUtils.default.eachTree([e],e=>{e.visible=t,e.halfVisible=!1}),o(e),l.immediate&&c.handleCustom(),c.checkCustomStatus()},R=(e,t)=>{var l=C.value;e.fixed===t?c.clearColumnFixed(e):l&&!e.fixed||c.setColumnFixed(e,t)},X=e=>{C.value||c.setColumnFixed(e,e.fixed)},M=()=>{var e=s["customStore"],t=n["customColumnList"];const l=g.value["checkMethod"],o=!e.isAll;_xeUtils.default.eachTree(t,e=>{l&&!l({column:e})||(e.visible=o,e.halfVisible=!1)}),e.isAll=o,c.checkCustomStatus()},N=e=>{var e=e.currentTarget.parentNode.parentNode,t=e.getAttribute("colid"),t=c.getColumnById(t);e.draggable=!0,B.value=t,(0,_dom.addClass)(e,"active--drag-origin")},V=e=>{var e=e.currentTarget.parentNode.parentNode,t=k.value;e.draggable=!1,(B.value=null,_dom.removeClass)(e,"active--drag-origin"),t&&(t.style.display="")},w=e=>{var t=new Image;e.dataTransfer&&e.dataTransfer.setDragImage(t,0,0)},q=e=>{var t=n["customColumnList"],e=e.currentTarget,l=k.value;if(r){if(r!==e){var o=r.getAttribute("drag-pos"),i=e.getAttribute("colid");const u=c.getColumnById(i);if(!u)return;var i=_xeUtils.default.findIndexOf(t,e=>e.id===u.id),a=r.getAttribute("colid");const s=c.getColumnById(a);if(!s)return;t.splice(i,1);a=_xeUtils.default.findIndexOf(t,e=>e.id===s.id);t.splice(a+("bottom"===o?1:0),0,u)}r.draggable=!1,r.removeAttribute("drag-pos"),(0,_dom.removeClass)(r,"active--drag-target")}B.value=null,e.draggable=!1,e.removeAttribute("drag-pos"),l&&(l.style.display=""),(0,_dom.removeClass)(e,"active--drag-target"),(0,_dom.removeClass)(e,"active--drag-origin"),t.forEach((e,t)=>{e.renderSortNumber=t})},F=e=>{var t=e.currentTarget,l=(r!==t&&(0,_dom.removeClass)(r,"active--drag-target"),t.getAttribute("colid")),l=c.getColumnById(l);l&&1===l.level&&(e.preventDefault(),l=e.clientY-t.getBoundingClientRect().y<t.clientHeight/2?"top":"bottom",(0,_dom.addClass)(t,"active--drag-target"),t.setAttribute("drag-pos",l),r=t);{l=e;var o=k.value,i=E.value;i&&o&&(e=(t=i.parentNode).getBoundingClientRect(),o.style.display="block",o.style.top=Math.min(t.clientHeight-t.scrollTop-o.clientHeight,l.clientY-e.y)+"px",o.style.left=Math.min(t.clientWidth-t.scrollLeft-o.clientWidth-16,l.clientX-e.x)+"px")}};return()=>{if("popup"===g.value.mode){const a=s["customStore"];var e=n["customColumnList"];const r=g.value,{checkMethod:d,visibleMethod:v}=r,m=C.value,f=[];return _xeUtils.default.eachTree(e,(t,e,l,o,i)=>{if(!v||v({column:t})){var a=t.visible,u=t.halfVisible,s=(0,_utils.formatText)(t.getTitle(),1),c=t.children&&t.children.length;const n=!!d&&!d({column:t});f.push((0,_vue.h)("tr",{key:t.id,colid:t.id,class:["vxe-table-custom-popup--row level--"+t.level,{"is--group":c}],onDragstart:w,onDragend:q,onDragover:F},[(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--sort"},[1===t.level?(0,_vue.h)("span",{class:"vxe-table-custom-popup--column-sort-btn",onMousedown:N,onMouseup:V},[(0,_vue.h)("i",{class:"vxe-icon-sort"})]):null]),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--name"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--name",title:s},s)]),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--visible"},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":a,"is--indeterminate":u,"is--disabled":n}],onClick:()=>{n||H(t)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",u?_conf.default.icon.TABLE_CHECKBOX_INDETERMINATE:a?_conf.default.icon.TABLE_CHECKBOX_CHECKED:_conf.default.icon.TABLE_CHECKBOX_UNCHECKED]})])]),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--fixed"},[!i&&r.allowFixed?(0,_vue.h)(_group.default,{modelValue:t.fixed||"",type:"button",size:"mini",options:[{label:_conf.default.i18n("vxe.custom.setting.fixedLeft"),value:"left",disabled:m},{label:_conf.default.i18n("vxe.custom.setting.fixedUnset"),value:""},{label:_conf.default.i18n("vxe.custom.setting.fixedRight"),value:"right",disabled:m}],"onUpdate:modelValue"(e){t.fixed=e},onChange(){X(t)}}):null])]))}}),(0,_vue.h)(_modal.default,{key:"popup",className:"vxe-table-custom-popup-wrapper vxe-table--ignore-clear",modelValue:a.visible,title:_conf.default.i18n("vxe.custom.cstmTitle"),width:"40vw",minWidth:500,height:"50vh",minHeight:300,mask:!0,lockView:!0,showFooter:!0,resize:!0,escClosable:!0,destroyOnClose:!0,"onUpdate:modelValue"(e){a.visible=e}},{default:()=>(0,_vue.h)("div",{ref:E,class:"vxe-table-custom-popup--body"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-wrapper"},[(0,_vue.h)("table",{},[(0,_vue.h)("colgroup",{},[(0,_vue.h)("col",{style:{width:"60px"}}),(0,_vue.h)("col"),(0,_vue.h)("col",{style:{width:"80px"}}),(0,_vue.h)("col",{style:{width:"200px"}})]),(0,_vue.h)("thead",{},[(0,_vue.h)("tr",{},[(0,_vue.h)("th",{},_conf.default.i18n("vxe.custom.setting.colSort")),(0,_vue.h)("th",{},_conf.default.i18n("vxe.custom.setting.colTitle")),(0,_vue.h)("th",{},_conf.default.i18n("vxe.custom.setting.colVisible")),(0,_vue.h)("th",{},_conf.default.i18n("vxe.custom.setting.colFixed"))])]),(0,_vue.h)(_vue.TransitionGroup,{class:"vxe-table-custom--body",tag:"tbody",name:"vxe-table-custom--flip"},{default:()=>f})])]),(0,_vue.h)("div",{ref:k,class:"vxe-table-custom-popup--drag-hint"},_conf.default.i18n("vxe.custom.cstmDragTarget",[B.value?B.value.getTitle():""]))]),footer:()=>(0,_vue.h)("div",{class:"vxe-table-custom-popup--footer"},[(0,_vue.h)(_button.default,{content:r.resetButtonText||_conf.default.i18n("vxe.custom.cstmRestore"),onClick:I}),(0,_vue.h)(_button.default,{content:r.resetButtonText||_conf.default.i18n("vxe.custom.cstmCancel"),onClick:D}),(0,_vue.h)(_button.default,{status:"primary",content:r.confirmButtonText||_conf.default.i18n("vxe.custom.cstmConfirm"),onClick:A})])})}{var e=s["customStore"],t=n["customColumnList"];const _=g.value;var l=e["maxHeight"];const{checkMethod:h,visibleMethod:p,trigger:u}=_,x=C.value,b=[];var o={},t=("hover"===u&&(o.onMouseenter=y,o.onMouseleave=O),_xeUtils.default.eachTree(t,(e,t,l,o,i)=>{if(!p||p({column:e})){var a=e.visible,u=e.halfVisible,s=e.children&&e.children.length,c=(0,_utils.formatText)(e.getTitle(),1);const n=!!h&&!h({column:e});b.push((0,_vue.h)("li",{key:e.id,class:["vxe-table-custom--option","level--"+e.level,{"is--group":s}]},[(0,_vue.h)("div",{title:c,class:["vxe-table-custom--checkbox-option",{"is--checked":a,"is--indeterminate":u,"is--disabled":n}],onClick:()=>{n||H(e)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",u?_conf.default.icon.TABLE_CHECKBOX_INDETERMINATE:a?_conf.default.icon.TABLE_CHECKBOX_CHECKED:_conf.default.icon.TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},c)]),!i&&_.allowFixed?(0,_vue.h)("div",{class:"vxe-table-custom--fixed-option"},[(0,_vue.h)("span",{class:["vxe-table-custom--fixed-left-option","left"===e.fixed?_conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED:_conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT,{"is--checked":"left"===e.fixed,"is--disabled":x&&!e.fixed}],title:_conf.default.i18n("left"===e.fixed?"vxe.toolbar.cancelfixed":"vxe.toolbar.fixedLeft"),onClick:()=>{R(e,"left")}}),(0,_vue.h)("span",{class:["vxe-table-custom--fixed-right-option","right"===e.fixed?_conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED:_conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT,{"is--checked":"right"===e.fixed,"is--disabled":x&&!e.fixed}],title:_conf.default.i18n("right"===e.fixed?"vxe.toolbar.cancelfixed":"vxe.toolbar.fixedRight"),onClick:()=>{R(e,"right")}})]):null]))}}),e.isAll),i=e.isIndeterminate;return(0,_vue.h)("div",{ref:T,key:"simple",class:["vxe-table-custom-wrapper",{"is--active":e.visible}]},[(0,_vue.h)("ul",{class:"vxe-table-custom--header"},[(0,_vue.h)("li",{class:"vxe-table-custom--option"},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":t,"is--indeterminate":i}],title:_conf.default.i18n("vxe.table.allTitle"),onClick:M},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",i?_conf.default.icon.TABLE_CHECKBOX_INDETERMINATE:t?_conf.default.icon.TABLE_CHECKBOX_CHECKED:_conf.default.icon.TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},_conf.default.i18n("vxe.toolbar.customAll"))])])]),(0,_vue.h)("ul",{class:"vxe-table-custom--body",style:l?{maxHeight:l+"px"}:{},...o},b),_.showFooter?(0,_vue.h)("div",{class:"vxe-table-custom--footer"},[(0,_vue.h)("button",{class:"btn--reset",onClick:L},_.resetButtonText||_conf.default.i18n("vxe.toolbar.customRestore")),(0,_vue.h)("button",{class:"btn--confirm",onClick:A},_.confirmButtonText||_conf.default.i18n("vxe.toolbar.customConfirm"))]):null]);return}}}});