vxe-table 3.15.44 → 3.15.46

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.1750651550655.ttf} +0 -0
  2. package/es/iconfont.1750651550655.woff +0 -0
  3. package/es/iconfont.1750651550655.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 +11 -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.1750651550655.ttf} +0 -0
  21. package/lib/iconfont.1750651550655.woff +0 -0
  22. package/lib/iconfont.1750651550655.woff2 +0 -0
  23. package/lib/index.css +1 -1
  24. package/lib/index.min.css +1 -1
  25. package/lib/index.umd.js +336 -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 +13 -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 +13 -4
  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
package/lib/index.umd.js CHANGED
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
2002
2002
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2003
2003
 
2004
2004
 
2005
- const version = "3.15.44";
2005
+ const version = "3.15.46";
2006
2006
  core_.VxeUI.version = version;
2007
2007
  core_.VxeUI.tableVersion = version;
2008
2008
  core_.VxeUI.setConfig({
@@ -2298,14 +2298,18 @@ core_.VxeUI.setIcon({
2298
2298
  TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
2299
2299
  TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
2300
2300
  TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
2301
+ TABLE_CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
2301
2302
  TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
2302
2303
  TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
2304
+ TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
2303
2305
  TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
2304
2306
  TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
2305
2307
  TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
2306
2308
  TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
2307
2309
  TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
2308
2310
  TABLE_DRAG_STATUS_SUB_ROW: iconPrefix + 'add-sub',
2311
+ TABLE_DRAG_STATUS_AGG_GROUP: iconPrefix + 'grouping',
2312
+ TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + 'values',
2309
2313
  TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
2310
2314
  TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
2311
2315
  TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
@@ -2658,7 +2662,7 @@ function isNodeElement(elem) {
2658
2662
  const {
2659
2663
  log: log_log
2660
2664
  } = core_.VxeUI;
2661
- const log_version = `table v${"3.15.44"}`;
2665
+ const log_version = `table v${"3.15.46"}`;
2662
2666
  const warnLog = log_log.create('warn', log_version);
2663
2667
  const errLog = log_log.create('error', log_version);
2664
2668
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -4262,7 +4266,7 @@ const Cell = {
4262
4266
  const radioVNs = [];
4263
4267
  if (isVisible) {
4264
4268
  radioVNs.push(h('span', {
4265
- class: ['vxe-radio--icon', isChecked ? cell_getIcon().TABLE_RADIO_CHECKED : cell_getIcon().TABLE_RADIO_UNCHECKED]
4269
+ class: ['vxe-radio--icon', isChecked ? cell_getIcon().TABLE_RADIO_CHECKED : isDisabled ? cell_getIcon().TABLE_RADIO_DISABLED_UNCHECKED : cell_getIcon().TABLE_RADIO_UNCHECKED]
4266
4270
  }));
4267
4271
  }
4268
4272
  if (defaultSlot || labelField) {
@@ -4341,7 +4345,7 @@ const Cell = {
4341
4345
  },
4342
4346
  on: ons
4343
4347
  }, [h('span', {
4344
- class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
4348
+ class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isAllCheckboxDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
4345
4349
  })].concat(titleSlot || colTitle ? [h('span', {
4346
4350
  class: 'vxe-checkbox--label'
4347
4351
  }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : colTitle)] : []))]));
@@ -4417,7 +4421,7 @@ const Cell = {
4417
4421
  const checkVNs = [];
4418
4422
  if (isVisible) {
4419
4423
  checkVNs.push(h('span', {
4420
- class: ['vxe-checkbox--icon', indeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
4424
+ class: ['vxe-checkbox--icon', indeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
4421
4425
  }));
4422
4426
  }
4423
4427
  if (defaultSlot || labelField) {
@@ -4510,7 +4514,7 @@ const Cell = {
4510
4514
  const checkVNs = [];
4511
4515
  if (isVisible) {
4512
4516
  checkVNs.push(h('span', {
4513
- class: ['vxe-checkbox--icon', isIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
4517
+ class: ['vxe-checkbox--icon', isIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
4514
4518
  }));
4515
4519
  }
4516
4520
  if (defaultSlot || labelField) {
@@ -13139,7 +13143,17 @@ const Methods = {
13139
13143
  }
13140
13144
  vLen++;
13141
13145
  });
13142
- const isSelected = sLen >= vLen;
13146
+ let isSelected = sLen >= vLen && (vLen >= 1 || hLen >= 1);
13147
+ if (checkMethod) {
13148
+ if (checkMethod({
13149
+ $table: $xeTable,
13150
+ row
13151
+ })) {
13152
+ isSelected = sLen >= vLen;
13153
+ } else {
13154
+ isSelected = selectCheckboxMaps[rowid];
13155
+ }
13156
+ }
13143
13157
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
13144
13158
  if (checkField) {
13145
13159
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, isSelected);
@@ -17195,7 +17209,7 @@ const Methods = {
17195
17209
  }
17196
17210
  };
17197
17211
  // Module methods
17198
- const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,saveFilterPanelByEvent,resetFilterPanel,resetFilterPanelByEvent,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
17212
+ const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,saveFilterPanelByEvent,resetFilterPanel,resetFilterPanelByEvent,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getEditCell,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,toggleCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
17199
17213
  funcs.forEach(name => {
17200
17214
  Methods[name] = function (...args) {
17201
17215
  if (!this[`_${name}`]) {
@@ -17205,7 +17219,7 @@ funcs.forEach(name => {
17205
17219
  errLog('vxe.error.reqModule', ['Validator']);
17206
17220
  } else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
17207
17221
  errLog('vxe.error.reqModule', ['Filter']);
17208
- } else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
17222
+ } else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getEditCell,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
17209
17223
  errLog('vxe.error.reqModule', ['Edit']);
17210
17224
  } else if ('openCustom'.split(',').includes(name)) {
17211
17225
  errLog('vxe.error.reqModule', ['Custom']);
@@ -19455,22 +19469,29 @@ const {
19455
19469
  getIcon: panel_getIcon,
19456
19470
  renderEmptyElement: panel_renderEmptyElement
19457
19471
  } = core_.VxeUI;
19458
- function panel_showDropTip(_vm, evnt, optEl, showLine, dragPos) {
19459
- const {
19460
- prevDragToChild
19461
- } = _vm;
19462
- const el = _vm.$refs.bodyElemRef;
19463
- if (!el) {
19472
+ function panel_showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos) {
19473
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
19474
+ const bodyWrapperElem = $xeTableCustomPanel.$refs.refBodyWrapperElem;
19475
+ if (!bodyWrapperElem) {
19464
19476
  return;
19465
19477
  }
19466
- const wrapperRect = el.getBoundingClientRect();
19478
+ const customBodyElem = $xeTableCustomPanel.$refs.refCustomBodyElem;
19479
+ if (!customBodyElem) {
19480
+ return;
19481
+ }
19482
+ const {
19483
+ prevDragToChild
19484
+ } = customPanelInternalData;
19485
+ const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
19486
+ const customBodyRect = customBodyElem.getBoundingClientRect();
19467
19487
  if (optEl) {
19468
- const dragLineEl = _vm.$refs.refDragLineElem;
19488
+ const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
19469
19489
  if (dragLineEl) {
19470
19490
  if (showLine) {
19471
19491
  const optRect = optEl.getBoundingClientRect();
19472
19492
  dragLineEl.style.display = 'block';
19473
- dragLineEl.style.top = `${Math.max(1, optRect.y + el.scrollTop - wrapperRect.y)}px`;
19493
+ dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`;
19494
+ dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
19474
19495
  dragLineEl.style.height = `${optRect.height}px`;
19475
19496
  dragLineEl.style.width = `${optRect.width}px`;
19476
19497
  dragLineEl.setAttribute('drag-pos', dragPos);
@@ -19480,17 +19501,17 @@ function panel_showDropTip(_vm, evnt, optEl, showLine, dragPos) {
19480
19501
  }
19481
19502
  }
19482
19503
  }
19483
- const dragTipEl = _vm.$refs.refDragTipElem;
19504
+ const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
19484
19505
  if (dragTipEl) {
19485
19506
  dragTipEl.style.display = 'block';
19486
- dragTipEl.style.top = `${Math.min(el.clientHeight + el.scrollTop - dragTipEl.clientHeight, evnt.clientY + el.scrollTop - wrapperRect.y)}px`;
19487
- dragTipEl.style.left = `${Math.min(el.clientWidth + el.scrollLeft - dragTipEl.clientWidth, evnt.clientX + el.scrollLeft - wrapperRect.x)}px`;
19507
+ dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
19508
+ dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`;
19488
19509
  dragTipEl.setAttribute('drag-status', showLine ? prevDragToChild ? 'sub' : 'normal' : 'disabled');
19489
19510
  }
19490
19511
  }
19491
- function panel_hideDropTip(_vm) {
19492
- const dragTipEl = _vm.$refs.refDragTipElem;
19493
- const dragLineEl = _vm.$refs.refDragLineElem;
19512
+ function panel_hideDropTip($xeTableCustomPanel) {
19513
+ const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
19514
+ const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
19494
19515
  if (dragTipEl) {
19495
19516
  dragTipEl.style.display = '';
19496
19517
  }
@@ -19498,9 +19519,12 @@ function panel_hideDropTip(_vm) {
19498
19519
  dragLineEl.style.display = '';
19499
19520
  }
19500
19521
  }
19501
- const renderDragTip = (h, _vm) => {
19502
- const $xeTable = _vm.$xeTable;
19503
- const dragCol = $xeTable.dragColumnRef;
19522
+ const renderDragTip = (h, $xeTableCustomPanel) => {
19523
+ const $xeTable = $xeTableCustomPanel.$xeTable;
19524
+ const customPanelReactData = $xeTableCustomPanel.reactData;
19525
+ const {
19526
+ dragTipText
19527
+ } = customPanelReactData;
19504
19528
  const columnDragOpts = $xeTable.computeColumnDragOpts;
19505
19529
  return h('div', {}, [h('div', {
19506
19530
  ref: 'refDragLineElem',
@@ -19518,18 +19542,22 @@ const renderDragTip = (h, _vm) => {
19518
19542
  class: ['vxe-table-custom-popup--drag-tip-normal-status', panel_getIcon().TABLE_DRAG_STATUS_ROW]
19519
19543
  }), h('span', {
19520
19544
  class: ['vxe-table-custom-popup--drag-tip-sub-status', panel_getIcon().TABLE_DRAG_STATUS_SUB_ROW]
19545
+ }), h('span', {
19546
+ class: ['vxe-table-custom-popup--drag-tip-group-status', panel_getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
19547
+ }), h('span', {
19548
+ class: ['vxe-table-custom-popup--drag-tip-values-status', panel_getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
19521
19549
  }), h('span', {
19522
19550
  class: ['vxe-table-custom-popup--drag-tip-disabled-status', panel_getIcon().TABLE_DRAG_DISABLED]
19523
19551
  })]), h('div', {
19524
19552
  class: 'vxe-table-custom-popup--drag-tip-content'
19525
- }, panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))])])]);
19553
+ }, `${dragTipText || ''}`)])])]);
19526
19554
  };
19527
19555
  const renderSimplePanel = (h, _vm) => {
19528
19556
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
19529
19557
  const props = _vm;
19530
19558
  const $xeTable = _vm.$xeTable;
19531
19559
  const tableProps = $xeTable;
19532
- const reactData = $xeTable;
19560
+ const tableReactData = $xeTable;
19533
19561
  const $xeGrid = $xeTable.$xeGrid;
19534
19562
  const {
19535
19563
  customStore
@@ -19542,7 +19570,7 @@ const renderSimplePanel = (h, _vm) => {
19542
19570
  const {
19543
19571
  isCustomStatus,
19544
19572
  customColumnList
19545
- } = reactData;
19573
+ } = tableReactData;
19546
19574
  const customOpts = $xeTable.computeCustomOpts;
19547
19575
  const {
19548
19576
  immediate
@@ -19626,9 +19654,9 @@ const renderSimplePanel = (h, _vm) => {
19626
19654
  title: panel_getI18n('vxe.custom.setting.colVisible')
19627
19655
  },
19628
19656
  on: {
19629
- click: () => {
19657
+ click: evnt => {
19630
19658
  if (!isDisabled) {
19631
- _vm.changeCheckboxOption(column);
19659
+ _vm.changeCheckboxOption(column, evnt);
19632
19660
  }
19633
19661
  }
19634
19662
  }
@@ -19674,8 +19702,10 @@ const renderSimplePanel = (h, _vm) => {
19674
19702
  title: panel_getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
19675
19703
  },
19676
19704
  on: {
19677
- click: () => {
19678
- _vm.changeFixedOption(column, 'left');
19705
+ click: ({
19706
+ $event
19707
+ }) => {
19708
+ _vm.changeFixedOption(column, 'left', $event);
19679
19709
  }
19680
19710
  }
19681
19711
  }), h(VxeUIButtonComponent, {
@@ -19687,8 +19717,10 @@ const renderSimplePanel = (h, _vm) => {
19687
19717
  title: panel_getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
19688
19718
  },
19689
19719
  on: {
19690
- click: () => {
19691
- _vm.changeFixedOption(column, 'right');
19720
+ click: ({
19721
+ $event
19722
+ }) => {
19723
+ _vm.changeFixedOption(column, 'right', $event);
19692
19724
  }
19693
19725
  }
19694
19726
  })]) : panel_renderEmptyElement($xeTable)]));
@@ -19702,11 +19734,15 @@ const renderSimplePanel = (h, _vm) => {
19702
19734
  style: maxHeight && !['left', 'right'].includes(placement || '') ? {
19703
19735
  maxHeight: `${maxHeight}px`
19704
19736
  } : {}
19705
- }, customStore.visible ? [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
19737
+ }, customStore.visible ? [h('div', {
19738
+ ref: 'refBodyWrapperElem',
19739
+ class: 'vxe-table-custom-body-wrapper'
19740
+ }, [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
19706
19741
  props: {
19707
19742
  customStore
19708
19743
  }
19709
19744
  }) : panel_renderEmptyElement($xeTable), h('div', {
19745
+ ref: 'refCustomBodyElem',
19710
19746
  class: 'vxe-table-custom--handle-wrapper'
19711
19747
  }, [h('div', {
19712
19748
  class: 'vxe-table-custom--header'
@@ -19732,7 +19768,6 @@ const renderSimplePanel = (h, _vm) => {
19732
19768
  }, panel_getI18n('vxe.toolbar.customAll'))]) : h('span', {
19733
19769
  class: 'vxe-checkbox--label'
19734
19770
  }, panel_getI18n('vxe.table.customTitle'))])])]), h('div', {
19735
- ref: 'bodyElemRef',
19736
19771
  class: 'vxe-table-custom--body'
19737
19772
  }, [topSlot ? h('div', {
19738
19773
  class: 'vxe-table-custom--panel-top'
@@ -19747,7 +19782,7 @@ const renderSimplePanel = (h, _vm) => {
19747
19782
  on: customWrapperOns
19748
19783
  }, colVNs), bottomSlot ? h('div', {
19749
19784
  class: 'vxe-table-custom--panel-bottom'
19750
- }, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)]), customOpts.showFooter ? h('div', {
19785
+ }, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable)]), customOpts.showFooter ? h('div', {
19751
19786
  class: 'vxe-table-custom--footer'
19752
19787
  }, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
19753
19788
  class: 'vxe-table-custom--footer-buttons'
@@ -19785,18 +19820,18 @@ const renderSimplePanel = (h, _vm) => {
19785
19820
  on: {
19786
19821
  click: _vm.confirmCustomEvent
19787
19822
  }
19788
- })])]) : null])] : []);
19823
+ })])]) : null]), renderDragTip(h, _vm)])] : []);
19789
19824
  };
