vxe-table 3.15.43 → 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.1750301122777.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 +23 -7
  14. package/es/table/style.css +37 -9
  15. package/es/table/style.min.css +1 -1
  16. package/es/ui/index.js +7 -3
  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.1750301122777.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 +355 -151
  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 +30 -7
  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 +7 -3
  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 +26 -7
  56. package/packages/ui/index.ts +6 -2
  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.1750301122777.woff +0 -0
  64. package/es/iconfont.1750301122777.woff2 +0 -0
  65. package/lib/iconfont.1750301122777.woff +0 -0
  66. package/lib/iconfont.1750301122777.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.43";
2005
+ const version = "3.15.45";
2006
2006
  core_.VxeUI.version = version;
2007
2007
  core_.VxeUI.tableVersion = version;
2008
2008
  core_.VxeUI.setConfig({
@@ -2212,13 +2212,13 @@ core_.VxeUI.setConfig({
2212
2212
  isReplace: true
2213
2213
  },
2214
2214
  virtualXConfig: {
2215
- enabled: true,
2215
+ // enabled: false,
2216
2216
  gt: 24,
2217
2217
  preSize: 0,
2218
2218
  oSize: 0
2219
2219
  },
2220
2220
  virtualYConfig: {
2221
- enabled: true,
2221
+ // enabled: false,
2222
2222
  gt: 100,
2223
2223
  preSize: 1,
2224
2224
  oSize: 0
@@ -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.43"}`;
2665
+ const log_version = `table v${"3.15.45"}`;
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) {
@@ -5346,7 +5350,7 @@ function restoreCustomStorage($xeTable) {
5346
5350
  const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
5347
5351
  const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
5348
5352
  const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
5349
- if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
5353
+ if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
5350
5354
  if (!tableId) {
5351
5355
  errLog('vxe.error.reqProp', ['id']);
5352
5356
  return;
@@ -10915,7 +10919,7 @@ const Methods = {
10915
10919
  const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
10916
10920
  const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
10917
10921
  const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
10918
- if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
10922
+ if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
10919
10923
  if (!tableId) {
10920
10924
  errLog('vxe.error.reqProp', ['id']);
10921
10925
  return;
@@ -10971,7 +10975,9 @@ const Methods = {
10971
10975
  fixedData: undefined
10972
10976
  };
10973
10977
  if (!id) {
10974
- errLog('vxe.error.reqProp', ['id']);
10978
+ if (storage) {
10979
+ errLog('vxe.error.reqProp', ['id']);
10980
+ }
10975
10981
  return storeData;
10976
10982
  }
10977
10983
  let hasResizable = 0;
@@ -11048,7 +11054,7 @@ const Methods = {
11048
11054
  if (type !== 'reset') {
11049
11055
  reactData.isCustomStatus = true;
11050
11056
  }
11051
- if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
11057
+ if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
11052
11058
  if (!tableId) {
11053
11059
  errLog('vxe.error.reqProp', ['id']);
11054
11060
  return this.$nextTick();
@@ -13137,7 +13143,7 @@ const Methods = {
13137
13143
  }
13138
13144
  vLen++;
13139
13145
  });
13140
- const isSelected = sLen >= vLen;
13146
+ const isSelected = selectCheckboxMaps[rowid] || sLen >= vLen && (vLen >= 1 || hLen >= 1);
13141
13147
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
13142
13148
  if (checkField) {
13143
13149
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, isSelected);
@@ -15559,6 +15565,27 @@ const Methods = {
15559
15565
  } = reactData;
15560
15566
  return isRowGroupStatus && row.isAggregate;
15561
15567
  },
15568
+ getAggregateContentByRow(row) {
15569
+ const $xeTable = this;
15570
+ const reactData = $xeTable;
15571
+ const {
15572
+ isRowGroupStatus
15573
+ } = reactData;
15574
+ return isRowGroupStatus && row && row.isAggregate ? row.groupContent : '';
15575
+ },
15576
+ getAggregateRowChildren(row) {
15577
+ const $xeTable = this;
15578
+ const reactData = $xeTable;
15579
+ const aggregateOpts = $xeTable.computeAggregateOpts;
15580
+ const {
15581
+ childrenField,
15582
+ mapChildrenField
15583
+ } = aggregateOpts;
15584
+ const {
15585
+ isRowGroupStatus
15586
+ } = reactData;
15587
+ return isRowGroupStatus && row && row.isAggregate && childrenField && mapChildrenField ? row[mapChildrenField] || [] : [];
15588
+ },
15562
15589
  isAggregateExpandByRow(row) {
15563
15590
  const $xeTable = this;
15564
15591
  const reactData = $xeTable;
@@ -17172,7 +17199,7 @@ const Methods = {
17172
17199
  }
17173
17200
  };
17174
17201
  // Module methods
17175
- 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(',');
17202
+ 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(',');
17176
17203
  funcs.forEach(name => {
17177
17204
  Methods[name] = function (...args) {
17178
17205
  if (!this[`_${name}`]) {
@@ -17182,7 +17209,7 @@ funcs.forEach(name => {
17182
17209
  errLog('vxe.error.reqModule', ['Validator']);
17183
17210
  } else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
17184
17211
  errLog('vxe.error.reqModule', ['Filter']);
17185
- } else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
17212
+ } 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)) {
17186
17213
  errLog('vxe.error.reqModule', ['Edit']);
17187
17214
  } else if ('openCustom'.split(',').includes(name)) {
17188
17215
  errLog('vxe.error.reqModule', ['Custom']);
@@ -19432,22 +19459,29 @@ const {
19432
19459
  getIcon: panel_getIcon,
19433
19460
  renderEmptyElement: panel_renderEmptyElement
19434
19461
  } = core_.VxeUI;
19435
- function panel_showDropTip(_vm, evnt, optEl, showLine, dragPos) {
19436
- const {
19437
- prevDragToChild
19438
- } = _vm;
19439
- const el = _vm.$refs.bodyElemRef;
19440
- if (!el) {
19462
+ function panel_showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos) {
19463
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
19464
+ const bodyWrapperElem = $xeTableCustomPanel.$refs.refBodyWrapperElem;
19465
+ if (!bodyWrapperElem) {
19441
19466
  return;
19442
19467
  }
19443
- const wrapperRect = el.getBoundingClientRect();
19468
+ const customBodyElem = $xeTableCustomPanel.$refs.refCustomBodyElem;
19469
+ if (!customBodyElem) {
19470
+ return;
19471
+ }
19472
+ const {
19473
+ prevDragToChild
19474
+ } = customPanelInternalData;
19475
+ const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
19476
+ const customBodyRect = customBodyElem.getBoundingClientRect();
19444
19477
  if (optEl) {
19445
- const dragLineEl = _vm.$refs.refDragLineElem;
19478
+ const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
19446
19479
  if (dragLineEl) {
19447
19480
  if (showLine) {
19448
19481
  const optRect = optEl.getBoundingClientRect();
19449
19482
  dragLineEl.style.display = 'block';
19450
- dragLineEl.style.top = `${Math.max(1, optRect.y + el.scrollTop - wrapperRect.y)}px`;
19483
+ dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`;
19484
+ dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
19451
19485
  dragLineEl.style.height = `${optRect.height}px`;
19452
19486
  dragLineEl.style.width = `${optRect.width}px`;
19453
19487
  dragLineEl.setAttribute('drag-pos', dragPos);
@@ -19457,17 +19491,17 @@ function panel_showDropTip(_vm, evnt, optEl, showLine, dragPos) {
19457
19491
  }
19458
19492
  }
19459
19493
  }
19460
- const dragTipEl = _vm.$refs.refDragTipElem;
19494
+ const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
19461
19495
  if (dragTipEl) {
19462
19496
  dragTipEl.style.display = 'block';
19463
- dragTipEl.style.top = `${Math.min(el.clientHeight + el.scrollTop - dragTipEl.clientHeight, evnt.clientY + el.scrollTop - wrapperRect.y)}px`;
19464
- dragTipEl.style.left = `${Math.min(el.clientWidth + el.scrollLeft - dragTipEl.clientWidth, evnt.clientX + el.scrollLeft - wrapperRect.x)}px`;
19497
+ dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
19498
+ dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`;
19465
19499
  dragTipEl.setAttribute('drag-status', showLine ? prevDragToChild ? 'sub' : 'normal' : 'disabled');
19466
19500
  }
19467
19501
  }
19468
- function panel_hideDropTip(_vm) {
19469
- const dragTipEl = _vm.$refs.refDragTipElem;
19470
- const dragLineEl = _vm.$refs.refDragLineElem;
19502
+ function panel_hideDropTip($xeTableCustomPanel) {
19503
+ const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
19504
+ const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
19471
19505
  if (dragTipEl) {
19472
19506
  dragTipEl.style.display = '';
19473
19507
  }
@@ -19475,9 +19509,12 @@ function panel_hideDropTip(_vm) {
19475
19509
  dragLineEl.style.display = '';
19476
19510
  }
19477
19511
  }
19478
- const renderDragTip = (h, _vm) => {
19479
- const $xeTable = _vm.$xeTable;
19480
- const dragCol = $xeTable.dragColumnRef;
19512
+ const renderDragTip = (h, $xeTableCustomPanel) => {
19513
+ const $xeTable = $xeTableCustomPanel.$xeTable;
19514
+ const customPanelReactData = $xeTableCustomPanel.reactData;
19515
+ const {
19516
+ dragTipText
19517
+ } = customPanelReactData;
19481
19518
  const columnDragOpts = $xeTable.computeColumnDragOpts;
19482
19519
  return h('div', {}, [h('div', {
19483
19520
  ref: 'refDragLineElem',
@@ -19495,18 +19532,22 @@ const renderDragTip = (h, _vm) => {
19495
19532
  class: ['vxe-table-custom-popup--drag-tip-normal-status', panel_getIcon().TABLE_DRAG_STATUS_ROW]
19496
19533
  }), h('span', {
19497
19534
  class: ['vxe-table-custom-popup--drag-tip-sub-status', panel_getIcon().TABLE_DRAG_STATUS_SUB_ROW]
19535
+ }), h('span', {
19536
+ class: ['vxe-table-custom-popup--drag-tip-group-status', panel_getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
19537
+ }), h('span', {
19538
+ class: ['vxe-table-custom-popup--drag-tip-values-status', panel_getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
19498
19539
  }), h('span', {
19499
19540
  class: ['vxe-table-custom-popup--drag-tip-disabled-status', panel_getIcon().TABLE_DRAG_DISABLED]
19500
19541
  })]), h('div', {
19501
19542
  class: 'vxe-table-custom-popup--drag-tip-content'
19502
- }, panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))])])]);
19543
+ }, `${dragTipText || ''}`)])])]);
19503
19544
  };
19504
19545
  const renderSimplePanel = (h, _vm) => {
19505
19546
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
19506
19547
  const props = _vm;
19507
19548
  const $xeTable = _vm.$xeTable;
19508
19549
  const tableProps = $xeTable;
19509
- const reactData = $xeTable;
19550
+ const tableReactData = $xeTable;
19510
19551
  const $xeGrid = $xeTable.$xeGrid;
19511
19552
  const {
19512
19553
  customStore
@@ -19519,7 +19560,7 @@ const renderSimplePanel = (h, _vm) => {
19519
19560
  const {
19520
19561
  isCustomStatus,
19521
19562
  customColumnList
19522
- } = reactData;
19563
+ } = tableReactData;
19523
19564
  const customOpts = $xeTable.computeCustomOpts;
19524
19565
  const {
19525
19566
  immediate
@@ -19603,9 +19644,9 @@ const renderSimplePanel = (h, _vm) => {
19603
19644
  title: panel_getI18n('vxe.custom.setting.colVisible')
19604
19645
  },
19605
19646
  on: {
19606
- click: () => {
19647
+ click: evnt => {
19607
19648
  if (!isDisabled) {
19608
- _vm.changeCheckboxOption(column);
19649
+ _vm.changeCheckboxOption(column, evnt);
19609
19650
  }
19610
19651
  }
19611
19652
  }
@@ -19651,8 +19692,10 @@ const renderSimplePanel = (h, _vm) => {
19651
19692
  title: panel_getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
19652
19693
  },
19653
19694
  on: {
19654
- click: () => {
19655
- _vm.changeFixedOption(column, 'left');
19695
+ click: ({
19696
+ $event
19697
+ }) => {
19698
+ _vm.changeFixedOption(column, 'left', $event);
19656
19699
  }
19657
19700
  }
19658
19701
  }), h(VxeUIButtonComponent, {
@@ -19664,8 +19707,10 @@ const renderSimplePanel = (h, _vm) => {
19664
19707
  title: panel_getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
19665
19708
  },
19666
19709
  on: {
19667
- click: () => {
19668
- _vm.changeFixedOption(column, 'right');
19710
+ click: ({
19711
+ $event
19712
+ }) => {
19713
+ _vm.changeFixedOption(column, 'right', $event);
19669
19714
  }
19670
19715
  }
19671
19716
  })]) : panel_renderEmptyElement($xeTable)]));
@@ -19679,11 +19724,15 @@ const renderSimplePanel = (h, _vm) => {
19679
19724
  style: maxHeight && !['left', 'right'].includes(placement || '') ? {
19680
19725
  maxHeight: `${maxHeight}px`
19681
19726
  } : {}
19682
- }, customStore.visible ? [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
19727
+ }, customStore.visible ? [h('div', {
19728
+ ref: 'refBodyWrapperElem',
19729
+ class: 'vxe-table-custom-body-wrapper'
19730
+ }, [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
19683
19731
  props: {
19684
19732
  customStore
19685
19733
  }
19686
19734
  }) : panel_renderEmptyElement($xeTable), h('div', {
19735
+ ref: 'refCustomBodyElem',
19687
19736
  class: 'vxe-table-custom--handle-wrapper'
19688
19737
  }, [h('div', {
19689
19738
  class: 'vxe-table-custom--header'
@@ -19709,7 +19758,6 @@ const renderSimplePanel = (h, _vm) => {
19709
19758
  }, panel_getI18n('vxe.toolbar.customAll'))]) : h('span', {
19710
19759
  class: 'vxe-checkbox--label'
19711
19760
  }, panel_getI18n('vxe.table.customTitle'))])])]), h('div', {
19712
- ref: 'bodyElemRef',
19713
19761
  class: 'vxe-table-custom--body'
19714
19762
  }, [topSlot ? h('div', {
19715
19763
  class: 'vxe-table-custom--panel-top'
@@ -19724,7 +19772,7 @@ const renderSimplePanel = (h, _vm) => {
19724
19772
  on: customWrapperOns
19725
19773
  }, colVNs), bottomSlot ? h('div', {
19726
19774
  class: 'vxe-table-custom--panel-bottom'
19727
- }, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)]), customOpts.showFooter ? h('div', {
19775
+ }, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable)]), customOpts.showFooter ? h('div', {
19728
19776
  class: 'vxe-table-custom--footer'
19729
19777
  }, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
19730
19778
  class: 'vxe-table-custom--footer-buttons'
@@ -19762,18 +19810,18 @@ const renderSimplePanel = (h, _vm) => {
19762
19810
  on: {
19763
19811
  click: _vm.confirmCustomEvent
19764
19812
  }
19765
- })])]) : null])] : []);
19813
+ })])]) : null]), renderDragTip(h, _vm)])] : []);
19766
19814
  };
