vxe-table 4.13.16 → 4.13.18

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 (89) hide show
  1. package/es/locale/lang/fr-FR.d.ts +2 -0
  2. package/es/locale/lang/hy-AM.d.ts +2 -0
  3. package/es/locale/lang/id-ID.d.ts +2 -0
  4. package/es/locale/lang/it-IT.d.ts +2 -0
  5. package/es/locale/lang/ms-MY.d.ts +2 -0
  6. package/es/locale/lang/ms-MY.js +708 -0
  7. package/es/locale/lang/nb-NO.d.ts +2 -0
  8. package/es/locale/lang/th-TH.d.ts +2 -0
  9. package/es/locale/lang/ug-CN.d.ts +2 -0
  10. package/es/locale/lang/uz-UZ.d.ts +2 -0
  11. package/es/locale/lang/uz-UZ.js +708 -0
  12. package/es/locale/lang/vi-VN.d.ts +2 -0
  13. package/es/locale/lang/zh-CHT.d.ts +2 -0
  14. package/es/style.css +1 -1
  15. package/es/table/module/custom/panel.js +1 -1
  16. package/es/table/module/filter/hook.js +8 -0
  17. package/es/table/src/table.js +38 -44
  18. package/es/ui/index.js +1 -1
  19. package/es/ui/src/log.js +1 -1
  20. package/lib/index.umd.js +15 -11
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/locale/lang/ar-EG.d.ts +2 -0
  23. package/lib/locale/lang/ar-EG.min.js +1 -1
  24. package/lib/locale/lang/ar-EG.umd.js +728 -0
  25. package/lib/locale/lang/de-DE.d.ts +2 -0
  26. package/lib/locale/lang/de-DE.min.js +1 -1
  27. package/lib/locale/lang/de-DE.umd.js +728 -0
  28. package/lib/locale/lang/fr-FR.d.ts +2 -0
  29. package/lib/locale/lang/fr-FR.min.js +1 -1
  30. package/lib/locale/lang/fr-FR.umd.js +728 -0
  31. package/lib/locale/lang/hy-AM.d.ts +2 -0
  32. package/lib/locale/lang/hy-AM.min.js +1 -1
  33. package/lib/locale/lang/hy-AM.umd.js +728 -0
  34. package/lib/locale/lang/id-ID.d.ts +2 -0
  35. package/lib/locale/lang/id-ID.min.js +1 -1
  36. package/lib/locale/lang/id-ID.umd.js +728 -0
  37. package/lib/locale/lang/it-IT.d.ts +2 -0
  38. package/lib/locale/lang/it-IT.min.js +1 -1
  39. package/lib/locale/lang/it-IT.umd.js +728 -0
  40. package/lib/locale/lang/ms-MY.d.ts +2 -0
  41. package/lib/locale/lang/ms-MY.js +714 -0
  42. package/lib/locale/lang/ms-MY.min.js +1 -0
  43. package/lib/locale/lang/ms-MY.umd.js +728 -0
  44. package/lib/locale/lang/nb-NO.d.ts +2 -0
  45. package/lib/locale/lang/nb-NO.min.js +1 -1
  46. package/lib/locale/lang/nb-NO.umd.js +728 -0
  47. package/lib/locale/lang/th-TH.d.ts +2 -0
  48. package/lib/locale/lang/th-TH.min.js +1 -1
  49. package/lib/locale/lang/th-TH.umd.js +728 -0
  50. package/lib/locale/lang/ug-CN.d.ts +2 -0
  51. package/lib/locale/lang/ug-CN.min.js +1 -1
  52. package/lib/locale/lang/ug-CN.umd.js +728 -0
  53. package/lib/locale/lang/uz-UZ.d.ts +2 -0
  54. package/lib/locale/lang/uz-UZ.js +714 -0
  55. package/lib/locale/lang/uz-UZ.min.js +1 -0
  56. package/lib/locale/lang/uz-UZ.umd.js +728 -0
  57. package/lib/locale/lang/vi-VN.d.ts +2 -0
  58. package/lib/locale/lang/vi-VN.min.js +1 -1
  59. package/lib/locale/lang/vi-VN.umd.js +728 -0
  60. package/lib/locale/lang/zh-CHT.d.ts +2 -0
  61. package/lib/locale/lang/zh-CHT.min.js +1 -1
  62. package/lib/locale/lang/zh-CHT.umd.js +728 -0
  63. package/lib/locale/lang/zh-TC.min.js +1 -1
  64. package/lib/style.css +1 -1
  65. package/lib/table/module/custom/panel.js +1 -1
  66. package/lib/table/module/custom/panel.min.js +1 -1
  67. package/lib/table/module/filter/hook.js +8 -0
  68. package/lib/table/module/filter/hook.min.js +1 -1
  69. package/lib/table/src/table.js +4 -8
  70. package/lib/table/src/table.min.js +1 -1
  71. package/lib/ui/index.js +1 -1
  72. package/lib/ui/index.min.js +1 -1
  73. package/lib/ui/src/log.js +1 -1
  74. package/lib/ui/src/log.min.js +1 -1
  75. package/package.json +2 -2
  76. package/packages/locale/lang/ms-MY.ts +708 -0
  77. package/packages/locale/lang/uz-UZ.ts +708 -0
  78. package/packages/table/module/custom/panel.ts +1 -1
  79. package/packages/table/module/filter/hook.ts +8 -0
  80. package/packages/table/src/table.ts +43 -42
  81. package/lib/locale/lang/zh-TC.umd.js +0 -23
  82. /package/es/{iconfont.1745983712875.ttf → iconfont.1746578870894.ttf} +0 -0
  83. /package/es/{iconfont.1745983712875.woff → iconfont.1746578870894.woff} +0 -0
  84. /package/es/{iconfont.1745983712875.woff2 → iconfont.1746578870894.woff2} +0 -0
  85. /package/es/locale/lang/{zh-TC.d.ts → ar-EG.d.ts} +0 -0
  86. /package/{lib/locale/lang/zh-TC.d.ts → es/locale/lang/de-DE.d.ts} +0 -0
  87. /package/lib/{iconfont.1745983712875.ttf → iconfont.1746578870894.ttf} +0 -0
  88. /package/lib/{iconfont.1745983712875.woff → iconfont.1746578870894.woff} +0 -0
  89. /package/lib/{iconfont.1745983712875.woff2 → iconfont.1746578870894.woff2} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, h, reactive, ref, provide, inject, nextTick, onActivated, onDeactivated, onBeforeUnmount, onUnmounted, watch, computed, onMounted } from 'vue';