19790
- const renderPopupPanel = (h, _vm) => {
19825
+ const renderPopupPanel = (h, $xeTableCustomPanel) => {
19791
19826
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
19792
19827
  const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
19793
19828
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
19794
19829
  const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
19795
- const $xeTableCustomPanel = _vm;
19796
- const props = _vm;
19797
- const $xeTable = _vm.$xeTable;
19830
+ const _vm = $xeTableCustomPanel;
19831
+ const props = $xeTableCustomPanel;
19832
+ const $xeTable = $xeTableCustomPanel.$xeTable;
19798
19833
  const tableProps = $xeTable;
19799
- const reactData = $xeTable;
19834
+ const tableReactData = $xeTable;
19800
19835
  const $xeGrid = $xeTable.$xeGrid;
19801
19836
  const {
19802
19837
  customStore
@@ -19807,7 +19842,7 @@ const renderPopupPanel = (h, _vm) => {
19807
19842
  const {
19808
19843
  isCustomStatus,
19809
19844
  customColumnList
19810
- } = reactData;
19845
+ } = tableReactData;
19811
19846
  const customOpts = $xeTable.computeCustomOpts;
19812
19847
  const {
19813
19848
  immediate
@@ -19914,9 +19949,9 @@ const renderPopupPanel = (h, _vm) => {
19914
19949
  title: panel_getI18n('vxe.custom.setting.colVisible')
19915
19950
  },
19916
19951
  on: {
19917
- click: () => {
19952
+ click: evnt => {
19918
19953
  if (!isDisabled) {
19919
- _vm.changeCheckboxOption(column);
19954
+ _vm.changeCheckboxOption(column, evnt);
19920
19955
  }
19921
19956
  }
19922
19957
  }
@@ -19995,8 +20030,11 @@ const renderPopupPanel = (h, _vm) => {
19995
20030
  }]
19996
20031
  },
19997
20032
  on: {
19998
- input(value) {
19999
- _vm.changeFixedOption(column, value);
20033
+ change({
20034
+ label,
20035
+ $event
20036
+ }) {
20037
+ _vm.changeFixedOption(column, label, $event);
20000
20038
  }
20001
20039
  }
20002
20040
  })]) : panel_renderEmptyElement($xeTable)]));
