vxe-table 3.15.44 → 3.15.45

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 (66) hide show
  1. package/es/{iconfont.1750386589726.ttf → iconfont.1750641764687.ttf} +0 -0
  2. package/es/iconfont.1750641764687.woff +0 -0
  3. package/es/iconfont.1750641764687.woff2 +0 -0
  4. package/es/index.css +1 -1
  5. package/es/index.min.css +1 -1
  6. package/es/style.css +1 -1
  7. package/es/style.min.css +1 -1
  8. package/es/table/module/custom/mixin.js +9 -0
  9. package/es/table/module/custom/panel.js +395 -300
  10. package/es/table/module/edit/mixin.js +27 -10
  11. package/es/table/module/export/mixin.js +19 -6
  12. package/es/table/src/cell.js +4 -4
  13. package/es/table/src/methods.js +3 -3
  14. package/es/table/style.css +37 -9
  15. package/es/table/style.min.css +1 -1
  16. package/es/ui/index.js +5 -1
  17. package/es/ui/src/log.js +1 -1
  18. package/es/vxe-table/style.css +37 -9
  19. package/es/vxe-table/style.min.css +1 -1
  20. package/lib/{iconfont.1750386589726.ttf → iconfont.1750641764687.ttf} +0 -0
  21. package/lib/iconfont.1750641764687.woff +0 -0
  22. package/lib/iconfont.1750641764687.woff2 +0 -0
  23. package/lib/index.css +1 -1
  24. package/lib/index.min.css +1 -1
  25. package/lib/index.umd.js +326 -145
  26. package/lib/index.umd.min.js +1 -1
  27. package/lib/style.css +1 -1
  28. package/lib/style.min.css +1 -1
  29. package/lib/table/module/custom/mixin.js +11 -0
  30. package/lib/table/module/custom/mixin.min.js +1 -1
  31. package/lib/table/module/custom/panel.js +234 -122
  32. package/lib/table/module/custom/panel.min.js +1 -1
  33. package/lib/table/module/edit/mixin.js +49 -10
  34. package/lib/table/module/edit/mixin.min.js +1 -1
  35. package/lib/table/module/export/mixin.js +19 -4
  36. package/lib/table/module/export/mixin.min.js +1 -1
  37. package/lib/table/src/cell.js +4 -4
  38. package/lib/table/src/cell.min.js +1 -1
  39. package/lib/table/src/methods.js +3 -3
  40. package/lib/table/src/methods.min.js +1 -1
  41. package/lib/table/style/style.css +37 -9
  42. package/lib/table/style/style.min.css +1 -1
  43. package/lib/ui/index.js +5 -1
  44. package/lib/ui/index.min.js +1 -1
  45. package/lib/ui/src/log.js +1 -1
  46. package/lib/ui/src/log.min.js +1 -1
  47. package/lib/vxe-table/style/style.css +37 -9
  48. package/lib/vxe-table/style/style.min.css +1 -1
  49. package/package.json +1 -1
  50. package/packages/table/module/custom/mixin.ts +10 -0
  51. package/packages/table/module/custom/panel.ts +413 -313
  52. package/packages/table/module/edit/mixin.ts +28 -10
  53. package/packages/table/module/export/mixin.ts +18 -6
  54. package/packages/table/src/cell.ts +4 -4
  55. package/packages/table/src/methods.ts +3 -3
  56. package/packages/ui/index.ts +4 -0
  57. package/styles/components/icon.scss +9 -1
  58. package/styles/components/table-module/custom.scss +26 -3
  59. package/styles/helpers/baseMixin.scss +16 -2
  60. package/styles/icon/iconfont.ttf +0 -0
  61. package/styles/icon/iconfont.woff +0 -0
  62. package/styles/icon/iconfont.woff2 +0 -0
  63. package/es/iconfont.1750386589726.woff +0 -0
  64. package/es/iconfont.1750386589726.woff2 +0 -0
  65. package/lib/iconfont.1750386589726.woff +0 -0
  66. package/lib/iconfont.1750386589726.woff2 +0 -0
@@ -4,20 +4,27 @@ import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/
4
4
  import { errLog } from '../../../ui/src/log';
5
5
  import XEUtils from 'xe-utils';
6
6
  const { getI18n, getIcon, renderEmptyElement } = VxeUI;