2
2
  import XEUtils from 'xe-utils';
3
- import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, getOffsetPos, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom';
3
+ import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom';
4
4
  import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
5
5
  import { VxeUI } from '../../ui';
6
6
  import Cell from './cell';
@@ -4545,16 +4545,10 @@ export default defineComponent({
4545
4545
  }
4546
4546
  }
4547
4547
  else {
4548
+ const currMaps = isFull || (treeConfig && !transform) ? fullDataRowIdData : afterFullRowMaps;
4548
4549
  XEUtils.each(selectCheckboxMaps, (row, rowid) => {
4549
- if (isFull) {
4550
- if (fullDataRowIdData[rowid]) {
4551
- rowList.push(fullDataRowIdData[rowid].row);
4552
- }
4553
- }
4554
- else {
4555
- if (afterFullRowMaps[rowid]) {
4556
- rowList.push(afterFullRowMaps[rowid]);
4557
- }
4550
+ if (currMaps[rowid]) {
4551
+ rowList.push(fullDataRowIdData[rowid].row);
4558
4552
  }
4559
4553
  });
4560
4554
  }
@@ -7491,8 +7485,9 @@ export default defineComponent({
7491
7485
  evnt.stopPropagation();
7492
7486
  evnt.preventDefault();
7493
7487
  const { column } = params;
7494
- const { overflowX, scrollbarHeight } = reactData;
7488
+ const { columnStore, overflowX, scrollbarHeight } = reactData;
7495
7489
  const { elemStore, visibleColumn } = internalData;
7490
+ const { leftList, rightList } = columnStore;
7496
7491
  const resizableOpts = computeResizableOpts.value;
7497
7492
  const osbHeight = overflowX ? scrollbarHeight : 0;
7498
7493
  const tableEl = refElem.value;
@@ -7502,10 +7497,11 @@ export default defineComponent({
7502
7497
  if (!resizeBarElem) {
7503
7498
  return;
7504
7499
  }
7500
+ const isLeftFixed = fixedType === 'left';
7501
+ const isRightFixed = fixedType === 'right';
7505
7502
  const resizeTipElem = resizeBarElem.firstElementChild;
7506
7503
  const scrollbarXToTop = computeScrollbarXToTop.value;
7507
7504
  const { clientX: dragClientX } = evnt;
7508
- const wrapperElem = refElem.value;
7509
7505
  const dragBtnElem = evnt.target;
7510
7506
  let resizeColumn = column;
7511
7507
  if (column.children && column.children.length) {
@@ -7520,30 +7516,32 @@ export default defineComponent({
7520
7516
  if (!bodyScrollElem) {
7521
7517
  return;
7522
7518
  }
7523
- const pos = getOffsetPos(dragBtnElem, wrapperElem);
7519
+ const tableRect = tableEl.getBoundingClientRect();
7520
+ const rightContainerRect = rightContainerElem ? rightContainerElem.getBoundingClientRect() : null;
7521
+ const cellRect = cell.getBoundingClientRect();
7522
+ const dragBtnRect = dragBtnElem.getBoundingClientRect();
7524
7523
  const dragBtnWidth = dragBtnElem.clientWidth;
7525
7524
  const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
7525
+ const dragPosLeft = dragBtnRect.x - tableRect.x + dragBtnOffsetWidth;
7526
7526
  const minInterval = getColReMinWidth(cellParams) - dragBtnOffsetWidth; // 列之间的最小间距
7527
- let dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval;
7528
- let dragPosLeft = pos.left + dragBtnOffsetWidth;
7529
- const isLeftFixed = fixedType === 'left';
7530
- const isRightFixed = fixedType === 'right';
7531
- // 计算左右侧固定列偏移量
7532
- let fixedOffsetWidth = 0;
7527
+ const dragMinLeft = isRightFixed ? 0 : (cellRect.x - tableRect.x + dragBtnWidth + minInterval);
7528
+ const dragMaxLeft = cellRect.x - tableRect.x + cell.clientWidth - minInterval;
7529
+ let fixedLeftRemainWidth = 0;
7530
+ let fixedRightRemainWidth = 0;
7533
7531
  if (isLeftFixed || isRightFixed) {
7534
- const siblingProp = isLeftFixed ? 'nextElementSibling' : 'previousElementSibling';
7535
- let tempCellElem = cell[siblingProp];
7536
- while (tempCellElem) {
7537
- if (hasClass(tempCellElem, 'fixed--hidden')) {
7538
- break;
7532
+ let isMach = false;
7533
+ const fixedColumn = isLeftFixed ? leftList : rightList;
7534
+ for (let i = 0; i < fixedColumn.length; i++) {
7535
+ const item = fixedColumn[i];
7536
+ if (isMach) {
7537
+ fixedLeftRemainWidth += item.renderWidth;
7539
7538
  }
7540
- else if (!hasClass(tempCellElem, 'col--group')) {
7541
- fixedOffsetWidth += tempCellElem.offsetWidth;
7539
+ else {
7540
+ isMach = item.id === resizeColumn.id;
7541
+ if (!isMach) {
7542
+ fixedRightRemainWidth += item.renderWidth;
7543
+ }
7542
7544
  }
7543
- tempCellElem = tempCellElem[siblingProp];
7544
- }
7545
- if (isRightFixed && rightContainerElem) {
7546
- dragPosLeft = rightContainerElem.offsetLeft + fixedOffsetWidth;
7547
7545
  }
7548
7546
  }
7549
7547
  // 处理拖动事件
@@ -7553,29 +7551,25 @@ export default defineComponent({
7553
7551
  const tableHeight = tableEl.clientHeight;
7554
7552
  const offsetX = evnt.clientX - dragClientX;
7555
7553
  let left = dragPosLeft + offsetX;
7556
- const scrollLeft = fixedType ? 0 : bodyScrollElem.scrollLeft;
7557
7554
  if (isLeftFixed) {
7558
- // 左固定列(不允许超过右侧固定列、不允许超过右边距)
7559
- left = Math.min(left, (rightContainerElem ? rightContainerElem.offsetLeft : bodyScrollElem.clientWidth) - fixedOffsetWidth - minInterval);
7555
+ if (rightContainerRect) {
7556
+ left = Math.min(left, rightContainerRect.x - tableRect.x - fixedLeftRemainWidth - minInterval);
7557
+ }
7560
7558
  }
7561
7559
  else if (isRightFixed) {
7562
- // 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
7563
- dragMinLeft = (leftContainerElem ? leftContainerElem.clientWidth : 0) + fixedOffsetWidth + minInterval;
7564
- left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval);
7565
- }
7566
- else {
7567
- dragMinLeft = Math.max(bodyScrollElem.scrollLeft, dragMinLeft);
7568
- // left = Math.min(left, bodyScrollElem.clientWidth + bodyScrollElem.scrollLeft - 40)
7560
+ if (leftContainerElem) {
7561
+ left = Math.max(left, leftContainerElem.clientWidth + fixedRightRemainWidth + minInterval);
7562
+ }
7563
+ left = Math.min(left, dragMaxLeft);
7569
7564
  }
7570
7565
  dragLeft = Math.max(left, dragMinLeft);
7571
- const resizeBarLeft = Math.max(1, dragLeft - scrollLeft);
7566
+ const resizeBarLeft = Math.max(1, dragLeft);
7572
7567
  resizeBarElem.style.left = `${resizeBarLeft}px`;
7573
7568
  resizeBarElem.style.top = `${scrollbarXToTop ? osbHeight : 0}px`;
7574
7569
  resizeBarElem.style.height = `${scrollbarXToTop ? tableHeight - osbHeight : tableHeight}px`;
7575
7570
  if (resizableOpts.showDragTip && resizeTipElem) {
7576
- resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)]);
7571
+ resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [Math.floor(resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft))]);
7577
7572
  const tableWrapperWidth = tableEl.clientWidth;
7578
- const wrapperRect = wrapperElem.getBoundingClientRect();
7579
7573
  const resizeBarWidth = resizeBarElem.clientWidth;
7580
7574
  const resizeTipWidth = resizeTipElem.clientWidth;
7581
7575
  const resizeTipHeight = resizeTipElem.clientHeight;
@@ -7587,7 +7581,7 @@ export default defineComponent({
7587
7581
  resizeTipLeft += tableWrapperWidth - resizeBarLeft;
7588
7582
  }
7589
7583
  resizeTipElem.style.left = `${resizeTipLeft}px`;
7590
- resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`;
7584
+ resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY - tableRect.y - resizeTipHeight / 2))}px`;
7591
7585
  }
7592
7586
  reactData.isDragResize = true;
7593
7587
  };
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "4.13.16";
3
+ export const version = "4.13.18";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"4.13.16"}`;
3
+ const version = `table v${"4.13.18"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.13.16";
3141
+ const version = "4.13.18";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3599,7 +3599,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3599
3599
  const {
3600
3600
  log: log_log
3601
3601
  } = core_.VxeUI;
3602
- const log_version = `table v${"4.13.16"}`;
3602
+ const log_version = `table v${"4.13.18"}`;
3603
3603
  const warnLog = log_log.create('warn', log_version);
3604
3604
  const errLog = log_log.create('error', log_version);
3605
3605
  ;// ./packages/table/src/columnInfo.ts
@@ -9508,7 +9508,7 @@ const {
9508
9508
  const {
9509
9509
  mode
9510
9510
  } = customOpts;
9511
- if (!VxeUIModalComponent) {
9511
+ if (!VxeUIModalComponent && mode === 'modal') {
9512
9512
  errLog('vxe.error.reqComp', ['vxe-modal']);
9513
9513
  }
9514
9514
  if (!VxeUIDrawerComponent && mode === 'drawer') {
@@ -11023,7 +11023,7 @@ if(!rowRest){return false;}const row=rowRest.row;const oRow=sourceDataRowIdData[
11023
11023
  */getData(rowIndex){const tableSynchData=props.data||internalData.tableSynchData;return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(rowIndex)?tableSynchData.slice(0):tableSynchData[rowIndex];},/**
11024
11024
  * 用于多选行,获取已选中的数据
11025
11025
  */getCheckboxRecords(isFull){const{treeConfig}=props;const{updateCheckboxFlag}=reactData;const{tableFullData,afterFullData,tableFullTreeData,fullDataRowIdData,afterFullRowMaps,selectCheckboxMaps}=internalData;const treeOpts=computeTreeOpts.value;const checkboxOpts=computeCheckboxOpts.value;const{transform,mapChildrenField}=treeOpts;const{checkField}=checkboxOpts;const childrenField=treeOpts.children||treeOpts.childrenField;let rowList=[];if(updateCheckboxFlag){if(checkField){if(treeConfig){// 如果开启 transform 默认就是完整数据
11026
- const currTableData=isFull?transform?tableFullTreeData:tableFullData:transform?tableFullTreeData:afterFullData;rowList=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().filterTree(currTableData,row=>external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,checkField),{children:transform?mapChildrenField:childrenField});}else{const currTableData=isFull?tableFullData:afterFullData;rowList=currTableData.filter(row=>external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,checkField));}}else{external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps,(row,rowid)=>{if(isFull){if(fullDataRowIdData[rowid]){rowList.push(fullDataRowIdData[rowid].row);}}else{if(afterFullRowMaps[rowid]){rowList.push(afterFullRowMaps[rowid]);}}});}}return rowList;},/**
11026
+ const currTableData=isFull?transform?tableFullTreeData:tableFullData:transform?tableFullTreeData:afterFullData;rowList=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().filterTree(currTableData,row=>external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,checkField),{children:transform?mapChildrenField:childrenField});}else{const currTableData=isFull?tableFullData:afterFullData;rowList=currTableData.filter(row=>external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,checkField));}}else{const currMaps=isFull||treeConfig&&!transform?fullDataRowIdData:afterFullRowMaps;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps,(row,rowid)=>{if(currMaps[rowid]){rowList.push(fullDataRowIdData[rowid].row);}});}}return rowList;},/**
11027
11027
  * 只对 tree-config 有效,获取行的子级
11028
11028
  */getTreeRowChildren(rowOrRowid){const{treeConfig}=props;const{fullAllDataRowIdData}=internalData;const treeOpts=computeTreeOpts.value;const{transform,mapChildrenField}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;if(rowOrRowid&&treeConfig){let rowid;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrRowid)){rowid=rowOrRowid;}else{rowid=getRowid($xeTable,rowOrRowid);}if(rowid){const rest=fullAllDataRowIdData[rowid];const row=rest?rest.row:null;if(row){return row[transform?mapChildrenField:childrenField]||[];}}}return[];},/**
11029
11029
  * 只对 tree-config 有效,获取行的父级
@@ -11307,13 +11307,9 @@ fullList=handleVirtualTreeToList();}const tableData=scrollYLoad?fullList.slice(s
11307
11307
  const fullDataRowIdMaps={};const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const handleRowCache=(row,index,items,currIndex,parentRow,rowid,level,seq)=>{let rowRest=fullAllDataRowIdMaps[rowid];if(!rowRest){rowRest={row,rowid,seq,index:-1,_index:-1,$index:-1,treeIndex:index,items,parent:parentRow,level,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;}rowRest.treeLoaded=false;rowRest.expandLoaded=false;rowRest.row=row;rowRest.items=items;rowRest.parent=parentRow;rowRest.level=level;rowRest.index=currIndex;rowRest.treeIndex=index;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=computeTreeOpts.value;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(treeConfig&&lazy){if(row[hasChildField]&&row[childrenField]===undefined){row[childrenField]=null;}if(treeExpandedMaps[rowid]){if(!row[childrenField]||!row[childrenField].length){delete treeExpandedMaps[rowid];}}}handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:childrenField});}else if(isRowGroupStatus){const rowGroupOpts=computeRowGroupOpts.value;const{mapChildrenField}=rowGroupOpts;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:mapChildrenField});}else{tableFullData.forEach((row,index,items)=>{handleRowCache(row,index,items,index,null,handleUpdateRowId(row),0,index+1);});}internalData.fullDataRowIdData=fullDataRowIdMaps;internalData.fullAllDataRowIdData=fullAllDataRowIdMaps;reactData.treeExpandedFlag++;},cacheSourceMap(fullData){const{treeConfig}=props;const treeOpts=computeTreeOpts.value;const sourceData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData,true);const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const sourceRowIdData={};const handleSourceRow=row=>{const rowid=handleUpdateRowId(row);sourceRowIdData[rowid]=row;};// 源数据缓存
11308
11308
  if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sourceData,handleSourceRow,{children:treeOpts.transform?treeOpts.mapChildrenField:childrenField});}else{sourceData.forEach(handleSourceRow);}internalData.sourceDataRowIdData=sourceRowIdData;internalData.tableSourceData=sourceData;},/**
11309
11309
  * 指定列宽的列进行拆分
11310
- */analyColumnWidth(){const{tableFullColumn}=internalData;const columnOpts=computeColumnOpts.value;const{width:defaultWidth,minWidth:defaultMinWidth}=columnOpts;const resizeList=[];const pxList=[];const pxMinList=[];const autoMinList=[];const scaleList=[];const scaleMinList=[];const autoList=[];const remainList=[];tableFullColumn.forEach(column=>{if(defaultWidth&&!column.width){column.width=defaultWidth;}if(defaultMinWidth&&!column.minWidth){column.minWidth=defaultMinWidth;}if(column.visible){if(column.resizeWidth){resizeList.push(column);}else if(column.width==='auto'){autoList.push(column);}else if(isPx(column.width)){pxList.push(column);}else if(isScale(column.width)){scaleList.push(column);}else if(isPx(column.minWidth)){pxMinList.push(column);}else if(column.minWidth==='auto'){autoMinList.push(column);}else if(isScale(column.minWidth)){scaleMinList.push(column);}else{remainList.push(column);}}});Object.assign(reactData.columnStore,{resizeList,pxList,pxMinList,autoMinList,scaleList,scaleMinList,autoList,remainList});},handleColResizeMousedownEvent(evnt,fixedType,params){evnt.stopPropagation();evnt.preventDefault();const{column}=params;const{overflowX,scrollbarHeight}=reactData;const{elemStore,visibleColumn}=internalData;const resizableOpts=computeResizableOpts.value;const osbHeight=overflowX?scrollbarHeight:0;const tableEl=refElem.value;const leftContainerElem=refLeftContainer.value;const rightContainerElem=refRightContainer.value;const resizeBarElem=refColResizeBar.value;if(!resizeBarElem){return;}const resizeTipElem=resizeBarElem.firstElementChild;const scrollbarXToTop=computeScrollbarXToTop.value;const{clientX:dragClientX}=evnt;const wrapperElem=refElem.value;const dragBtnElem=evnt.target;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});let dragLeft=0;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const pos=getOffsetPos(dragBtnElem,wrapperElem);const dragBtnWidth=dragBtnElem.clientWidth;const dragBtnOffsetWidth=Math.floor(dragBtnWidth/2);const minInterval=getColReMinWidth(cellParams)-dragBtnOffsetWidth;// 列之间的最小间距
11311
- let dragMinLeft=pos.left-cell.clientWidth+dragBtnWidth+minInterval;let dragPosLeft=pos.left+dragBtnOffsetWidth;const isLeftFixed=fixedType==='left';const isRightFixed=fixedType==='right';// 计算左右侧固定列偏移量
11312
- let fixedOffsetWidth=0;if(isLeftFixed||isRightFixed){const siblingProp=isLeftFixed?'nextElementSibling':'previousElementSibling';let tempCellElem=cell[siblingProp];while(tempCellElem){if(hasClass(tempCellElem,'fixed--hidden')){break;}else if(!hasClass(tempCellElem,'col--group')){fixedOffsetWidth+=tempCellElem.offsetWidth;}tempCellElem=tempCellElem[siblingProp];}if(isRightFixed&&rightContainerElem){dragPosLeft=rightContainerElem.offsetLeft+fixedOffsetWidth;}}// 处理拖动事件
11313
- const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const tableHeight=tableEl.clientHeight;const offsetX=evnt.clientX-dragClientX;let left=dragPosLeft+offsetX;const scrollLeft=fixedType?0:bodyScrollElem.scrollLeft;if(isLeftFixed){// 左固定列(不允许超过右侧固定列、不允许超过右边距)
11314
- left=Math.min(left,(rightContainerElem?rightContainerElem.offsetLeft:bodyScrollElem.clientWidth)-fixedOffsetWidth-minInterval);}else if(isRightFixed){// 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
11315
- dragMinLeft=(leftContainerElem?leftContainerElem.clientWidth:0)+fixedOffsetWidth+minInterval;left=Math.min(left,dragPosLeft+cell.clientWidth-minInterval);}else{dragMinLeft=Math.max(bodyScrollElem.scrollLeft,dragMinLeft);// left = Math.min(left, bodyScrollElem.clientWidth + bodyScrollElem.scrollLeft - 40)
11316
- }dragLeft=Math.max(left,dragMinLeft);const resizeBarLeft=Math.max(1,dragLeft-scrollLeft);resizeBarElem.style.left=`${resizeBarLeft}px`;resizeBarElem.style.top=`${scrollbarXToTop?osbHeight:0}px`;resizeBarElem.style.height=`${scrollbarXToTop?tableHeight-osbHeight:tableHeight}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeColTip',[resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft)]);const tableWrapperWidth=tableEl.clientWidth;const wrapperRect=wrapperElem.getBoundingClientRect();const resizeBarWidth=resizeBarElem.clientWidth;const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeTipLeft=-resizeTipWidth;if(resizeBarLeft<resizeTipWidth+resizeBarWidth){resizeTipLeft=0;}else if(resizeBarLeft>tableWrapperWidth){resizeTipLeft+=tableWrapperWidth-resizeBarLeft;}resizeTipElem.style.left=`${resizeTipLeft}px`;resizeTipElem.style.top=`${Math.min(tableHeight-resizeTipHeight,Math.max(0,evnt.clientY-wrapperRect.y-resizeTipHeight/2))}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'col-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);const resizeWidth=resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft);const resizeParams={...params,resizeWidth,resizeColumn};if(resizableOpts.dragMode==='fixed'){visibleColumn.forEach(item=>{if(item.id!==resizeColumn.id){if(!item.resizeWidth){item.resizeWidth=item.renderWidth;}}});}if($xeTable.handleColResizeCellAreaEvent){$xeTable.handleColResizeCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}removeClass(tableEl,'col-drag--resize');};updateEvent(evnt);if($xeTable.closeMenu){$xeTable.closeMenu();}},handleColResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoWidth}=resizableOpts;const el=refElem.value;if(isDblclickAutoWidth&&el){evnt.stopPropagation();evnt.preventDefault();const{fullColumnIdData}=internalData;const{column}=params;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const colid=resizeColumn.id;const colRest=fullColumnIdData[colid];const dragBtnElem=evnt.target;const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});const colMinWidth=getColReMinWidth(cellParams);el.setAttribute('data-calc-col','Y');let resizeWidth=calcColumnAutoWidth(resizeColumn,el);el.removeAttribute('data-calc-col');if(colRest){resizeWidth=Math.max(resizeWidth,colRest.width);}resizeWidth=Math.max(colMinWidth,resizeWidth);const resizeParams={...params,resizeWidth,resizeColumn};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleColResizeDblclickCellAreaEvent){$xeTable.handleColResizeDblclickCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}}},handleRowResizeMousedownEvent(evnt,params){evnt.stopPropagation();evnt.preventDefault();const{row}=params;const{overflowX,scrollbarWidth,overflowY,scrollbarHeight}=reactData;const{elemStore,fullAllDataRowIdData}=internalData;const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const scrollbarYToLeft=computeScrollbarYToLeft.value;const resizableOpts=computeResizableOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const tableEl=refElem.value;const resizeBarElem=refRowResizeBar.value;if(!resizeBarElem){return;}const{clientY:dragClientY}=evnt;const resizeTipElem=resizeBarElem.firstElementChild;const dragBtnElem=evnt.currentTarget;const tdEl=dragBtnElem.parentNode;const trEl=tdEl.parentNode;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const defaultRowHeight=computeDefaultRowHeight.value;const currCellHeight=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;const tableRect=tableEl.getBoundingClientRect();const trRect=trEl.getBoundingClientRect();const targetOffsetY=dragClientY-trRect.y-trEl.clientHeight;let resizeHeight=currCellHeight;const cellEl=tdEl.querySelector('.vxe-cell');let cellMinHeight=0;if(cellEl){const cellStyle=getComputedStyle(cellEl);cellMinHeight=Math.max(1,Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingTop)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingBottom)));}const minTop=trRect.y-tableRect.y+cellMinHeight;// 处理拖动事件
11310
+ */analyColumnWidth(){const{tableFullColumn}=internalData;const columnOpts=computeColumnOpts.value;const{width:defaultWidth,minWidth:defaultMinWidth}=columnOpts;const resizeList=[];const pxList=[];const pxMinList=[];const autoMinList=[];const scaleList=[];const scaleMinList=[];const autoList=[];const remainList=[];tableFullColumn.forEach(column=>{if(defaultWidth&&!column.width){column.width=defaultWidth;}if(defaultMinWidth&&!column.minWidth){column.minWidth=defaultMinWidth;}if(column.visible){if(column.resizeWidth){resizeList.push(column);}else if(column.width==='auto'){autoList.push(column);}else if(isPx(column.width)){pxList.push(column);}else if(isScale(column.width)){scaleList.push(column);}else if(isPx(column.minWidth)){pxMinList.push(column);}else if(column.minWidth==='auto'){autoMinList.push(column);}else if(isScale(column.minWidth)){scaleMinList.push(column);}else{remainList.push(column);}}});Object.assign(reactData.columnStore,{resizeList,pxList,pxMinList,autoMinList,scaleList,scaleMinList,autoList,remainList});},handleColResizeMousedownEvent(evnt,fixedType,params){evnt.stopPropagation();evnt.preventDefault();const{column}=params;const{columnStore,overflowX,scrollbarHeight}=reactData;const{elemStore,visibleColumn}=internalData;const{leftList,rightList}=columnStore;const resizableOpts=computeResizableOpts.value;const osbHeight=overflowX?scrollbarHeight:0;const tableEl=refElem.value;const leftContainerElem=refLeftContainer.value;const rightContainerElem=refRightContainer.value;const resizeBarElem=refColResizeBar.value;if(!resizeBarElem){return;}const isLeftFixed=fixedType==='left';const isRightFixed=fixedType==='right';const resizeTipElem=resizeBarElem.firstElementChild;const scrollbarXToTop=computeScrollbarXToTop.value;const{clientX:dragClientX}=evnt;const dragBtnElem=evnt.target;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});let dragLeft=0;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const tableRect=tableEl.getBoundingClientRect();const rightContainerRect=rightContainerElem?rightContainerElem.getBoundingClientRect():null;const cellRect=cell.getBoundingClientRect();const dragBtnRect=dragBtnElem.getBoundingClientRect();const dragBtnWidth=dragBtnElem.clientWidth;const dragBtnOffsetWidth=Math.floor(dragBtnWidth/2);const dragPosLeft=dragBtnRect.x-tableRect.x+dragBtnOffsetWidth;const minInterval=getColReMinWidth(cellParams)-dragBtnOffsetWidth;// 列之间的最小间距
11311
+ const dragMinLeft=isRightFixed?0:cellRect.x-tableRect.x+dragBtnWidth+minInterval;const dragMaxLeft=cellRect.x-tableRect.x+cell.clientWidth-minInterval;let fixedLeftRemainWidth=0;let fixedRightRemainWidth=0;if(isLeftFixed||isRightFixed){let isMach=false;const fixedColumn=isLeftFixed?leftList:rightList;for(let i=0;i<fixedColumn.length;i++){const item=fixedColumn[i];if(isMach){fixedLeftRemainWidth+=item.renderWidth;}else{isMach=item.id===resizeColumn.id;if(!isMach){fixedRightRemainWidth+=item.renderWidth;}}}}// 处理拖动事件
11312
+ const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const tableHeight=tableEl.clientHeight;const offsetX=evnt.clientX-dragClientX;let left=dragPosLeft+offsetX;if(isLeftFixed){if(rightContainerRect){left=Math.min(left,rightContainerRect.x-tableRect.x-fixedLeftRemainWidth-minInterval);}}else if(isRightFixed){if(leftContainerElem){left=Math.max(left,leftContainerElem.clientWidth+fixedRightRemainWidth+minInterval);}left=Math.min(left,dragMaxLeft);}dragLeft=Math.max(left,dragMinLeft);const resizeBarLeft=Math.max(1,dragLeft);resizeBarElem.style.left=`${resizeBarLeft}px`;resizeBarElem.style.top=`${scrollbarXToTop?osbHeight:0}px`;resizeBarElem.style.height=`${scrollbarXToTop?tableHeight-osbHeight:tableHeight}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeColTip',[Math.floor(resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft))]);const tableWrapperWidth=tableEl.clientWidth;const resizeBarWidth=resizeBarElem.clientWidth;const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeTipLeft=-resizeTipWidth;if(resizeBarLeft<resizeTipWidth+resizeBarWidth){resizeTipLeft=0;}else if(resizeBarLeft>tableWrapperWidth){resizeTipLeft+=tableWrapperWidth-resizeBarLeft;}resizeTipElem.style.left=`${resizeTipLeft}px`;resizeTipElem.style.top=`${Math.min(tableHeight-resizeTipHeight,Math.max(0,evnt.clientY-tableRect.y-resizeTipHeight/2))}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'col-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);const resizeWidth=resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft);const resizeParams={...params,resizeWidth,resizeColumn};if(resizableOpts.dragMode==='fixed'){visibleColumn.forEach(item=>{if(item.id!==resizeColumn.id){if(!item.resizeWidth){item.resizeWidth=item.renderWidth;}}});}if($xeTable.handleColResizeCellAreaEvent){$xeTable.handleColResizeCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}removeClass(tableEl,'col-drag--resize');};updateEvent(evnt);if($xeTable.closeMenu){$xeTable.closeMenu();}},handleColResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoWidth}=resizableOpts;const el=refElem.value;if(isDblclickAutoWidth&&el){evnt.stopPropagation();evnt.preventDefault();const{fullColumnIdData}=internalData;const{column}=params;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const colid=resizeColumn.id;const colRest=fullColumnIdData[colid];const dragBtnElem=evnt.target;const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});const colMinWidth=getColReMinWidth(cellParams);el.setAttribute('data-calc-col','Y');let resizeWidth=calcColumnAutoWidth(resizeColumn,el);el.removeAttribute('data-calc-col');if(colRest){resizeWidth=Math.max(resizeWidth,colRest.width);}resizeWidth=Math.max(colMinWidth,resizeWidth);const resizeParams={...params,resizeWidth,resizeColumn};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleColResizeDblclickCellAreaEvent){$xeTable.handleColResizeDblclickCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}}},handleRowResizeMousedownEvent(evnt,params){evnt.stopPropagation();evnt.preventDefault();const{row}=params;const{overflowX,scrollbarWidth,overflowY,scrollbarHeight}=reactData;const{elemStore,fullAllDataRowIdData}=internalData;const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const scrollbarYToLeft=computeScrollbarYToLeft.value;const resizableOpts=computeResizableOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const tableEl=refElem.value;const resizeBarElem=refRowResizeBar.value;if(!resizeBarElem){return;}const{clientY:dragClientY}=evnt;const resizeTipElem=resizeBarElem.firstElementChild;const dragBtnElem=evnt.currentTarget;const tdEl=dragBtnElem.parentNode;const trEl=tdEl.parentNode;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const defaultRowHeight=computeDefaultRowHeight.value;const currCellHeight=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;const tableRect=tableEl.getBoundingClientRect();const trRect=trEl.getBoundingClientRect();const targetOffsetY=dragClientY-trRect.y-trEl.clientHeight;let resizeHeight=currCellHeight;const cellEl=tdEl.querySelector('.vxe-cell');let cellMinHeight=0;if(cellEl){const cellStyle=getComputedStyle(cellEl);cellMinHeight=Math.max(1,Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingTop)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingBottom)));}const minTop=trRect.y-tableRect.y+cellMinHeight;// 处理拖动事件
11317
11313
  const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const rtWidth=tableEl.clientWidth-osbWidth;const tableHeight=tableEl.clientHeight-osbHeight;let dragTop=evnt.clientY-tableRect.y-targetOffsetY;if(dragTop<minTop){dragTop=minTop;}else{resizeHeight=Math.max(cellMinHeight,currCellHeight+evnt.clientY-dragClientY);}resizeBarElem.style.left=`${scrollbarYToLeft?osbWidth:0}px`;resizeBarElem.style.top=`${dragTop}px`;resizeBarElem.style.width=`${rtWidth}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeRowTip',[resizeHeight]);const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeBarLeft=Math.max(2,evnt.clientX-tableRect.x);let resizeBarTop=0;if(resizeBarLeft+resizeTipWidth>=rtWidth-2){resizeBarLeft=rtWidth-resizeTipWidth-2;}if(dragTop+resizeTipHeight>=tableHeight){resizeBarTop=tableHeight-(dragTop+resizeTipHeight);}resizeTipElem.style.left=`${resizeBarLeft}px`;resizeTipElem.style.top=`${resizeBarTop}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'row-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);if(resizeHeight!==currCellHeight){const resizeParams={...params,resizeHeight,resizeRow:row};internalData.isResizeCellHeight=true;if($xeTable.handleRowResizeCellAreaEvent){$xeTable.handleRowResizeCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);updateRowOffsetTop();}}removeClass(tableEl,'row-drag--resize');};updateEvent(evnt);},handleRowResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoHeight}=resizableOpts;const el=refElem.value;if(isDblclickAutoHeight&&el){evnt.stopPropagation();evnt.preventDefault();const{editStore}=reactData;const{fullAllDataRowIdData}=internalData;const{actived}=editStore;const{row}=params;const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const handleRsHeight=()=>{el.setAttribute('data-calc-row','Y');const resizeHeight=calcCellAutoHeight(rowRest,el);el.removeAttribute('data-calc-row');const resizeParams={...params,resizeHeight,resizeRow:row};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleRowResizeDblclickCellAreaEvent){$xeTable.handleRowResizeDblclickCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);}};if(actived.row||actived.column){$xeTable.clearEdit().then(handleRsHeight);}else{handleRsHeight();}}},saveCustomStore(type){const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{updateStore,storage}=customOpts;const isAllCustom=storage===true;const storageOpts=isAllCustom?{}:Object.assign({},storage||{});const isCustomResizable=isAllCustom||storageOpts.resizable;const isCustomVisible=isAllCustom||storageOpts.visible;const isCustomFixed=isAllCustom||storageOpts.fixed;const isCustomSort=isAllCustom||storageOpts.sort;if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
11318
11314
  reactData.isCustomStatus=true;}if((customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort)){if(!tableId){errLog('vxe.error.reqProp',['id']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const storeData=type==='reset'?{resizableData:{},sortData:{},visibleData:{},fixedData:{}}:tableMethods.getCustomStoreData();if(updateStore){return updateStore({$table:$xeTable,id:tableId,type,storeData});}else{setCustomStorageMap(tableId,type==='reset'?null:storeData);}}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},handleCustom(){const{mouseConfig}=props;if(mouseConfig){if($xeTable.clearSelected){$xeTable.clearSelected();}if($xeTable.clearCellAreas){$xeTable.clearCellAreas();$xeTable.clearCopyCellArea();}}tablePrivateMethods.analyColumnWidth();return tableMethods.refreshColumn(true);},handleUpdateDataQueue(){reactData.upDataFlag++;},handleRefreshColumnQueue(){reactData.reColumnFlag++;},preventEvent(evnt,type,args,next,end){let evntList=table_interceptor.get(type);// 兼容老版本
11319
11315
  if(!evntList.length&&type==='event.clearEdit'){evntList=table_interceptor.get('event.clearActived');if(true){if(evntList.length){warnLog('vxe.error.delEvent',['event.clearActived','event.clearEdit']);}}}// 兼容老版本
@@ -14219,10 +14215,18 @@ hook_hooks.add('tableFilterModule', {
14219
14215
  handleFilterConfirmFilter(null);
14220
14216
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
14221
14217
  },
14218
+ saveFilterPanelByEvent(evnt) {
14219
+ handleFilterConfirmFilter(evnt);
14220
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
14221
+ },
14222
14222
  resetFilterPanel() {
14223
14223
  handleFilterResetFilter(null);
14224
14224
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
14225
14225
  },
14226
+ resetFilterPanelByEvent(evnt) {
14227
+ handleFilterResetFilter(evnt);
14228
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
14229
+ },
14226
14230
  getCheckedFilters() {
14227
14231
  const {
14228
14232
  tableFullColumn