@@ -20004,12 +20042,12 @@ const renderPopupPanel = (h, _vm) => {
20004
20042
  });
20005
20043
  const scopedSlots = {
20006
20044
  default: () => {
20007
- if (defaultSlot) {
20008
- return $xeTable.callSlot(defaultSlot, params, h);
20009
- }
20010
20045
  return h('div', {
20011
- ref: 'bodyElemRef',
20012
- class: 'vxe-table-custom-popup--body'
20046
+ ref: 'refBodyWrapperElem',
20047
+ class: 'vxe-table-custom-popup--body-wrapper'
20048
+ }, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [h('div', {
20049
+ ref: 'refCustomBodyElem',
20050
+ class: 'vxe-table-custom-popup--handle-wrapper'
20013
20051
  }, [topSlot ? h('div', {
20014
20052
  class: 'vxe-table-custom-popup--table-top'
20015
20053
  }, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
@@ -20045,7 +20083,7 @@ const renderPopupPanel = (h, _vm) => {
20045
20083
  }
20046
20084
  }, trVNs)])]), bottomSlot ? h('div', {
20047
20085
  class: 'vxe-table-custom-popup--table-bottom'
20048
- }, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)]);
20086
+ }, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)])]);
20049
20087
  },
20050
20088
  footer: () => {
20051
20089
  if (footerSlot) {
@@ -20149,27 +20187,44 @@ const renderPopupPanel = (h, _vm) => {
20149
20187
  default: () => ({})
20150
20188
  }
20151
20189
  },
20190
+ provide() {
20191
+ const $xeTableCustomPanel = this;
20192
+ return {
20193
+ $xeTableCustomPanel
20194
+ };
20195
+ },
20152
20196
  inject: {
20153
20197
  $xeTable: {
20154
20198
  default: null
20155
20199
  }
20156
20200
  },
20157
20201
  data() {
20202
+ const reactData = {
20203
+ dragCol: null,
20204
+ dragTipText: ''
20205
+ };
20206
+ const internalData = {
20207
+ // prevDragCol: undefined,
20208
+ // prevDragGroup: undefined,
20209
+ // prevDragValues: undefined,
20210
+ // prevDragToChild: false,
20211
+ // prevDragPos: null
20212
+ };
20158
20213
  return {
20159
- prevDragCol: undefined,
20160
- prevDragToChild: false,
20161
- prevDragPos: null
20214
+ reactData,
20215
+ internalData
20162
20216
  };
20163
20217
  },
20164
20218
  computed: {},
20165
20219
  created() {
20220
+ const $xeTableCustomPanel = this;
20166
20221
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
20167
20222
  const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
20168
20223
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
20169
20224
  const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
20170
20225
  const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
20171
- this.$nextTick(() => {
20172
- const $xeTable = this.$xeTable;
20226
+ $xeTableCustomPanel.$nextTick(() => {
20227
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20173
20228
  const {
20174
20229
  customOpts
20175
20230
  } = $xeTable;
@@ -20194,16 +20249,18 @@ const renderPopupPanel = (h, _vm) => {
20194
20249
  });
20195
20250
  },
20196
20251
  render(h) {
20197
- const $xeTable = this.$xeTable;
20252
+ const $xeTableCustomPanel = this;
20253
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20198
20254
  const customOpts = $xeTable.computeCustomOpts;
20199
20255
  if (['modal', 'drawer', 'popup'].includes(`${customOpts.mode}`)) {
20200
- return renderPopupPanel(h, this);
20256
+ return renderPopupPanel(h, $xeTableCustomPanel);
20201
20257
  }
20202
- return renderSimplePanel(h, this);
20258
+ return renderSimplePanel(h, $xeTableCustomPanel);
20203
20259
  },
20204
20260
  methods: {
20205
20261
  handleWrapperMouseenterEvent(evnt) {
20206
- const $xeTable = this.$xeTable;
20262
+ const $xeTableCustomPanel = this;
20263
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20207
20264
  const {
20208
20265
  customStore
20209
20266
  } = this;
@@ -20211,10 +20268,12 @@ const renderPopupPanel = (h, _vm) => {
20211
20268
  $xeTable.customOpenEvent(evnt);
20212
20269
  },
20213
20270
  handleWrapperMouseleaveEvent(evnt) {
20214
- const $xeTable = this.$xeTable;
20271
+ const $xeTableCustomPanel = this;
20272
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20273
+ const props = $xeTableCustomPanel;
20215
20274
  const {
20216
20275
  customStore
20217
- } = this;
20276
+ } = props;
20218
20277
  customStore.activeWrapper = false;
20219
20278
  setTimeout(() => {
20220
20279
  if (!customStore.activeBtn && !customStore.activeWrapper) {
@@ -20228,9 +20287,10 @@ const renderPopupPanel = (h, _vm) => {
20228
20287
  confirmCustomEvent({
20229
20288
  $event
20230
20289
  }) {
20231
- const $xeTable = this.$xeTable;
20232
- const reactData = $xeTable;
20233
- reactData.isCustomStatus = true;
20290
+ const $xeTableCustomPanel = this;
20291
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20292
+ const tableReactData = $xeTable;
20293
+ tableReactData.isCustomStatus = true;
20234
20294
  $xeTable.saveCustom();
20235
20295
  $xeTable.closeCustom();
20236
20296
  $xeTable.emitCustomEvent('confirm', $event);
@@ -20238,20 +20298,23 @@ const renderPopupPanel = (h, _vm) => {
20238
20298
  cancelCloseEvent({
20239
20299
  $event
20240
20300
  }) {
20241
- const $xeTable = this.$xeTable;
20301
+ const $xeTableCustomPanel = this;
20302
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20242
20303
  $xeTable.closeCustom();
20243
20304
  $xeTable.emitCustomEvent('close', $event);
20244
20305
  },
20245
20306
  cancelCustomEvent({
20246
20307
  $event
20247
20308
  }) {
20248
- const $xeTable = this.$xeTable;
20309
+ const $xeTableCustomPanel = this;
20310
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20249
20311
  $xeTable.cancelCustom();
20250
20312
  $xeTable.closeCustom();
20251
20313
  $xeTable.emitCustomEvent('cancel', $event);
20252
20314
  },
20253
20315
  handleResetCustomEvent(evnt) {
20254
- const $xeTable = this.$xeTable;
20316
+ const $xeTableCustomPanel = this;
20317
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20255
20318
  $xeTable.resetCustom(true);
20256
20319
  $xeTable.closeCustom();
20257
20320
  $xeTable.emitCustomEvent('reset', evnt);
@@ -20271,27 +20334,13 @@ const renderPopupPanel = (h, _vm) => {
20271
20334
  this.handleResetCustomEvent(evnt);
20272
20335
  }
20273
20336
  },
20274
- resetPopupCustomEvent(evnt) {
20275
- if (core_.VxeUI.modal) {
20276
- core_.VxeUI.modal.confirm({
20277
- content: panel_getI18n('vxe.custom.cstmConfirmRestore'),
20278
- className: 'vxe-table--ignore-clear',
20279
- escClosable: true
20280
- }).then(type => {
20281
- if (type === 'confirm') {
20282
- this.resetCustomEvent(evnt);
20283
- }
20284
- });
20285
- } else {
20286
- this.resetCustomEvent(evnt);
20287
- }
20288
- },
20289
20337
  handleOptionCheck(column) {
20290
- const $xeTable = this.$xeTable;
20291
- const reactData = $xeTable;
20338
+ const $xeTableCustomPanel = this;
20339
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20340
+ const tableReactData = $xeTable;
20292
20341
  const {
20293
20342
  customColumnList
20294
- } = reactData;
20343
+ } = tableReactData;
20295
20344
  const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(customColumnList, item => item === column);
20296
20345
  if (matchObj && matchObj.parent) {
20297
20346
  const {
@@ -20304,9 +20353,10 @@ const renderPopupPanel = (h, _vm) => {
20304
20353
  }
20305
20354
  }
20306
20355
  },
20307
- changeCheckboxOption(column) {
20308
- const $xeTable = this.$xeTable;
20309
- const reactData = $xeTable;
20356
+ changeCheckboxOption(column, evnt) {
20357
+ const $xeTableCustomPanel = this;
20358
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20359
+ const tableReactData = $xeTable;
20310
20360
  const customOpts = $xeTable.computeCustomOpts;
20311
20361
  const isChecked = !column.renderVisible;
20312
20362
  if (customOpts.immediate) {
@@ -20315,7 +20365,7 @@ const renderPopupPanel = (h, _vm) => {
20315
20365
  item.renderVisible = isChecked;
20316
20366
  item.halfVisible = false;
20317
20367
  });
20318
- reactData.isCustomStatus = true;
20368
+ tableReactData.isCustomStatus = true;
20319
20369
  $xeTable.handleCustom();
20320
20370
  $xeTable.saveCustomStore('update:visible');
20321
20371
  } else {
@@ -20326,63 +20376,114 @@ const renderPopupPanel = (h, _vm) => {
20326
20376
  }
20327
20377
  this.handleOptionCheck(column);
20328
20378
  $xeTable.checkCustomStatus();
20379
+ $xeTable.dispatchEvent('custom-visible-change', {
20380
+ column,
20381
+ checked: isChecked
20382
+ }, evnt);
20329
20383
  },
20330
20384
  changeColumnWidth(column) {
20331
- const $xeTable = this.$xeTable;
20332
- const reactData = $xeTable;
20385
+ const $xeTableCustomPanel = this;
20386
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20387
+ const tableReactData = $xeTable;
20333
20388
  const customOpts = $xeTable.computeCustomOpts;
20334
20389
  if (customOpts.immediate) {
20335
20390
  if (column.renderResizeWidth !== column.renderWidth) {
20336
20391
  column.resizeWidth = column.renderResizeWidth;
20337
20392
  column.renderWidth = column.renderResizeWidth;
20338
- reactData.isCustomStatus = true;
20393
+ tableReactData.isCustomStatus = true;
20339
20394
  $xeTable.handleCustom();
20340
20395
  $xeTable.saveCustomStore('update:width');
20341
20396
  }
20342
20397
  }
20343
20398
  },
20344
- changeFixedOption(column, colFixed) {
20345
- const $xeTable = this.$xeTable;
20346
- const reactData = $xeTable;
20399
+ changeFixedOption(column, colFixed, evnt) {
20400
+ const $xeTableCustomPanel = this;
20401
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20402
+ const tableReactData = $xeTable;
20347
20403
  const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
20348
20404
  const customOpts = $xeTable.computeCustomOpts;
20405
+ let targetFixed = null;
20349
20406
  if (customOpts.immediate) {
20350
20407
  if (column.renderFixed === colFixed) {
20408
+ targetFixed = '';
20351
20409
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
20352
20410
  col.fixed = '';
20353
20411
  col.renderFixed = '';
20354
20412
  });
20355
20413
  } else {
20356
20414
  if (!isMaxFixedColumn || column.renderFixed) {
20415
+ targetFixed = colFixed;
20357
20416
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
20358
20417
  col.fixed = colFixed;
20359
20418
  col.renderFixed = colFixed;
20360
20419
  });
20361
20420
  }
20362
20421
  }
20363
- reactData.isCustomStatus = true;
20422
+ tableReactData.isCustomStatus = true;
20364
20423
  $xeTable.handleCustom();
20365
20424
  $xeTable.saveCustomStore('update:fixed');
20366
20425
  } else {
20367
20426
  if (column.renderFixed === colFixed) {
20427
+ targetFixed = '';
20368
20428
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
20369
20429
  col.renderFixed = '';
20370
20430
  });
20371
20431
  } else {
20372
20432
  if (!isMaxFixedColumn || column.renderFixed) {
20433
+ targetFixed = colFixed;
20373
20434
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
20374
20435
  col.renderFixed = colFixed;
20375
20436
  });
20376
20437
  }
20377
20438
  }
20378
20439
  }
20440
+ if (!targetFixed !== null) {
20441
+ $xeTable.dispatchEvent('custom-fixed-change', {
20442
+ column,
20443
+ fixed: targetFixed
20444
+ }, evnt);
20445
+ }
20379
20446
  },
20380
- allOptionEvent() {
20381
- const $xeTable = this.$xeTable;
20447
+ allOptionEvent(evnt) {
20448
+ const $xeTableCustomPanel = this;
20449
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20450
+ const tableReactData = $xeTable;
20451
+ const {
20452
+ customStore
20453
+ } = tableReactData;
20454
+ const isAll = !customStore.isAll;
20382
20455
  $xeTable.toggleCustomAllCheckbox();
20456
+ $xeTable.dispatchEvent('custom-visible-all', {
20457
+ checked: isAll
20458
+ }, evnt);
20459
+ },
20460
+ updateColDropTipContent() {
20461
+ const $xeTableCustomPanel = this;
20462
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20463
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20464
+ const {
20465
+ dragCol
20466
+ } = customPanelReactData;
20467
+ const columnDragOpts = $xeTable.computeColumnDragOpts;
20468
+ const {
20469
+ tooltipMethod
20470
+ } = columnDragOpts;
20471
+ let tipContent = '';
20472
+ if (tooltipMethod) {
20473
+ const dtParams = {
20474
+ $table: $xeTable,
20475
+ column: dragCol
20476
+ };
20477
+ tipContent = `${tooltipMethod(dtParams) || ''}`;
20478
+ } else {
20479
+ tipContent = panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']);
20480
+ }
20481
+ customPanelReactData.dragTipText = tipContent;
20383
20482
  },
20384
20483
  sortMousedownEvent(evnt) {
20385
- const $xeTable = this.$xeTable;
20484
+ const $xeTableCustomPanel = this;
20485
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20486
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20386
20487
  const btnEl = evnt.currentTarget;
20387
20488
  const cellEl = btnEl.parentElement;
20388
20489
  const tdEl = cellEl.parentElement;
@@ -20390,44 +20491,48 @@ const renderPopupPanel = (h, _vm) => {
20390
20491
  const colid = trEl.getAttribute('colid');
20391
20492
  const column = $xeTable.getColumnById(colid);
20392
20493
  trEl.draggable = true;
20393
- this.dragCol = column;
20494
+ customPanelReactData.dragCol = column;
20495
+ this.updateColDropTipContent();
20394
20496
  addClass(trEl, 'active--drag-origin');
20395
20497
  },
20396
20498
  sortMouseupEvent(evnt) {
20499
+ const $xeTableCustomPanel = this;
20500
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20397
20501
  const btnEl = evnt.currentTarget;
20398
20502
  const cellEl = btnEl.parentElement;
20399
20503
  const tdEl = cellEl.parentElement;
20400
20504
  const trEl = tdEl.parentElement;
20401
- panel_hideDropTip(this);
20505
+ panel_hideDropTip($xeTableCustomPanel);
20402
20506
  trEl.draggable = false;
20403
- this.dragCol = null;
20507
+ customPanelReactData.dragCol = null;
20404
20508
  removeClass(trEl, 'active--drag-origin');
20405
20509
  },
20406
20510
  sortDragstartEvent(evnt) {
20511
+ const $xeTableCustomPanel = this;
20512
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
20407
20513
  if (evnt.dataTransfer) {
20408
20514
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
20409
20515
  }
20516
+ customPanelInternalData.prevDragGroup = null;
20517
+ customPanelInternalData.prevDragValues = null;
20410
20518
  },
20411
20519
  sortDragendEvent(evnt) {
20412
- const $xeTable = this.$xeTable;
20520
+ const $xeTableCustomPanel = this;
20521
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20413
20522
  const tableProps = $xeTable;
20414
- const reactData = $xeTable;
20415
- const internalData = $xeTable;
20416
- const {
20417
- dragCol,
20418
- prevDragPos,
20419
- prevDragCol,
20420
- prevDragToChild
20421
- } = this;
20523
+ const tableReactData = $xeTable;
20524
+ const tableInternalData = $xeTable;
20525
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20526
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
20422
20527
  const {
20423
20528
  mouseConfig
20424
20529
  } = tableProps;
20425
20530
  const {
20426
20531
  customColumnList
20427
- } = reactData;
20532
+ } = tableReactData;
20428
20533
  const {
20429
20534
  collectColumn
20430
- } = internalData;
20535
+ } = tableInternalData;
20431
20536
  const customOpts = $xeTable.computeCustomOpts;
20432
20537
  const {
20433
20538
  immediate
@@ -20440,8 +20545,22 @@ const renderPopupPanel = (h, _vm) => {
20440
20545
  isToChildDrag,
20441
20546
  dragEndMethod
20442
20547
  } = columnDragOpts;
20548
+ const {
20549
+ dragCol
20550
+ } = customPanelReactData;
20551
+ const {
20552
+ prevDragCol,
20553
+ prevDragGroup,
20554
+ prevDragValues,
20555
+ prevDragPos,
20556
+ prevDragToChild
20557
+ } = customPanelInternalData;
20443
20558
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
20444
- if (prevDragCol && dragCol) {
20559
+ if (prevDragGroup || prevDragValues) {
20560
+ if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
20561
+ $xeTable.handlePivotTableAggregatePanelDragendEvent(evnt);
20562
+ }
20563
+ } else if (prevDragCol && dragCol) {
20445
20564
  // 判断是否有拖动
20446
20565
  if (prevDragCol !== dragCol) {
20447
20566
  const dragColumn = dragCol;
@@ -20567,7 +20686,7 @@ const renderPopupPanel = (h, _vm) => {
20567
20686
  nafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id === newColumn.id);
20568
20687
  customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
20569
20688
  }
20570
- reactData.isDragColMove = true;
20689
+ tableReactData.isDragColMove = true;
20571
20690
  if (mouseConfig) {
20572
20691
  if ($xeTable.clearSelected) {
20573
20692
  $xeTable.clearSelected();
@@ -20589,24 +20708,29 @@ const renderPopupPanel = (h, _vm) => {
20589
20708
  }
20590
20709
  }, evnt);
20591
20710
  if (immediate) {
20592
- reactData.customColumnList = collectColumn.slice(0);
20711
+ tableReactData.customColumnList = collectColumn.slice(0);
20593
20712
  $xeTable.handleColDragSwapColumn();
20594
20713
  }
20595
20714
  }).catch(() => {});
20596
20715
  }
20597
20716
  }
20598
- panel_hideDropTip(this);
20599
- this.dragCol.value = null;
20717
+ panel_hideDropTip($xeTableCustomPanel);
20718
+ customPanelReactData.dragCol = null;
20719
+ customPanelInternalData.prevDragGroup = null;
20720
+ customPanelInternalData.prevDragValues = null;
20600
20721
  trEl.draggable = false;
20601
20722
  trEl.removeAttribute('drag-pos');
20602
20723
  removeClass(trEl, 'active--drag-target');
20603
20724
  removeClass(trEl, 'active--drag-origin');
20604
20725
  },
20605
20726
  sortDragoverEvent(evnt) {
20606
- const $xeTable = this.$xeTable;
20727
+ const $xeTableCustomPanel = this;
20728
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20729
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20730
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
20607
20731
  const {
20608
20732
  dragCol
20609
- } = this;
20733
+ } = customPanelReactData;
20610
20734
  const customOpts = $xeTable.computeCustomOpts;
20611
20735
  const {
20612
20736
  immediate
@@ -20620,19 +20744,21 @@ const renderPopupPanel = (h, _vm) => {
20620
20744
  const isControlKey = hasControlKey(evnt);
20621
20745
  const colid = optEl.getAttribute('colid');
20622
20746
  const column = $xeTable.getColumnById(colid);
20747
+ customPanelInternalData.prevDragGroup = null;
20748
+ customPanelInternalData.prevDragValues = null;
20623
20749
  // 是否移入有效列
20624
20750
  if (column && (isCrossDrag || column.level === 1)) {
20625
20751
  evnt.preventDefault();
20626
20752
  const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
20627
20753
  const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
20628
20754
  if (dragCol && dragCol.id === column.id || !isCrossDrag && column.level > 1 || !immediate && column.level > 1 || column.renderFixed) {
20629
- panel_showDropTip(this, evnt, optEl, false, dragPos);
20755
+ panel_showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos);
20630
20756
  return;
20631
20757
  }
20632
- this.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
20633
- this.prevDragCol = column;
20634
- this.prevDragPos = dragPos;
20635
- panel_showDropTip(this, evnt, optEl, true, dragPos);
20758
+ customPanelInternalData.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
20759
+ customPanelInternalData.prevDragCol = column;
20760
+ customPanelInternalData.prevDragPos = dragPos;
20761
+ panel_showDropTip($xeTableCustomPanel, evnt, optEl, true, dragPos);
20636
20762
  }
20637
20763
  }
20638
20764
  }
@@ -23496,27 +23622,63 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23496
23622
  },
23497
23623
  _getActiveRecord() {
23498
23624
  const $xeTable = this;
23499
- warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
23500
- // 即将废弃
23501
- return $xeTable.getEditRecord();
23625
+ const reactData = $xeTable;
23626
+ const internalData = $xeTable;
23627
+ warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditCell']);
23628
+ const {
23629
+ editStore
23630
+ } = reactData;
23631
+ const {
23632
+ fullAllDataRowIdData
23633
+ } = internalData;
23634
+ const {
23635
+ args,
23636
+ row
23637
+ } = editStore.actived;
23638
+ if (args && row && fullAllDataRowIdData[getRowid($xeTable, row)]) {
23639
+ return Object.assign({}, args, {
23640
+ row
23641
+ });
23642
+ }
23643
+ return null;
23502
23644
  },
23503
23645
  _getEditRecord() {
23504
23646
  const $xeTable = this;
23505
23647
  const reactData = $xeTable;
23506
23648
  const internalData = $xeTable;
23649
+ warnLog('vxe.error.delFunc', ['getEditRecord', 'getEditCell']);
23507
23650
  const {
23508
23651
  editStore
23509
23652
  } = reactData;
23510
23653
  const {
23511
- afterFullData
23654
+ fullAllDataRowIdData
23512
23655
  } = internalData;
23513
- const el = $xeTable.$refs.refElem;
23514
23656
  const {
23515
23657
  args,
23516
23658
  row
23517
23659
  } = editStore.actived;
23518
- if (args && $xeTable.findRowIndexOf(afterFullData, row) > -1 && el.querySelectorAll('.vxe-body--column.col--active').length) {
23519
- return Object.assign({}, args);
23660
+ if (args && row && fullAllDataRowIdData[getRowid($xeTable, row)]) {
23661
+ return Object.assign({}, args, {
23662
+ row
23663
+ });
23664
+ }
23665
+ return null;
23666
+ },
23667
+ _getEditCell() {
23668
+ const $xeTable = this;
23669
+ const reactData = $xeTable;
23670
+ const {
23671
+ editStore
23672
+ } = reactData;
23673
+ const {
23674
+ row,
23675
+ column
23676
+ } = editStore.actived;
23677
+ if (column && row) {
23678
+ return {
23679
+ row,
23680
+ column
23681
+ };
23520
23682
  }
23521
23683
  return null;
23522
23684
  },
@@ -23721,11 +23883,14 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23721
23883
  editStore
23722
23884
  } = reactData;
23723
23885
  const {
23724
- args,
23886
+ row,
23725
23887
  column
23726
23888
  } = editStore.selected;
23727
- if (args && column) {
23728
- return Object.assign({}, args);
23889
+ if (row && column) {
23890
+ return {
23891
+ row,
23892
+ column
23893
+ };
23729
23894
  }
23730
23895
  return null;
23731
23896
  },
@@ -23864,11 +24029,20 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
23864
24029
  const childrenField = treeOpts.children || treeOpts.childrenField;
23865
24030
  // 如果是树表格只允许导出数据源
23866
24031
  const rest = [];
23867
- const expandMaps = new Map();
24032
+ const expandMaps = {};
24033
+ const useMaps = {};
24034
+ const {
24035
+ handleGetRowId
24036
+ } = createHandleGetRowId($xeTable);
23868
24037
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(datas, (item, $rowIndex, items, path, parent, nodes) => {
23869
24038
  const row = item._row || item;
24039
+ const rowid = handleGetRowId(row);
24040
+ if (useMaps[rowid]) {
24041
+ return;
24042
+ }
23870
24043
  const parentRow = parent && parent._row ? parent._row : parent;
23871
- if (isAllExpand || !parentRow || expandMaps.has(parentRow) && $xeTable.isTreeExpandByRow(parentRow)) {
24044
+ const pRowid = parentRow ? handleGetRowId(parentRow) : '';
24045
+ if (isAllExpand || !parentRow || expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)) {
23872
24046
  const hasRowChild = hasTreeChildren($xeTable, row);
23873
24047
  const item = {
23874
24048
  _row: row,
@@ -23939,7 +24113,10 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
23939
24113
  }
23940
24114
  item[column.id] = toStringValue(cellValue);
23941
24115
  });
23942
- expandMaps.set(row, 1);
24116
+ useMaps[rowid] = true;
24117
+ if (pRowid) {
24118
+ expandMaps[pRowid] = true;
24119
+ }
23943
24120
  rest.push(Object.assign(item, row));
23944
24121
  }
23945
24122
  }, {
@@ -25092,6 +25269,7 @@ const convertToRows = originColumns => {
25092
25269
  const {
25093
25270
  tableFullColumn,
25094
25271
  afterFullData,
25272
+ afterTreeFullData,
25095
25273
  collectColumn,
25096
25274
  mergeBodyList,
25097
25275
  mergeFooterList
@@ -25367,8 +25545,10 @@ const convertToRows = originColumns => {
25367
25545
  }
25368
25546
  }
25369
25547
  } else if (mode === 'current') {
25370
- handleOptions.data = afterFullData;
25548
+ handleOptions.data = treeConfig ? afterTreeFullData : afterFullData;
25371
25549
  }
25550
+ } else {
25551
+ handleOptions._isCustomData = true;
25372
25552
  }
25373
25553
  return handleExport($xeTable, handleOptions);
25374
25554
  },
@@ -26951,6 +27131,17 @@ function emitCustomEvent($xeTable, type, evnt) {
26951
27131
  }
26952
27132
  return $xeTable.$nextTick();
26953
27133
  },
27134
+ _toggleCustom() {
27135
+ const $xeTable = this;
27136
+ const reactData = $xeTable;
27137
+ const {
27138
+ customStore
27139
+ } = reactData;
27140
+ if (customStore.visible) {
27141
+ return $xeTable.closeCustom();
27142
+ }
27143
+ return $xeTable.openCustom();
27144
+ },
26954
27145
  _saveCustom() {
26955
27146
  const $xeTable = this;
26956
27147
  const reactData = $xeTable;