7
- function showDropTip(_vm, evnt, optEl, showLine, dragPos) {
8
- const { prevDragToChild } = _vm;
9
- const el = _vm.$refs.bodyElemRef;
10
- if (!el) {
7
+ function showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos) {
8
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
9
+ const bodyWrapperElem = $xeTableCustomPanel.$refs.refBodyWrapperElem;
10
+ if (!bodyWrapperElem) {
11
11
  return;
12
12
  }
13
- const wrapperRect = el.getBoundingClientRect();
13
+ const customBodyElem = $xeTableCustomPanel.$refs.refCustomBodyElem;
14
+ if (!customBodyElem) {
15
+ return;
16
+ }
17
+ const { prevDragToChild } = customPanelInternalData;
18
+ const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
19
+ const customBodyRect = customBodyElem.getBoundingClientRect();
14
20
  if (optEl) {
15
- const dragLineEl = _vm.$refs.refDragLineElem;
21
+ const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
16
22
  if (dragLineEl) {
17
23
  if (showLine) {
18
24
  const optRect = optEl.getBoundingClientRect();
19
25
  dragLineEl.style.display = 'block';
20
- dragLineEl.style.top = `${Math.max(1, optRect.y + el.scrollTop - wrapperRect.y)}px`;
26
+ dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`;
27
+ dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
21
28
  dragLineEl.style.height = `${optRect.height}px`;
22
29
  dragLineEl.style.width = `${optRect.width}px`;
23
30
  dragLineEl.setAttribute('drag-pos', dragPos);
@@ -28,17 +35,17 @@ function showDropTip(_vm, evnt, optEl, showLine, dragPos) {
28
35
  }
29
36
  }
30
37
  }
31
- const dragTipEl = _vm.$refs.refDragTipElem;
38
+ const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
32
39
  if (dragTipEl) {
33
40
  dragTipEl.style.display = 'block';
34
- dragTipEl.style.top = `${Math.min(el.clientHeight + el.scrollTop - dragTipEl.clientHeight, evnt.clientY + el.scrollTop - wrapperRect.y)}px`;
35
- dragTipEl.style.left = `${Math.min(el.clientWidth + el.scrollLeft - dragTipEl.clientWidth, evnt.clientX + el.scrollLeft - wrapperRect.x)}px`;
41
+ dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
42
+ dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`;
36
43
  dragTipEl.setAttribute('drag-status', showLine ? (prevDragToChild ? 'sub' : 'normal') : 'disabled');
37
44
  }
38
45
  }
39
- function hideDropTip(_vm) {
40
- const dragTipEl = _vm.$refs.refDragTipElem;
41
- const dragLineEl = _vm.$refs.refDragLineElem;
46
+ function hideDropTip($xeTableCustomPanel) {
47
+ const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
48
+ const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
42
49
  if (dragTipEl) {
43
50
  dragTipEl.style.display = '';
44
51
  }
@@ -46,9 +53,10 @@ function hideDropTip(_vm) {
46
53
  dragLineEl.style.display = '';
47
54
  }
48
55
  }
49
- const renderDragTip = (h, _vm) => {
50
- const $xeTable = _vm.$xeTable;
51
- const dragCol = $xeTable.dragColumnRef;
56
+ const renderDragTip = (h, $xeTableCustomPanel) => {
57
+ const $xeTable = $xeTableCustomPanel.$xeTable;
58
+ const customPanelReactData = $xeTableCustomPanel.reactData;
59
+ const { dragTipText } = customPanelReactData;
52
60
  const columnDragOpts = $xeTable.computeColumnDragOpts;
53
61
  return h('div', {}, [
54
62
  h('div', {
@@ -73,13 +81,19 @@ const renderDragTip = (h, _vm) => {
73
81
  h('span', {
74
82
  class: ['vxe-table-custom-popup--drag-tip-sub-status', getIcon().TABLE_DRAG_STATUS_SUB_ROW]
75
83
  }),
84
+ h('span', {
85
+ class: ['vxe-table-custom-popup--drag-tip-group-status', getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
86
+ }),
87
+ h('span', {
88
+ class: ['vxe-table-custom-popup--drag-tip-values-status', getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
89
+ }),
76
90
  h('span', {
77
91
  class: ['vxe-table-custom-popup--drag-tip-disabled-status', getIcon().TABLE_DRAG_DISABLED]
78
92
  })
79
93
  ]),
80
94
  h('div', {
81
95
  class: 'vxe-table-custom-popup--drag-tip-content'
82
- }, getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))
96
+ }, `${dragTipText || ''}`)
83
97
  ])
84
98
  ])
85
99
  ]);
@@ -89,11 +103,11 @@ const renderSimplePanel = (h, _vm) => {
89
103
  const props = _vm;
90
104
  const $xeTable = _vm.$xeTable;
91
105
  const tableProps = $xeTable;
92
- const reactData = $xeTable;
106
+ const tableReactData = $xeTable;
93
107
  const $xeGrid = $xeTable.$xeGrid;
94
108
  const { customStore } = props;
95
109
  const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
96
- const { isCustomStatus, customColumnList } = reactData;
110
+ const { isCustomStatus, customColumnList } = tableReactData;
97
111
  const customOpts = $xeTable.computeCustomOpts;
98
112
  const { immediate } = customOpts;
99
113
  const columnDragOpts = $xeTable.computeColumnDragOpts;
@@ -159,9 +173,9 @@ const renderSimplePanel = (h, _vm) => {
159
173
  title: getI18n('vxe.custom.setting.colVisible')
160
174
  },
161
175
  on: {
162
- click: () => {
176
+ click: (evnt) => {
163
177
  if (!isDisabled) {
164
- _vm.changeCheckboxOption(column);
178
+ _vm.changeCheckboxOption(column, evnt);
165
179
  }
166
180
  }
167
181
  }
@@ -227,8 +241,8 @@ const renderSimplePanel = (h, _vm) => {
227
241
  title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
228
242
  },
229
243
  on: {
230
- click: () => {
231
- _vm.changeFixedOption(column, 'left');
244
+ click: ({ $event }) => {
245
+ _vm.changeFixedOption(column, 'left', $event);
232
246
  }
233
247
  }
234
248
  }),
@@ -241,8 +255,8 @@ const renderSimplePanel = (h, _vm) => {
241
255
  title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
242
256
  },
243
257
  on: {
244
- click: () => {
245
- _vm.changeFixedOption(column, 'right');
258
+ click: ({ $event }) => {
259
+ _vm.changeFixedOption(column, 'right', $event);
246
260
  }
247
261
  }
248
262
  })
@@ -263,152 +277,157 @@ const renderSimplePanel = (h, _vm) => {
263
277
  : {}
264
278
  }, customStore.visible
265
279
  ? [
266
- !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
267
- ? h($xeTable.getPivotTableAggregateSimplePanel(), {
268
- props: {
269
- customStore
270
- }
271
- })
272
- : renderEmptyElement($xeTable),
273
280
  h('div', {
274
- class: 'vxe-table-custom--handle-wrapper'
281
+ ref: 'refBodyWrapperElem',
282
+ class: 'vxe-table-custom-body-wrapper'
275
283
  }, [
284
+ !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
285
+ ? h($xeTable.getPivotTableAggregateSimplePanel(), {
286
+ props: {
287
+ customStore
288
+ }
289
+ })
290
+ : renderEmptyElement($xeTable),
276
291
  h('div', {
277
- class: 'vxe-table-custom--header'
278
- }, headerSlot
279
- ? $xeTable.callSlot(headerSlot, params, h)
280
- : [
281
- h('ul', {
282
- class: 'vxe-table-custom--panel-list'
283
- }, [
284
- h('li', {
285
- class: 'vxe-table-custom--option'
292
+ ref: 'refCustomBodyElem',
293
+ class: 'vxe-table-custom--handle-wrapper'
294
+ }, [
295
+ h('div', {
296
+ class: 'vxe-table-custom--header'
297
+ }, headerSlot
298
+ ? $xeTable.callSlot(headerSlot, params, h)
299
+ : [
300
+ h('ul', {
301
+ class: 'vxe-table-custom--panel-list'
286
302
  }, [
287
- allowVisible
288
- ? h('div', {
289
- class: ['vxe-table-custom--checkbox-option', {
290
- 'is--checked': isAllChecked,
291
- 'is--indeterminate': isAllIndeterminate
292
- }],
293
- attrs: {
294
- title: getI18n('vxe.table.allTitle')
295
- },
296
- on: {
297
- click: _vm.allOptionEvent
298
- }
299
- }, [
300
- h('span', {
301
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
302
- }),
303
- h('span', {
303
+ h('li', {
304
+ class: 'vxe-table-custom--option'
305
+ }, [
306
+ allowVisible
307
+ ? h('div', {
308
+ class: ['vxe-table-custom--checkbox-option', {
309
+ 'is--checked': isAllChecked,
310
+ 'is--indeterminate': isAllIndeterminate
311
+ }],
312
+ attrs: {
313
+ title: getI18n('vxe.table.allTitle')
314
+ },
315
+ on: {
316
+ click: _vm.allOptionEvent
317
+ }
318
+ }, [
319
+ h('span', {
320
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
321
+ }),
322
+ h('span', {
323
+ class: 'vxe-checkbox--label'
324
+ }, getI18n('vxe.toolbar.customAll'))
325
+ ])
326
+ : h('span', {
304
327
  class: 'vxe-checkbox--label'
305
- }, getI18n('vxe.toolbar.customAll'))
306
- ])
307
- : h('span', {
308
- class: 'vxe-checkbox--label'
309
- }, getI18n('vxe.table.customTitle'))
328
+ }, getI18n('vxe.table.customTitle'))
329
+ ])
310
330
  ])
311
- ])
331
+ ]),
332
+ h('div', {
333
+ class: 'vxe-table-custom--body'
334
+ }, [
335
+ topSlot
336
+ ? h('div', {
337
+ class: 'vxe-table-custom--panel-top'
338
+ }, $xeTable.callSlot(topSlot, params, h))
339
+ : renderEmptyElement($xeTable),
340
+ defaultSlot
341
+ ? h('div', {
342
+ class: 'vxe-table-custom--panel-body'
343
+ }, $xeTable.callSlot(defaultSlot, params, h))
344
+ : h('transition-group', {
345
+ class: 'vxe-table-custom--panel-list',
346
+ props: {
347
+ name: 'vxe-table-custom--list',
348
+ tag: 'ul'
349
+ },
350
+ on: customWrapperOns
351
+ }, colVNs),
352
+ bottomSlot
353
+ ? h('div', {
354
+ class: 'vxe-table-custom--panel-bottom'
355
+ }, $xeTable.callSlot(bottomSlot, params, h))
356
+ : renderEmptyElement($xeTable)
312
357
  ]),
313
- h('div', {
314
- ref: 'bodyElemRef',
315
- class: 'vxe-table-custom--body'
316
- }, [
317
- topSlot
318
- ? h('div', {
319
- class: 'vxe-table-custom--panel-top'
320
- }, $xeTable.callSlot(topSlot, params, h))
321
- : renderEmptyElement($xeTable),
322
- defaultSlot
358
+ customOpts.showFooter
323
359
  ? h('div', {
324
- class: 'vxe-table-custom--panel-body'
325
- }, $xeTable.callSlot(defaultSlot, params, h))
326
- : h('transition-group', {
327
- class: 'vxe-table-custom--panel-list',
328
- props: {
329
- name: 'vxe-table-custom--list',
330
- tag: 'ul'
331
- },
332
- on: customWrapperOns
333
- }, colVNs),
334
- bottomSlot
335
- ? h('div', {
336
- class: 'vxe-table-custom--panel-bottom'
337
- }, $xeTable.callSlot(bottomSlot, params, h))
338
- : renderEmptyElement($xeTable),
339
- renderDragTip(h, _vm)
340
- ]),
341
- customOpts.showFooter
342
- ? h('div', {
343
- class: 'vxe-table-custom--footer'
344
- }, footerSlot
345
- ? $xeTable.callSlot(footerSlot, params, h)
346
- : [
347
- h('div', {
348
- class: 'vxe-table-custom--footer-buttons'
349
- }, [
350
- h(VxeUIButtonComponent, {
351
- props: {
352
- mode: 'text',
353
- content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
354
- disabled: !isCustomStatus
355
- },
356
- on: {
357
- click: _vm.resetCustomEvent
358
- }
359
- }),
360
- immediate
361
- ? h(VxeUIButtonComponent, {
362
- props: {
363
- mode: 'text',
364
- content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
365
- },
366
- on: {
367
- click: _vm.cancelCloseEvent
368
- }
369
- })
370
- : h(VxeUIButtonComponent, {
360
+ class: 'vxe-table-custom--footer'
361
+ }, footerSlot
362
+ ? $xeTable.callSlot(footerSlot, params, h)
363
+ : [
364
+ h('div', {
365
+ class: 'vxe-table-custom--footer-buttons'
366
+ }, [
367
+ h(VxeUIButtonComponent, {
371
368
  props: {
372
369
  mode: 'text',
373
- content: customOpts.resetButtonText || getI18n('vxe.table.customCancel')
370
+ content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
371
+ disabled: !isCustomStatus
374
372
  },
375
373
  on: {
376
- click: _vm.cancelCustomEvent
374
+ click: _vm.resetCustomEvent
377
375
  }
378
376
  }),
379
- immediate
380
- ? renderEmptyElement($xeTable)
381
- : h(VxeUIButtonComponent, {
382
- props: {
383
- mode: 'text',
384
- status: 'primary',
385
- content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm')
386
- },
387
- on: {
388
- click: _vm.confirmCustomEvent
389
- }
390
- })
377
+ immediate
378
+ ? h(VxeUIButtonComponent, {
379
+ props: {
380
+ mode: 'text',
381
+ content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
382
+ },
383
+ on: {
384
+ click: _vm.cancelCloseEvent
385
+ }
386
+ })
387
+ : h(VxeUIButtonComponent, {
388
+ props: {
389
+ mode: 'text',
390
+ content: customOpts.resetButtonText || getI18n('vxe.table.customCancel')
391
+ },
392
+ on: {
393
+ click: _vm.cancelCustomEvent
394
+ }
395
+ }),
396
+ immediate
397
+ ? renderEmptyElement($xeTable)
398
+ : h(VxeUIButtonComponent, {
399
+ props: {
400
+ mode: 'text',
401
+ status: 'primary',
402
+ content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm')
403
+ },
404
+ on: {
405
+ click: _vm.confirmCustomEvent
406
+ }
407
+ })
408
+ ])
391
409
  ])
392
- ])
393
- : null
410
+ : null
411
+ ]),
412
+ renderDragTip(h, _vm)
394
413
  ])
395
414
  ]
396
415
  : []);
397
416
  };
398
- const renderPopupPanel = (h, _vm) => {
417
+ const renderPopupPanel = (h, $xeTableCustomPanel) => {
399
418
  const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
400
419
  const VxeUIDrawerComponent = VxeUI.getComponent('VxeDrawer');
401
420
  const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
402
421
  const VxeUINumberInputComponent = VxeUI.getComponent('VxeInput');
403
- const $xeTableCustomPanel = _vm;
404
- const props = _vm;
405
- const $xeTable = _vm.$xeTable;
422
+ const _vm = $xeTableCustomPanel;
423
+ const props = $xeTableCustomPanel;
424
+ const $xeTable = $xeTableCustomPanel.$xeTable;
406
425
  const tableProps = $xeTable;
407
- const reactData = $xeTable;
426
+ const tableReactData = $xeTable;
408
427
  const $xeGrid = $xeTable.$xeGrid;
409
428
  const { customStore } = props;
410
429
  const { resizable: allResizable } = tableProps;
411
- const { isCustomStatus, customColumnList } = reactData;
430
+ const { isCustomStatus, customColumnList } = tableReactData;
412
431
  const customOpts = $xeTable.computeCustomOpts;
413
432
  const { immediate } = customOpts;
414
433
  const columnDragOpts = $xeTable.computeColumnDragOpts;
@@ -493,9 +512,9 @@ const renderPopupPanel = (h, _vm) => {
493
512
  title: getI18n('vxe.custom.setting.colVisible')
494
513
  },
495
514
  on: {
496
- click: () => {
515
+ click: (evnt) => {
497
516
  if (!isDisabled) {
498
- _vm.changeCheckboxOption(column);
517
+ _vm.changeCheckboxOption(column, evnt);
499
518
  }
500
519
  }
501
520
  }
@@ -601,8 +620,8 @@ const renderPopupPanel = (h, _vm) => {
601
620
  ]
602
621
  },
603
622
  on: {
604
- input(value) {
605
- _vm.changeFixedOption(column, value);
623
+ change({ label, $event }) {
624
+ _vm.changeFixedOption(column, label, $event);
606
625
  }
607
626
  }
608
627
  })
@@ -613,92 +632,96 @@ const renderPopupPanel = (h, _vm) => {
613
632
  });
614
633
  const scopedSlots = {
615
634
  default: () => {
616
- if (defaultSlot) {
617
- return $xeTable.callSlot(defaultSlot, params, h);
618
- }
619
635
  return h('div', {
620
- ref: 'bodyElemRef',
621
- class: 'vxe-table-custom-popup--body'
622
- }, [
623
- topSlot
624
- ? h('div', {
625
- class: 'vxe-table-custom-popup--table-top'
626
- }, $xeTable.callSlot(topSlot, params, h))
627
- : renderEmptyElement($xeTable),
628
- h('div', {
629
- class: 'vxe-table-custom-popup--table-wrapper'
630
- }, [
631
- h('table', {}, [
632
- h('colgroup', {}, [
633
- allowVisible
634
- ? h('col', {
635
- class: 'vxe-table-custom-popup--table-col-seq'
636
- })
637
- : renderEmptyElement($xeTable),
638
- h('col', {
639
- class: 'vxe-table-custom-popup--table-col-title'
640
- }),
641
- allowResizable
642
- ? h('col', {
643
- class: 'vxe-table-custom-popup--table-col-width'
644
- })
645
- : renderEmptyElement($xeTable),
646
- allowFixed
647
- ? h('col', {
648
- class: 'vxe-table-custom-popup--table-col-fixed'
649
- })
650
- : renderEmptyElement($xeTable)
651
- ]),
652
- h('thead', {}, [
653
- h('tr', {}, [
654
- allowVisible
655
- ? h('th', {}, [
656
- h('div', {
657
- class: ['vxe-table-custom--checkbox-option', {
658
- 'is--checked': isAllChecked,
659
- 'is--indeterminate': isAllIndeterminate
660
- }],
661
- attrs: {
662
- title: getI18n('vxe.table.allTitle')
663
- },
664
- on: {
665
- click: _vm.allOptionEvent
666
- }
667
- }, [
668
- h('span', {
669
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
670
- }),
671
- h('span', {
672
- class: 'vxe-checkbox--label'
673
- }, getI18n('vxe.toolbar.customAll'))
674
- ])
636
+ ref: 'refBodyWrapperElem',
637
+ class: 'vxe-table-custom-popup--body-wrapper'
638
+ }, defaultSlot
639
+ ? $xeTable.callSlot(defaultSlot, params, h)
640
+ : [
641
+ h('div', {
642
+ ref: 'refCustomBodyElem',
643
+ class: 'vxe-table-custom-popup--handle-wrapper'
644
+ }, [
645
+ topSlot
646
+ ? h('div', {
647
+ class: 'vxe-table-custom-popup--table-top'
648
+ }, $xeTable.callSlot(topSlot, params, h))
649
+ : renderEmptyElement($xeTable),
650
+ h('div', {
651
+ class: 'vxe-table-custom-popup--table-wrapper'
652
+ }, [
653
+ h('table', {}, [
654
+ h('colgroup', {}, [
655
+ allowVisible
656
+ ? h('col', {
657
+ class: 'vxe-table-custom-popup--table-col-seq'
658
+ })
659
+ : renderEmptyElement($xeTable),
660
+ h('col', {
661
+ class: 'vxe-table-custom-popup--table-col-title'
662
+ }),
663
+ allowResizable
664
+ ? h('col', {
665
+ class: 'vxe-table-custom-popup--table-col-width'
666
+ })
667
+ : renderEmptyElement($xeTable),
668
+ allowFixed
669
+ ? h('col', {
670
+ class: 'vxe-table-custom-popup--table-col-fixed'
671
+ })
672
+ : renderEmptyElement($xeTable)
673
+ ]),
674
+ h('thead', {}, [
675
+ h('tr', {}, [
676
+ allowVisible
677
+ ? h('th', {}, [
678
+ h('div', {
679
+ class: ['vxe-table-custom--checkbox-option', {
680
+ 'is--checked': isAllChecked,
681
+ 'is--indeterminate': isAllIndeterminate
682
+ }],
683
+ attrs: {
684
+ title: getI18n('vxe.table.allTitle')
685
+ },
686
+ on: {
687
+ click: _vm.allOptionEvent
688
+ }
689
+ }, [
690
+ h('span', {
691
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
692
+ }),
693
+ h('span', {
694
+ class: 'vxe-checkbox--label'
695
+ }, getI18n('vxe.toolbar.customAll'))
696
+ ])
697
+ ])
698
+ : renderEmptyElement($xeTable),
699
+ h('th', {}, getI18n('vxe.custom.setting.colTitle')),
700
+ allowResizable
701
+ ? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
702
+ : renderEmptyElement($xeTable),
703
+ allowFixed
704
+ ? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
705
+ : renderEmptyElement($xeTable)
675
706
  ])
676
- : renderEmptyElement($xeTable),
677
- h('th', {}, getI18n('vxe.custom.setting.colTitle')),
678
- allowResizable
679
- ? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
680
- : renderEmptyElement($xeTable),
681
- allowFixed
682
- ? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
683
- : renderEmptyElement($xeTable)
707
+ ]),
708
+ h('transition-group', {
709
+ class: 'vxe-table-custom--panel-list',
710
+ props: {
711
+ tag: 'tbody',
712
+ name: 'vxe-table-custom--list'
713
+ }
714
+ }, trVNs)
684
715
  ])
685
716
  ]),
686
- h('transition-group', {
687
- class: 'vxe-table-custom--panel-list',
688
- props: {
689
- tag: 'tbody',
690
- name: 'vxe-table-custom--list'
691
- }
692
- }, trVNs)
717
+ bottomSlot
718
+ ? h('div', {
719
+ class: 'vxe-table-custom-popup--table-bottom'
720
+ }, $xeTable.callSlot(bottomSlot, params, h))
721
+ : renderEmptyElement($xeTable),
722
+ renderDragTip(h, _vm)
693
723
  ])
694
- ]),
695
- bottomSlot
696
- ? h('div', {
697
- class: 'vxe-table-custom-popup--table-bottom'
698
- }, $xeTable.callSlot(bottomSlot, params, h))
699
- : renderEmptyElement($xeTable),
700
- renderDragTip(h, _vm)
701
- ]);
724
+ ]);
702
725
  },
703
726
  footer: () => {
704
727
  if (footerSlot) {
@@ -814,27 +837,44 @@ export default {
814
837
  default: () => ({})
815
838
  }
816
839
  },
840
+ provide() {
841
+ const $xeTableCustomPanel = this;
842
+ return {
843
+ $xeTableCustomPanel
844
+ };
845
+ },
817
846
  inject: {
818
847
  $xeTable: {
819
848
  default: null
820
849
  }
821
850
  },
822
851
  data() {
852
+ const reactData = {
853
+ dragCol: null,
854
+ dragGroup: null,
855
+ dragValues: null,
856
+ dragTipText: ''
857
+ };
858
+ const internalData = {
859
+ // prevDragCol: undefined,
860
+ // prevDragToChild: false,
861
+ // prevDragPos: null
862
+ };
823
863
  return {
824
- prevDragCol: undefined,
825
- prevDragToChild: false,
826
- prevDragPos: null
864
+ reactData,
865
+ internalData
827
866
  };
828
867
  },
829
868
  computed: {},
830
869
  created() {
870
+ const $xeTableCustomPanel = this;
831
871
  const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
832
872
  const VxeUIDrawerComponent = VxeUI.getComponent('VxeDrawer');
833
873
  const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
834
874
  const VxeUINumberInputComponent = VxeUI.getComponent('VxeNumberInput');
835
875
  const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup');
836
- this.$nextTick(() => {
837
- const $xeTable = this.$xeTable;
876
+ $xeTableCustomPanel.$nextTick(() => {
877
+ const $xeTable = $xeTableCustomPanel.$xeTable;
838
878
  const { customOpts } = $xeTable;
839
879
  const { mode } = customOpts;
840
880
  if (!VxeUIModalComponent && (mode === 'modal')) {
@@ -855,23 +895,27 @@ export default {
855
895
  });
856
896
  },
857
897
  render(h) {
858
- const $xeTable = this.$xeTable;
898
+ const $xeTableCustomPanel = this;
899
+ const $xeTable = $xeTableCustomPanel.$xeTable;
859
900
  const customOpts = $xeTable.computeCustomOpts;
860
901
  if (['modal', 'drawer', 'popup'].includes(`${customOpts.mode}`)) {
861
- return renderPopupPanel(h, this);
902
+ return renderPopupPanel(h, $xeTableCustomPanel);
862
903
  }
863
- return renderSimplePanel(h, this);
904
+ return renderSimplePanel(h, $xeTableCustomPanel);
864
905
  },
865
906
  methods: {
866
907
  handleWrapperMouseenterEvent(evnt) {
867
- const $xeTable = this.$xeTable;
908
+ const $xeTableCustomPanel = this;
909
+ const $xeTable = $xeTableCustomPanel.$xeTable;
868
910
  const { customStore } = this;
869
911
  customStore.activeWrapper = true;
870
912
  $xeTable.customOpenEvent(evnt);
871
913
  },
872
914
  handleWrapperMouseleaveEvent(evnt) {
873
- const $xeTable = this.$xeTable;
874
- const { customStore } = this;
915
+ const $xeTableCustomPanel = this;
916
+ const $xeTable = $xeTableCustomPanel.$xeTable;
917
+ const props = $xeTableCustomPanel;
918
+ const { customStore } = props;
875
919
  customStore.activeWrapper = false;
876
920
  setTimeout(() => {
877
921
  if (!customStore.activeBtn && !customStore.activeWrapper) {
@@ -883,26 +927,30 @@ export default {
883
927
  return {};
884
928
  },
885
929
  confirmCustomEvent({ $event }) {
886
- const $xeTable = this.$xeTable;
887
- const reactData = $xeTable;
888
- reactData.isCustomStatus = true;
930
+ const $xeTableCustomPanel = this;
931
+ const $xeTable = $xeTableCustomPanel.$xeTable;
932
+ const tableReactData = $xeTable;
933
+ tableReactData.isCustomStatus = true;
889
934
  $xeTable.saveCustom();
890
935
  $xeTable.closeCustom();
891
936
  $xeTable.emitCustomEvent('confirm', $event);
892
937
  },
893
938
  cancelCloseEvent({ $event }) {
894
- const $xeTable = this.$xeTable;
939
+ const $xeTableCustomPanel = this;
940
+ const $xeTable = $xeTableCustomPanel.$xeTable;
895
941
  $xeTable.closeCustom();
896
942
  $xeTable.emitCustomEvent('close', $event);
897
943
  },
898
944
  cancelCustomEvent({ $event }) {
899
- const $xeTable = this.$xeTable;
945
+ const $xeTableCustomPanel = this;
946
+ const $xeTable = $xeTableCustomPanel.$xeTable;
900
947
  $xeTable.cancelCustom();
901
948
  $xeTable.closeCustom();
902
949
  $xeTable.emitCustomEvent('cancel', $event);
903
950
  },
904
951
  handleResetCustomEvent(evnt) {
905
- const $xeTable = this.$xeTable;
952
+ const $xeTableCustomPanel = this;
953
+ const $xeTable = $xeTableCustomPanel.$xeTable;
906
954
  $xeTable.resetCustom(true);
907
955
  $xeTable.closeCustom();
908
956
  $xeTable.emitCustomEvent('reset', evnt);
@@ -923,26 +971,11 @@ export default {
923
971
  this.handleResetCustomEvent(evnt);
924
972
  }
925
973
  },
926
- resetPopupCustomEvent(evnt) {
927
- if (VxeUI.modal) {
928
- VxeUI.modal.confirm({
929
- content: getI18n('vxe.custom.cstmConfirmRestore'),
930
- className: 'vxe-table--ignore-clear',
931
- escClosable: true
932
- }).then(type => {
933
- if (type === 'confirm') {
934
- this.resetCustomEvent(evnt);
935
- }
936
- });
937
- }
938
- else {
939
- this.resetCustomEvent(evnt);
940
- }
941
- },
942
974
  handleOptionCheck(column) {
943
- const $xeTable = this.$xeTable;
944
- const reactData = $xeTable;
945
- const { customColumnList } = reactData;
975
+ const $xeTableCustomPanel = this;
976
+ const $xeTable = $xeTableCustomPanel.$xeTable;
977
+ const tableReactData = $xeTable;
978
+ const { customColumnList } = tableReactData;
946
979
  const matchObj = XEUtils.findTree(customColumnList, item => item === column);
947
980
  if (matchObj && matchObj.parent) {
948
981
  const { parent } = matchObj;
@@ -953,9 +986,10 @@ export default {
953
986
  }
954
987
  }
955
988
  },
956
- changeCheckboxOption(column) {
957
- const $xeTable = this.$xeTable;
958
- const reactData = $xeTable;
989
+ changeCheckboxOption(column, evnt) {
990
+ const $xeTableCustomPanel = this;
991
+ const $xeTable = $xeTableCustomPanel.$xeTable;
992
+ const tableReactData = $xeTable;
959
993
  const customOpts = $xeTable.computeCustomOpts;
960
994
  const isChecked = !column.renderVisible;
961
995
  if (customOpts.immediate) {
@@ -964,7 +998,7 @@ export default {
964
998
  item.renderVisible = isChecked;
965
999
  item.halfVisible = false;
966
1000
  });
967
- reactData.isCustomStatus = true;
1001
+ tableReactData.isCustomStatus = true;
968
1002
  $xeTable.handleCustom();
969
1003
  $xeTable.saveCustomStore('update:visible');
970
1004
  }
@@ -976,28 +1010,33 @@ export default {
976
1010
  }
977
1011
  this.handleOptionCheck(column);
978
1012
  $xeTable.checkCustomStatus();
1013
+ $xeTable.dispatchEvent('custom-visible-change', { column, checked: isChecked }, evnt);
979
1014
  },
980
1015
  changeColumnWidth(column) {
981
- const $xeTable = this.$xeTable;
982
- const reactData = $xeTable;
1016
+ const $xeTableCustomPanel = this;
1017
+ const $xeTable = $xeTableCustomPanel.$xeTable;
1018
+ const tableReactData = $xeTable;
983
1019
  const customOpts = $xeTable.computeCustomOpts;
984
1020
  if (customOpts.immediate) {
985
1021
  if (column.renderResizeWidth !== column.renderWidth) {
986
1022
  column.resizeWidth = column.renderResizeWidth;
987
1023
  column.renderWidth = column.renderResizeWidth;
988
- reactData.isCustomStatus = true;
1024
+ tableReactData.isCustomStatus = true;
989
1025
  $xeTable.handleCustom();
990
1026
  $xeTable.saveCustomStore('update:width');
991
1027
  }
992
1028
  }
993
1029
  },
994
- changeFixedOption(column, colFixed) {
995
- const $xeTable = this.$xeTable;
996
- const reactData = $xeTable;
1030
+ changeFixedOption(column, colFixed, evnt) {
1031
+ const $xeTableCustomPanel = this;
1032
+ const $xeTable = $xeTableCustomPanel.$xeTable;
1033
+ const tableReactData = $xeTable;
997
1034
  const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
998
1035
  const customOpts = $xeTable.computeCustomOpts;
1036
+ let targetFixed = null;
999
1037
  if (customOpts.immediate) {
1000
1038
  if (column.renderFixed === colFixed) {
1039
+ targetFixed = '';
1001
1040
  XEUtils.eachTree([column], col => {
1002
1041
  col.fixed = '';
1003
1042
  col.renderFixed = '';
@@ -1005,37 +1044,70 @@ export default {
1005
1044
  }
1006
1045
  else {
1007
1046
  if (!isMaxFixedColumn || column.renderFixed) {
1047
+ targetFixed = colFixed;
1008
1048
  XEUtils.eachTree([column], col => {
1009
1049
  col.fixed = colFixed;
1010
1050
  col.renderFixed = colFixed;
1011
1051
  });
1012
1052
  }
1013
1053
  }
1014
- reactData.isCustomStatus = true;
1054
+ tableReactData.isCustomStatus = true;
1015
1055
  $xeTable.handleCustom();
1016
1056
  $xeTable.saveCustomStore('update:fixed');
1017
1057
  }
1018
1058
  else {
1019
1059
  if (column.renderFixed === colFixed) {
1060
+ targetFixed = '';
1020
1061
  XEUtils.eachTree([column], col => {
1021
1062
  col.renderFixed = '';
1022
1063
  });
1023
1064
  }
1024
1065
  else {
1025
1066
  if (!isMaxFixedColumn || column.renderFixed) {
1067
+ targetFixed = colFixed;
1026
1068
  XEUtils.eachTree([column], col => {
1027
1069
  col.renderFixed = colFixed;
1028
1070
  });
1029
1071
  }
1030
1072
  }
1031
1073
  }
1074
+ if (!targetFixed !== null) {
1075
+ $xeTable.dispatchEvent('custom-fixed-change', { column, fixed: targetFixed }, evnt);
1076
+ }
1032
1077
  },
1033
- allOptionEvent() {
1034
- const $xeTable = this.$xeTable;
1078
+ allOptionEvent(evnt) {
1079
+ const $xeTableCustomPanel = this;
1080
+ const $xeTable = $xeTableCustomPanel.$xeTable;
1081
+ const tableReactData = $xeTable;
1082
+ const { customStore } = tableReactData;
1083
+ const isAll = !customStore.isAll;
1035
1084
  $xeTable.toggleCustomAllCheckbox();
1085
+ $xeTable.dispatchEvent('custom-visible-all', { checked: isAll }, evnt);
1086
+ },
1087
+ updateColDropTipContent() {
1088
+ const $xeTableCustomPanel = this;
1089
+ const $xeTable = $xeTableCustomPanel.$xeTable;
1090
+ const customPanelReactData = $xeTableCustomPanel.reactData;
1091
+ const { dragCol } = customPanelReactData;
1092
+ const columnDragOpts = $xeTable.computeColumnDragOpts;
1093
+ const { tooltipMethod } = columnDragOpts;
1094
+ let tipContent = '';
1095
+ if (tooltipMethod) {
1096
+ const dtParams = {
1097
+ $table: $xeTable,
1098
+ column: dragCol
1099
+ };
1100
+ tipContent = `${tooltipMethod(dtParams) || ''}`;
1101
+ }
1102
+ else {
1103
+ tipContent = getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']);
1104
+ }
1105
+ customPanelReactData.dragTipText = tipContent;
1036
1106
  },
1037
1107
  sortMousedownEvent(evnt) {
1038
- const $xeTable = this.$xeTable;
1108
+ const $xeTableCustomPanel = this;
1109
+ const $xeTable = $xeTableCustomPanel.$xeTable;
1110
+ const customPanelReactData = $xeTableCustomPanel.reactData;
1039
1111
  const btnEl = evnt.currentTarget;
1040
1112
  const cellEl = btnEl.parentElement;
1041
1113
  const tdEl = cellEl.parentElement;
@@ -1043,40 +1115,56 @@ export default {
1043
1115
  const colid = trEl.getAttribute('colid');
1044
1116
  const column = $xeTable.getColumnById(colid);
1045
1117
  trEl.draggable = true;
1046
- this.dragCol = column;
1118
+ customPanelReactData.dragCol = column;
1119
+ this.updateColDropTipContent();
1047
1120
  addClass(trEl, 'active--drag-origin');
1048
1121
  },
1049
1122
  sortMouseupEvent(evnt) {
1123
+ const $xeTableCustomPanel = this;
1124
+ const customPanelReactData = $xeTableCustomPanel.reactData;
1050
1125
  const btnEl = evnt.currentTarget;
1051
1126
  const cellEl = btnEl.parentElement;
1052
1127
  const tdEl = cellEl.parentElement;
1053
1128
  const trEl = tdEl.parentElement;
1054
- hideDropTip(this);
1129
+ hideDropTip($xeTableCustomPanel);
1055
1130
  trEl.draggable = false;
1056
- this.dragCol = null;
1131
+ customPanelReactData.dragCol = null;
1057
1132
  removeClass(trEl, 'active--drag-origin');
1058
1133
  },
1059
1134
  sortDragstartEvent(evnt) {
1135
+ const $xeTableCustomPanel = this;
1136
+ const customPanelReactData = $xeTableCustomPanel.reactData;
1060
1137
  if (evnt.dataTransfer) {
1061
1138
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
1062
1139
  }
1140
+ customPanelReactData.dragGroup = null;
1141
+ customPanelReactData.dragValues = null;
1063
1142
  },
1064
1143
  sortDragendEvent(evnt) {
1065
- const $xeTable = this.$xeTable;
1144
+ const $xeTableCustomPanel = this;
1145
+ const $xeTable = $xeTableCustomPanel.$xeTable;
1066
1146
  const tableProps = $xeTable;
1067
- const reactData = $xeTable;
1068
- const internalData = $xeTable;
1069
- const { dragCol, prevDragPos, prevDragCol, prevDragToChild } = this;
1147
+ const tableReactData = $xeTable;
1148
+ const tableInternalData = $xeTable;
1149
+ const customPanelReactData = $xeTableCustomPanel.reactData;
1150
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
1070
1151
  const { mouseConfig } = tableProps;
1071
- const { customColumnList } = reactData;
1072
- const { collectColumn } = internalData;
1152
+ const { customColumnList } = tableReactData;
1153
+ const { collectColumn } = tableInternalData;
1073
1154
  const customOpts = $xeTable.computeCustomOpts;
1074
1155
  const { immediate } = customOpts;
1075
1156
  const trEl = evnt.currentTarget;
1076
1157
  const columnDragOpts = $xeTable.computeColumnDragOpts;
1077
1158
  const { isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts;
1159
+ const { dragCol, dragGroup, dragValues } = customPanelReactData;
1160
+ const { prevDragCol, prevDragPos, prevDragToChild } = customPanelInternalData;
1078
1161
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
1079
- if (prevDragCol && dragCol) {
1162
+ if (dragGroup || dragValues) {
1163
+ if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
1164
+ $xeTable.handlePivotTableAggregatePanelDragendEvent(evnt);
1165
+ }
1166
+ }
1167
+ else if (prevDragCol && dragCol) {
1080
1168
  // 判断是否有拖动
1081
1169
  if (prevDragCol !== dragCol) {
1082
1170
  const dragColumn = dragCol;
@@ -1199,7 +1287,7 @@ export default {
1199
1287
  nafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === newColumn.id);
1200
1288
  customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
1201
1289
  }
1202
- reactData.isDragColMove = true;
1290
+ tableReactData.isDragColMove = true;
1203
1291
  if (mouseConfig) {
1204
1292
  if ($xeTable.clearSelected) {
1205
1293
  $xeTable.clearSelected();
@@ -1221,23 +1309,28 @@ export default {
1221
1309
  }
1222
1310
  }, evnt);
1223
1311
  if (immediate) {
1224
- reactData.customColumnList = collectColumn.slice(0);
1312
+ tableReactData.customColumnList = collectColumn.slice(0);
1225
1313
  $xeTable.handleColDragSwapColumn();
1226
1314
  }
1227
1315
  }).catch(() => {
1228
1316
  });
1229
1317
  }
1230
1318
  }
1231
- hideDropTip(this);
1232
- this.dragCol.value = null;
1319
+ hideDropTip($xeTableCustomPanel);
1320
+ customPanelReactData.dragCol = null;
1321
+ customPanelReactData.dragGroup = null;
1322
+ customPanelReactData.dragValues = null;
1233
1323
  trEl.draggable = false;
1234
1324
  trEl.removeAttribute('drag-pos');
1235
1325
  removeClass(trEl, 'active--drag-target');
1236
1326
  removeClass(trEl, 'active--drag-origin');
1237
1327
  },
1238
1328
  sortDragoverEvent(evnt) {
1239
- const $xeTable = this.$xeTable;
1240
- const { dragCol } = this;
1329
+ const $xeTableCustomPanel = this;
1330
+ const $xeTable = $xeTableCustomPanel.$xeTable;
1331
+ const customPanelReactData = $xeTableCustomPanel.reactData;
1332
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
1333
+ const { dragCol } = customPanelReactData;
1241
1334
  const customOpts = $xeTable.computeCustomOpts;
1242
1335
  const { immediate } = customOpts;
1243
1336
  const columnDragOpts = $xeTable.computeColumnDragOpts;
@@ -1246,6 +1339,8 @@ export default {
1246
1339
  const isControlKey = hasControlKey(evnt);
1247
1340
  const colid = optEl.getAttribute('colid');
1248
1341
  const column = $xeTable.getColumnById(colid);
1342
+ customPanelReactData.dragGroup = null;
1343
+ customPanelReactData.dragValues = null;
1249
1344
  // 是否移入有效列
1250
1345
  if (column && (isCrossDrag || column.level === 1)) {
1251
1346
  evnt.preventDefault();
@@ -1255,13 +1350,13 @@ export default {
1255
1350
  (!isCrossDrag && column.level > 1) ||
1256
1351
  (!immediate && column.level > 1) ||
1257
1352
  column.renderFixed) {
1258
- showDropTip(this, evnt, optEl, false, dragPos);
1353
+ showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos);
1259
1354
  return;
1260
1355
  }
1261
- this.prevDragToChild = !!((isCrossDrag && isToChildDrag) && isControlKey && immediate);
1262
- this.prevDragCol = column;
1263
- this.prevDragPos = dragPos;
1264
- showDropTip(this, evnt, optEl, true, dragPos);
1356
+ customPanelInternalData.prevDragToChild = !!((isCrossDrag && isToChildDrag) && isControlKey && immediate);
1357
+ customPanelInternalData.prevDragCol = column;
1358
+ customPanelInternalData.prevDragPos = dragPos;
1359
+ showDropTip($xeTableCustomPanel, evnt, optEl, true, dragPos);
1265
1360
  }
1266
1361
  }
1267
1362
  }