19767
- const renderPopupPanel = (h, _vm) => {
19815
+ const renderPopupPanel = (h, $xeTableCustomPanel) => {
19768
19816
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
19769
19817
  const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
19770
19818
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
19771
19819
  const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
19772
- const $xeTableCustomPanel = _vm;
19773
- const props = _vm;
19774
- const $xeTable = _vm.$xeTable;
19820
+ const _vm = $xeTableCustomPanel;
19821
+ const props = $xeTableCustomPanel;
19822
+ const $xeTable = $xeTableCustomPanel.$xeTable;
19775
19823
  const tableProps = $xeTable;
19776
- const reactData = $xeTable;
19824
+ const tableReactData = $xeTable;
19777
19825
  const $xeGrid = $xeTable.$xeGrid;
19778
19826
  const {
19779
19827
  customStore
@@ -19784,7 +19832,7 @@ const renderPopupPanel = (h, _vm) => {
19784
19832
  const {
19785
19833
  isCustomStatus,
19786
19834
  customColumnList
19787
- } = reactData;
19835
+ } = tableReactData;
19788
19836
  const customOpts = $xeTable.computeCustomOpts;
19789
19837
  const {
19790
19838
  immediate
@@ -19891,9 +19939,9 @@ const renderPopupPanel = (h, _vm) => {
19891
19939
  title: panel_getI18n('vxe.custom.setting.colVisible')
19892
19940
  },
19893
19941
  on: {
19894
- click: () => {
19942
+ click: evnt => {
19895
19943
  if (!isDisabled) {
19896
- _vm.changeCheckboxOption(column);
19944
+ _vm.changeCheckboxOption(column, evnt);
19897
19945
  }
19898
19946
  }
19899
19947
  }
@@ -19972,8 +20020,11 @@ const renderPopupPanel = (h, _vm) => {
19972
20020
  }]
19973
20021
  },
19974
20022
  on: {
19975
- input(value) {
19976
- _vm.changeFixedOption(column, value);
20023
+ change({
20024
+ label,
20025
+ $event
20026
+ }) {
20027
+ _vm.changeFixedOption(column, label, $event);
19977
20028
  }
19978
20029
  }
19979
20030
  })]) : panel_renderEmptyElement($xeTable)]));
@@ -19981,12 +20032,12 @@ const renderPopupPanel = (h, _vm) => {
19981
20032
  });
19982
20033
  const scopedSlots = {
19983
20034
  default: () => {
19984
- if (defaultSlot) {
19985
- return $xeTable.callSlot(defaultSlot, params, h);
19986
- }
19987
20035
  return h('div', {
19988
- ref: 'bodyElemRef',
19989
- class: 'vxe-table-custom-popup--body'
20036
+ ref: 'refBodyWrapperElem',
20037
+ class: 'vxe-table-custom-popup--body-wrapper'
20038
+ }, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [h('div', {
20039
+ ref: 'refCustomBodyElem',
20040
+ class: 'vxe-table-custom-popup--handle-wrapper'
19990
20041
  }, [topSlot ? h('div', {
19991
20042
  class: 'vxe-table-custom-popup--table-top'
19992
20043
  }, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
@@ -20022,7 +20073,7 @@ const renderPopupPanel = (h, _vm) => {
20022
20073
  }
20023
20074
  }, trVNs)])]), bottomSlot ? h('div', {
20024
20075
  class: 'vxe-table-custom-popup--table-bottom'
20025
- }, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)]);
20076
+ }, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)])]);
20026
20077
  },
20027
20078
  footer: () => {
20028
20079
  if (footerSlot) {
@@ -20126,27 +20177,44 @@ const renderPopupPanel = (h, _vm) => {
20126
20177
  default: () => ({})
20127
20178
  }
20128
20179
  },
20180
+ provide() {
20181
+ const $xeTableCustomPanel = this;
20182
+ return {
20183
+ $xeTableCustomPanel
20184
+ };
20185
+ },
20129
20186
  inject: {
20130
20187
  $xeTable: {
20131
20188
  default: null
20132
20189
  }
20133
20190
  },
20134
20191
  data() {
20192
+ const reactData = {
20193
+ dragCol: null,
20194
+ dragGroup: null,
20195
+ dragValues: null,
20196
+ dragTipText: ''
20197
+ };
20198
+ const internalData = {
20199
+ // prevDragCol: undefined,
20200
+ // prevDragToChild: false,
20201
+ // prevDragPos: null
20202
+ };
20135
20203
  return {
20136
- prevDragCol: undefined,
20137
- prevDragToChild: false,
20138
- prevDragPos: null
20204
+ reactData,
20205
+ internalData
20139
20206
  };
20140
20207
  },
20141
20208
  computed: {},
20142
20209
  created() {
20210
+ const $xeTableCustomPanel = this;
20143
20211
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
20144
20212
  const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
20145
20213
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
20146
20214
  const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
20147
20215
  const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
20148
- this.$nextTick(() => {
20149
- const $xeTable = this.$xeTable;
20216
+ $xeTableCustomPanel.$nextTick(() => {
20217
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20150
20218
  const {
20151
20219
  customOpts
20152
20220
  } = $xeTable;
@@ -20171,16 +20239,18 @@ const renderPopupPanel = (h, _vm) => {
20171
20239
  });
20172
20240
  },
20173
20241
  render(h) {
20174
- const $xeTable = this.$xeTable;
20242
+ const $xeTableCustomPanel = this;
20243
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20175
20244
  const customOpts = $xeTable.computeCustomOpts;
20176
20245
  if (['modal', 'drawer', 'popup'].includes(`${customOpts.mode}`)) {
20177
- return renderPopupPanel(h, this);
20246
+ return renderPopupPanel(h, $xeTableCustomPanel);
20178
20247
  }
20179
- return renderSimplePanel(h, this);
20248
+ return renderSimplePanel(h, $xeTableCustomPanel);
20180
20249
  },
20181
20250
  methods: {
20182
20251
  handleWrapperMouseenterEvent(evnt) {
20183
- const $xeTable = this.$xeTable;
20252
+ const $xeTableCustomPanel = this;
20253
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20184
20254
  const {
20185
20255
  customStore
20186
20256
  } = this;
@@ -20188,10 +20258,12 @@ const renderPopupPanel = (h, _vm) => {
20188
20258
  $xeTable.customOpenEvent(evnt);
20189
20259
  },
20190
20260
  handleWrapperMouseleaveEvent(evnt) {
20191
- const $xeTable = this.$xeTable;
20261
+ const $xeTableCustomPanel = this;
20262
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20263
+ const props = $xeTableCustomPanel;
20192
20264
  const {
20193
20265
  customStore
20194
- } = this;
20266
+ } = props;
20195
20267
  customStore.activeWrapper = false;
20196
20268
  setTimeout(() => {
20197
20269
  if (!customStore.activeBtn && !customStore.activeWrapper) {
@@ -20205,9 +20277,10 @@ const renderPopupPanel = (h, _vm) => {
20205
20277
  confirmCustomEvent({
20206
20278
  $event
20207
20279
  }) {
20208
- const $xeTable = this.$xeTable;
20209
- const reactData = $xeTable;
20210
- reactData.isCustomStatus = true;
20280
+ const $xeTableCustomPanel = this;
20281
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20282
+ const tableReactData = $xeTable;
20283
+ tableReactData.isCustomStatus = true;
20211
20284
  $xeTable.saveCustom();
20212
20285
  $xeTable.closeCustom();
20213
20286
  $xeTable.emitCustomEvent('confirm', $event);
@@ -20215,20 +20288,23 @@ const renderPopupPanel = (h, _vm) => {
20215
20288
  cancelCloseEvent({
20216
20289
  $event
20217
20290
  }) {
20218
- const $xeTable = this.$xeTable;
20291
+ const $xeTableCustomPanel = this;
20292
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20219
20293
  $xeTable.closeCustom();
20220
20294
  $xeTable.emitCustomEvent('close', $event);
20221
20295
  },
20222
20296
  cancelCustomEvent({
20223
20297
  $event
20224
20298
  }) {
20225
- const $xeTable = this.$xeTable;
20299
+ const $xeTableCustomPanel = this;
20300
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20226
20301
  $xeTable.cancelCustom();
20227
20302
  $xeTable.closeCustom();
20228
20303
  $xeTable.emitCustomEvent('cancel', $event);
20229
20304
  },
20230
20305
  handleResetCustomEvent(evnt) {
20231
- const $xeTable = this.$xeTable;
20306
+ const $xeTableCustomPanel = this;
20307
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20232
20308
  $xeTable.resetCustom(true);
20233
20309
  $xeTable.closeCustom();
20234
20310
  $xeTable.emitCustomEvent('reset', evnt);
@@ -20248,27 +20324,13 @@ const renderPopupPanel = (h, _vm) => {
20248
20324
  this.handleResetCustomEvent(evnt);
20249
20325
  }
20250
20326
  },
20251
- resetPopupCustomEvent(evnt) {
20252
- if (core_.VxeUI.modal) {
20253
- core_.VxeUI.modal.confirm({
20254
- content: panel_getI18n('vxe.custom.cstmConfirmRestore'),
20255
- className: 'vxe-table--ignore-clear',
20256
- escClosable: true
20257
- }).then(type => {
20258
- if (type === 'confirm') {
20259
- this.resetCustomEvent(evnt);
20260
- }
20261
- });
20262
- } else {
20263
- this.resetCustomEvent(evnt);
20264
- }
20265
- },
20266
20327
  handleOptionCheck(column) {
20267
- const $xeTable = this.$xeTable;
20268
- const reactData = $xeTable;
20328
+ const $xeTableCustomPanel = this;
20329
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20330
+ const tableReactData = $xeTable;
20269
20331
  const {
20270
20332
  customColumnList
20271
- } = reactData;
20333
+ } = tableReactData;
20272
20334
  const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(customColumnList, item => item === column);
20273
20335
  if (matchObj && matchObj.parent) {
20274
20336
  const {
@@ -20281,9 +20343,10 @@ const renderPopupPanel = (h, _vm) => {
20281
20343
  }
20282
20344
  }
20283
20345
  },
20284
- changeCheckboxOption(column) {
20285
- const $xeTable = this.$xeTable;
20286
- const reactData = $xeTable;
20346
+ changeCheckboxOption(column, evnt) {
20347
+ const $xeTableCustomPanel = this;
20348
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20349
+ const tableReactData = $xeTable;
20287
20350
  const customOpts = $xeTable.computeCustomOpts;
20288
20351
  const isChecked = !column.renderVisible;
20289
20352
  if (customOpts.immediate) {
@@ -20292,7 +20355,7 @@ const renderPopupPanel = (h, _vm) => {
20292
20355
  item.renderVisible = isChecked;
20293
20356
  item.halfVisible = false;
20294
20357
  });
20295
- reactData.isCustomStatus = true;
20358
+ tableReactData.isCustomStatus = true;
20296
20359
  $xeTable.handleCustom();
20297
20360
  $xeTable.saveCustomStore('update:visible');
20298
20361
  } else {
@@ -20303,63 +20366,114 @@ const renderPopupPanel = (h, _vm) => {
20303
20366
  }
20304
20367
  this.handleOptionCheck(column);
20305
20368
  $xeTable.checkCustomStatus();
20369
+ $xeTable.dispatchEvent('custom-visible-change', {
20370
+ column,
20371
+ checked: isChecked
20372
+ }, evnt);
20306
20373
  },
20307
20374
  changeColumnWidth(column) {
20308
- const $xeTable = this.$xeTable;
20309
- const reactData = $xeTable;
20375
+ const $xeTableCustomPanel = this;
20376
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20377
+ const tableReactData = $xeTable;
20310
20378
  const customOpts = $xeTable.computeCustomOpts;
20311
20379
  if (customOpts.immediate) {
20312
20380
  if (column.renderResizeWidth !== column.renderWidth) {
20313
20381
  column.resizeWidth = column.renderResizeWidth;
20314
20382
  column.renderWidth = column.renderResizeWidth;
20315
- reactData.isCustomStatus = true;
20383
+ tableReactData.isCustomStatus = true;
20316
20384
  $xeTable.handleCustom();
20317
20385
  $xeTable.saveCustomStore('update:width');
20318
20386
  }
20319
20387
  }
20320
20388
  },
20321
- changeFixedOption(column, colFixed) {
20322
- const $xeTable = this.$xeTable;
20323
- const reactData = $xeTable;
20389
+ changeFixedOption(column, colFixed, evnt) {
20390
+ const $xeTableCustomPanel = this;
20391
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20392
+ const tableReactData = $xeTable;
20324
20393
  const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
20325
20394
  const customOpts = $xeTable.computeCustomOpts;
20395
+ let targetFixed = null;
20326
20396
  if (customOpts.immediate) {
20327
20397
  if (column.renderFixed === colFixed) {
20398
+ targetFixed = '';
20328
20399
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
20329
20400
  col.fixed = '';
20330
20401
  col.renderFixed = '';
20331
20402
  });
20332
20403
  } else {
20333
20404
  if (!isMaxFixedColumn || column.renderFixed) {
20405
+ targetFixed = colFixed;
20334
20406
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
20335
20407
  col.fixed = colFixed;
20336
20408
  col.renderFixed = colFixed;
20337
20409
  });
20338
20410
  }
20339
20411
  }
20340
- reactData.isCustomStatus = true;
20412
+ tableReactData.isCustomStatus = true;
20341
20413
  $xeTable.handleCustom();
20342
20414
  $xeTable.saveCustomStore('update:fixed');
20343
20415
  } else {
20344
20416
  if (column.renderFixed === colFixed) {
20417
+ targetFixed = '';
20345
20418
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
20346
20419
  col.renderFixed = '';
20347
20420
  });
20348
20421
  } else {
20349
20422
  if (!isMaxFixedColumn || column.renderFixed) {
20423
+ targetFixed = colFixed;
20350
20424
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
20351
20425
  col.renderFixed = colFixed;
20352
20426
  });
20353
20427
  }
20354
20428
  }
20355
20429
  }
20430
+ if (!targetFixed !== null) {
20431
+ $xeTable.dispatchEvent('custom-fixed-change', {
20432
+ column,
20433
+ fixed: targetFixed
20434
+ }, evnt);
20435
+ }
20356
20436
  },
20357
- allOptionEvent() {
20358
- const $xeTable = this.$xeTable;
20437
+ allOptionEvent(evnt) {
20438
+ const $xeTableCustomPanel = this;
20439
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20440
+ const tableReactData = $xeTable;
20441
+ const {
20442
+ customStore
20443
+ } = tableReactData;
20444
+ const isAll = !customStore.isAll;
20359
20445
  $xeTable.toggleCustomAllCheckbox();
20446
+ $xeTable.dispatchEvent('custom-visible-all', {
20447
+ checked: isAll
20448
+ }, evnt);
20449
+ },
20450
+ updateColDropTipContent() {
20451
+ const $xeTableCustomPanel = this;
20452
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20453
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20454
+ const {
20455
+ dragCol
20456
+ } = customPanelReactData;
20457
+ const columnDragOpts = $xeTable.computeColumnDragOpts;
20458
+ const {
20459
+ tooltipMethod
20460
+ } = columnDragOpts;
20461
+ let tipContent = '';
20462
+ if (tooltipMethod) {
20463
+ const dtParams = {
20464
+ $table: $xeTable,
20465
+ column: dragCol
20466
+ };
20467
+ tipContent = `${tooltipMethod(dtParams) || ''}`;
20468
+ } else {
20469
+ tipContent = panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']);
20470
+ }
20471
+ customPanelReactData.dragTipText = tipContent;
20360
20472
  },
20361
20473
  sortMousedownEvent(evnt) {
20362
- const $xeTable = this.$xeTable;
20474
+ const $xeTableCustomPanel = this;
20475
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20476
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20363
20477
  const btnEl = evnt.currentTarget;
20364
20478
  const cellEl = btnEl.parentElement;
20365
20479
  const tdEl = cellEl.parentElement;
@@ -20367,44 +20481,48 @@ const renderPopupPanel = (h, _vm) => {
20367
20481
  const colid = trEl.getAttribute('colid');
20368
20482
  const column = $xeTable.getColumnById(colid);
20369
20483
  trEl.draggable = true;
20370
- this.dragCol = column;
20484
+ customPanelReactData.dragCol = column;
20485
+ this.updateColDropTipContent();
20371
20486
  addClass(trEl, 'active--drag-origin');
20372
20487
  },
20373
20488
  sortMouseupEvent(evnt) {
20489
+ const $xeTableCustomPanel = this;
20490
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20374
20491
  const btnEl = evnt.currentTarget;
20375
20492
  const cellEl = btnEl.parentElement;
20376
20493
  const tdEl = cellEl.parentElement;
20377
20494
  const trEl = tdEl.parentElement;
20378
- panel_hideDropTip(this);
20495
+ panel_hideDropTip($xeTableCustomPanel);
20379
20496
  trEl.draggable = false;
20380
- this.dragCol = null;
20497
+ customPanelReactData.dragCol = null;
20381
20498
  removeClass(trEl, 'active--drag-origin');
20382
20499
  },
20383
20500
  sortDragstartEvent(evnt) {
20501
+ const $xeTableCustomPanel = this;
20502
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20384
20503
  if (evnt.dataTransfer) {
20385
20504
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
20386
20505
  }
20506
+ customPanelReactData.dragGroup = null;
20507
+ customPanelReactData.dragValues = null;
20387
20508
  },
20388
20509
  sortDragendEvent(evnt) {
20389
- const $xeTable = this.$xeTable;
20510
+ const $xeTableCustomPanel = this;
20511
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20390
20512
  const tableProps = $xeTable;
20391
- const reactData = $xeTable;
20392
- const internalData = $xeTable;
20393
- const {
20394
- dragCol,
20395
- prevDragPos,
20396
- prevDragCol,
20397
- prevDragToChild
20398
- } = this;
20513
+ const tableReactData = $xeTable;
20514
+ const tableInternalData = $xeTable;
20515
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20516
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
20399
20517
  const {
20400
20518
  mouseConfig
20401
20519
  } = tableProps;
20402
20520
  const {
20403
20521
  customColumnList
20404
- } = reactData;
20522
+ } = tableReactData;
20405
20523
  const {
20406
20524
  collectColumn
20407
- } = internalData;
20525
+ } = tableInternalData;
20408
20526
  const customOpts = $xeTable.computeCustomOpts;
20409
20527
  const {
20410
20528
  immediate
@@ -20417,8 +20535,22 @@ const renderPopupPanel = (h, _vm) => {
20417
20535
  isToChildDrag,
20418
20536
  dragEndMethod
20419
20537
  } = columnDragOpts;
20538
+ const {
20539
+ dragCol,
20540
+ dragGroup,
20541
+ dragValues
20542
+ } = customPanelReactData;
20543
+ const {
20544
+ prevDragCol,
20545
+ prevDragPos,
20546
+ prevDragToChild
20547
+ } = customPanelInternalData;
20420
20548
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
20421
- if (prevDragCol && dragCol) {
20549
+ if (dragGroup || dragValues) {
20550
+ if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
20551
+ $xeTable.handlePivotTableAggregatePanelDragendEvent(evnt);
20552
+ }
20553
+ } else if (prevDragCol && dragCol) {
20422
20554
  // 判断是否有拖动
20423
20555
  if (prevDragCol !== dragCol) {
20424
20556
  const dragColumn = dragCol;
@@ -20544,7 +20676,7 @@ const renderPopupPanel = (h, _vm) => {
20544
20676
  nafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id === newColumn.id);
20545
20677
  customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
20546
20678
  }
20547
- reactData.isDragColMove = true;
20679
+ tableReactData.isDragColMove = true;
20548
20680
  if (mouseConfig) {
20549
20681
  if ($xeTable.clearSelected) {
20550
20682
  $xeTable.clearSelected();
@@ -20566,24 +20698,29 @@ const renderPopupPanel = (h, _vm) => {
20566
20698
  }
20567
20699
  }, evnt);
20568
20700
  if (immediate) {
20569
- reactData.customColumnList = collectColumn.slice(0);
20701
+ tableReactData.customColumnList = collectColumn.slice(0);
20570
20702
  $xeTable.handleColDragSwapColumn();
20571
20703
  }
20572
20704
  }).catch(() => {});
20573
20705
  }
20574
20706
  }
20575
- panel_hideDropTip(this);
20576
- this.dragCol.value = null;
20707
+ panel_hideDropTip($xeTableCustomPanel);
20708
+ customPanelReactData.dragCol = null;
20709
+ customPanelReactData.dragGroup = null;
20710
+ customPanelReactData.dragValues = null;
20577
20711
  trEl.draggable = false;
20578
20712
  trEl.removeAttribute('drag-pos');
20579
20713
  removeClass(trEl, 'active--drag-target');
20580
20714
  removeClass(trEl, 'active--drag-origin');
20581
20715
  },
20582
20716
  sortDragoverEvent(evnt) {
20583
- const $xeTable = this.$xeTable;
20717
+ const $xeTableCustomPanel = this;
20718
+ const $xeTable = $xeTableCustomPanel.$xeTable;
20719
+ const customPanelReactData = $xeTableCustomPanel.reactData;
20720
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
20584
20721
  const {
20585
20722
  dragCol
20586
- } = this;
20723
+ } = customPanelReactData;
20587
20724
  const customOpts = $xeTable.computeCustomOpts;
20588
20725
  const {
20589
20726
  immediate
@@ -20597,19 +20734,21 @@ const renderPopupPanel = (h, _vm) => {
20597
20734
  const isControlKey = hasControlKey(evnt);
20598
20735
  const colid = optEl.getAttribute('colid');
20599
20736
  const column = $xeTable.getColumnById(colid);
20737
+ customPanelReactData.dragGroup = null;
20738
+ customPanelReactData.dragValues = null;
20600
20739
  // 是否移入有效列
20601
20740
  if (column && (isCrossDrag || column.level === 1)) {
20602
20741
  evnt.preventDefault();
20603
20742
  const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
20604
20743
  const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
20605
20744
  if (dragCol && dragCol.id === column.id || !isCrossDrag && column.level > 1 || !immediate && column.level > 1 || column.renderFixed) {
20606
- panel_showDropTip(this, evnt, optEl, false, dragPos);
20745
+ panel_showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos);
20607
20746
  return;
20608
20747
  }
20609
- this.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
20610
- this.prevDragCol = column;
20611
- this.prevDragPos = dragPos;
20612
- panel_showDropTip(this, evnt, optEl, true, dragPos);
20748
+ customPanelInternalData.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
20749
+ customPanelInternalData.prevDragCol = column;
20750
+ customPanelInternalData.prevDragPos = dragPos;
20751
+ panel_showDropTip($xeTableCustomPanel, evnt, optEl, true, dragPos);
20613
20752
  }
20614
20753
  }
20615
20754
  }
@@ -23473,27 +23612,63 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23473
23612
  },
23474
23613
  _getActiveRecord() {
23475
23614
  const $xeTable = this;
23476
- warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
23477
- // 即将废弃
23478
- return $xeTable.getEditRecord();
23615
+ const reactData = $xeTable;
23616
+ const internalData = $xeTable;
23617
+ warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditCell']);
23618
+ const {
23619
+ editStore
23620
+ } = reactData;
23621
+ const {
23622
+ fullAllDataRowIdData
23623
+ } = internalData;
23624
+ const {
23625
+ args,
23626
+ row
23627
+ } = editStore.actived;
23628
+ if (args && row && fullAllDataRowIdData[getRowid($xeTable, row)]) {
23629
+ return Object.assign({}, args, {
23630
+ row
23631
+ });
23632
+ }
23633
+ return null;
23479
23634
  },
23480
23635
  _getEditRecord() {
23481
23636
  const $xeTable = this;
23482
23637
  const reactData = $xeTable;
23483
23638
  const internalData = $xeTable;
23639
+ warnLog('vxe.error.delFunc', ['getEditRecord', 'getEditCell']);
23484
23640
  const {
23485
23641
  editStore
23486
23642
  } = reactData;
23487
23643
  const {
23488
- afterFullData
23644
+ fullAllDataRowIdData
23489
23645
  } = internalData;
23490
- const el = $xeTable.$refs.refElem;
23491
23646
  const {
23492
23647
  args,
23493
23648
  row
23494
23649
  } = editStore.actived;
23495
- if (args && $xeTable.findRowIndexOf(afterFullData, row) > -1 && el.querySelectorAll('.vxe-body--column.col--active').length) {
23496
- return Object.assign({}, args);
23650
+ if (args && row && fullAllDataRowIdData[getRowid($xeTable, row)]) {
23651
+ return Object.assign({}, args, {
23652
+ row
23653
+ });
23654
+ }
23655
+ return null;
23656
+ },
23657
+ _getEditCell() {
23658
+ const $xeTable = this;
23659
+ const reactData = $xeTable;
23660
+ const {
23661
+ editStore
23662
+ } = reactData;
23663
+ const {
23664
+ row,
23665
+ column
23666
+ } = editStore.actived;
23667
+ if (column && row) {
23668
+ return {
23669
+ row,
23670
+ column
23671
+ };
23497
23672
  }
23498
23673
  return null;
23499
23674
  },
@@ -23698,11 +23873,14 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23698
23873
  editStore
23699
23874
  } = reactData;
23700
23875
  const {
23701
- args,
23876
+ row,
23702
23877
  column
23703
23878
  } = editStore.selected;
23704
- if (args && column) {
23705
- return Object.assign({}, args);
23879
+ if (row && column) {
23880
+ return {
23881
+ row,
23882
+ column
23883
+ };
23706
23884
  }
23707
23885
  return null;
23708
23886
  },
@@ -23841,11 +24019,20 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
23841
24019
  const childrenField = treeOpts.children || treeOpts.childrenField;
23842
24020
  // 如果是树表格只允许导出数据源
23843
24021
  const rest = [];
23844
- const expandMaps = new Map();
24022
+ const expandMaps = {};
24023
+ const useMaps = {};
24024
+ const {
24025
+ handleGetRowId
24026
+ } = createHandleGetRowId($xeTable);
23845
24027
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(datas, (item, $rowIndex, items, path, parent, nodes) => {
23846
24028
  const row = item._row || item;
24029
+ const rowid = handleGetRowId(row);
24030
+ if (useMaps[rowid]) {
24031
+ return;
24032
+ }
23847
24033
  const parentRow = parent && parent._row ? parent._row : parent;
23848
- if (isAllExpand || !parentRow || expandMaps.has(parentRow) && $xeTable.isTreeExpandByRow(parentRow)) {
24034
+ const pRowid = parentRow ? handleGetRowId(parentRow) : '';
24035
+ if (isAllExpand || !parentRow || expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)) {
23849
24036
  const hasRowChild = hasTreeChildren($xeTable, row);
23850
24037
  const item = {
23851
24038
  _row: row,
@@ -23916,7 +24103,10 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
23916
24103
  }
23917
24104
  item[column.id] = toStringValue(cellValue);
23918
24105
  });
23919
- expandMaps.set(row, 1);
24106
+ useMaps[rowid] = true;
24107
+ if (pRowid) {
24108
+ expandMaps[pRowid] = true;
24109
+ }
23920
24110
  rest.push(Object.assign(item, row));
23921
24111
  }
23922
24112
  }, {
@@ -25069,6 +25259,7 @@ const convertToRows = originColumns => {
25069
25259
  const {
25070
25260
  tableFullColumn,
25071
25261
  afterFullData,
25262
+ afterTreeFullData,
25072
25263
  collectColumn,
25073
25264
  mergeBodyList,
25074
25265
  mergeFooterList
@@ -25344,8 +25535,10 @@ const convertToRows = originColumns => {
25344
25535
  }
25345
25536
  }
25346
25537
  } else if (mode === 'current') {
25347
- handleOptions.data = afterFullData;
25538
+ handleOptions.data = treeConfig ? afterTreeFullData : afterFullData;
25348
25539
  }
25540
+ } else {
25541
+ handleOptions._isCustomData = true;
25349
25542
  }
25350
25543
  return handleExport($xeTable, handleOptions);
25351
25544
  },
@@ -26928,6 +27121,17 @@ function emitCustomEvent($xeTable, type, evnt) {
26928
27121
  }
26929
27122
  return $xeTable.$nextTick();
26930
27123
  },
27124
+ _toggleCustom() {
27125
+ const $xeTable = this;
27126
+ const reactData = $xeTable;
27127
+ const {
27128
+ customStore
27129
+ } = reactData;
27130
+ if (customStore.visible) {
27131
+ return $xeTable.closeCustom();
27132
+ }
27133
+ return $xeTable.openCustom();
27134
+ },
26931
27135
  _saveCustom() {
26932
27136
  const $xeTable = this;
26933
27137
  const reactData = $xeTable;