vxe-table 4.19.7 → 4.19.9

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 (35) hide show
  1. package/dist/all.esm.js +384 -73
  2. package/dist/style.css +1 -1
  3. package/es/grid/src/grid.js +1 -1
  4. package/es/style.css +1 -1
  5. package/es/table/render/index.js +153 -14
  6. package/es/table/src/table.js +210 -56
  7. package/es/table/src/util.js +19 -1
  8. package/es/ui/index.js +1 -1
  9. package/es/ui/src/log.js +1 -1
  10. package/lib/grid/src/grid.js +1 -1
  11. package/lib/grid/src/grid.min.js +1 -1
  12. package/lib/index.umd.js +315 -31
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/table/render/index.js +259 -15
  16. package/lib/table/render/index.min.js +1 -1
  17. package/lib/table/src/table.js +31 -12
  18. package/lib/table/src/table.min.js +1 -1
  19. package/lib/table/src/util.js +20 -1
  20. package/lib/table/src/util.min.js +1 -1
  21. package/lib/ui/index.js +1 -1
  22. package/lib/ui/index.min.js +1 -1
  23. package/lib/ui/src/log.js +1 -1
  24. package/lib/ui/src/log.min.js +1 -1
  25. package/package.json +2 -2
  26. package/packages/grid/src/grid.ts +1 -1
  27. package/packages/table/render/index.ts +156 -15
  28. package/packages/table/src/table.ts +217 -58
  29. package/packages/table/src/util.ts +23 -1
  30. /package/es/{iconfont.1780638747281.ttf → iconfont.1780878117167.ttf} +0 -0
  31. /package/es/{iconfont.1780638747281.woff → iconfont.1780878117167.woff} +0 -0
  32. /package/es/{iconfont.1780638747281.woff2 → iconfont.1780878117167.woff2} +0 -0
  33. /package/lib/{iconfont.1780638747281.ttf → iconfont.1780878117167.ttf} +0 -0
  34. /package/lib/{iconfont.1780638747281.woff → iconfont.1780878117167.woff} +0 -0
  35. /package/lib/{iconfont.1780638747281.woff2 → iconfont.1780878117167.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3314,7 +3314,7 @@ function getDefaultConfig(val1, def1) {
3314
3314
  /* unused harmony import specifier */ var VxeUI;
3315
3315
 
3316
3316
 
3317
- const version = "4.19.7";
3317
+ const version = "4.19.9";
3318
3318
  core_.VxeUI.version = version;
3319
3319
  core_.VxeUI.tableVersion = version;
3320
3320
  core_.VxeUI.setConfig({
@@ -3848,7 +3848,7 @@ var es_iterator_some = __webpack_require__(3579);
3848
3848
  const {
3849
3849
  log: log_log
3850
3850
  } = core_.VxeUI;
3851
- const log_version = `table v${"4.19.7"}`;
3851
+ const log_version = `table v${"4.19.9"}`;
3852
3852
  const warnLog = log_log.create('warn', log_version);
3853
3853
  const errLog = log_log.create('error', log_version);
3854
3854
  ;// ./packages/table/src/columnInfo.ts
@@ -4422,6 +4422,8 @@ function createInternalData() {
4422
4422
  sourceDataRowIdData: {},
4423
4423
  fullColumnIdData: {},
4424
4424
  fullColumnFieldData: {},
4425
+ fullCellHeightMaps: {},
4426
+ fullCellStoreMaps: {},
4425
4427
  // 当前行
4426
4428
  currentRow: null,
4427
4429
  // 合并表头单元格的数据
@@ -4482,7 +4484,8 @@ function createInternalData() {
4482
4484
  inited: false,
4483
4485
  tooltipTimeout: null,
4484
4486
  initStatus: false,
4485
- isActivated: false
4487
+ isActivated: false,
4488
+ rceDelay: 0
4486
4489
  // _sToTime: null
4487
4490
  };
4488
4491
  }
@@ -4730,6 +4733,21 @@ function createReactData() {
4730
4733
  isColLoading: false
4731
4734
  };
4732
4735
  }
4736
+ const maxKey = '__max';
4737
+ function getRowMaxHeight(chRest, isForce) {
4738
+ if (isForce || !chRest[maxKey]) {
4739
+ let max = 0;
4740
+ for (const key in chRest) {
4741
+ const val = chRest[key];
4742
+ if (key !== maxKey && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val) && val > max) {
4743
+ max = val;
4744
+ }
4745
+ }
4746
+ chRest[maxKey] = max;
4747
+ return max;
4748
+ }
4749
+ return chRest[maxKey];
4750
+ }
4733
4751
  const getAllConvertColumns = (columns, parentColumn) => {
4734
4752
  const result = [];
4735
4753
  columns.forEach(column => {
@@ -19642,7 +19660,40 @@ render_renderer.mixin({
19642
19660
  renderTableEdit: nativeSelectEditRender,
19643
19661
  renderTableDefault: nativeSelectEditRender,
19644
19662
  renderTableCell(renderOpts, params) {
19645
- return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
19663
+ const {
19664
+ options,
19665
+ optionGroups
19666
+ } = renderOpts;
19667
+ const {
19668
+ $table,
19669
+ row,
19670
+ column
19671
+ } = params;
19672
+ const opSize = options ? options.length : null;
19673
+ const ogSize = optionGroups ? optionGroups.length : null;
19674
+ const {
19675
+ cellResult
19676
+ } = $table.effectCellData(row, column, {
19677
+ key: 'render_table_cell',
19678
+ isChanged({
19679
+ oldValue,
19680
+ cellValue
19681
+ }) {
19682
+ return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
19683
+ },
19684
+ setValue({
19685
+ cellValue
19686
+ }) {
19687
+ return [cellValue, opSize, ogSize];
19688
+ },
19689
+ getResult({
19690
+ cellValue
19691
+ }) {
19692
+ return handleSelectCellValue(cellValue, renderOpts);
19693
+ }
19694
+ });
19695
+ // const cellResult = getSelectCellValue(renderOpts, params)
19696
+ return getCellLabelVNs(renderOpts, params, cellResult);
19646
19697
  },
19647
19698
  createTableFilterOptions: defaultFilterOptions,
19648
19699
  renderTableFilter(renderOpts, params) {
@@ -19780,20 +19831,28 @@ render_renderer.mixin({
19780
19831
  tableAutoFocus: 'input',
19781
19832
  renderTableEdit: defaultEditRender,
19782
19833
  renderTableCell(renderOpts, params) {
19834
+ const props = renderOpts.props || {};
19783
19835
  const {
19784
- props = {}
19785
- } = renderOpts;
19786
- const {
19836
+ $table,
19787
19837
  row,
19788
19838
  column
19789
19839
  } = params;
19790
- let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
19791
- if (cellValue) {
19792
- if (props.type !== 'time') {
19793
- cellValue = getLabelFormatDate(cellValue, props);
19840
+ const {
19841
+ cellResult
19842
+ } = $table.effectCellData(row, column, {
19843
+ key: 'render_table_cell',
19844
+ getResult({
19845
+ cellValue
19846
+ }) {
19847
+ if (cellValue) {
19848
+ if (props.type !== 'time') {
19849
+ return getLabelFormatDate(cellValue, props);
19850
+ }
19851
+ }
19852
+ return cellValue;
19794
19853
  }
19795
- }
19796
- return getCellLabelVNs(renderOpts, params, cellValue);
19854
+ });
19855
+ return getCellLabelVNs(renderOpts, params, cellResult);
19797
19856
  },
19798
19857
  tableCellFormatter: handleFormatDatePicker,
19799
19858
  renderTableDefault: defaultEditRender,
@@ -19851,6 +19910,46 @@ render_renderer.mixin({
19851
19910
  }, seOs)
19852
19911
  })];
19853
19912
  },
19913
+ renderTableDefault(renderOpts, params) {
19914
+ const {
19915
+ startField,
19916
+ endField
19917
+ } = renderOpts;
19918
+ const {
19919
+ row,
19920
+ column
19921
+ } = params;
19922
+ const {
19923
+ model
19924
+ } = column;
19925
+ const cellValue = getCellValue(row, column);
19926
+ const seProps = {};
19927
+ const seOs = {};
19928
+ if (startField && endField) {
19929
+ seProps.startValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, startField);
19930
+ seProps.endValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, endField);
19931
+ seOs['onUpdate:startValue'] = value => {
19932
+ if (startField) {
19933
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, startField, value);
19934
+ }
19935
+ };
19936
+ seOs['onUpdate:endValue'] = value => {
19937
+ if (endField) {
19938
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, endField, value);
19939
+ }
19940
+ };
19941
+ }
19942
+ return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(getDefaultComponent(renderOpts), {
19943
+ ...getCellEditProps(renderOpts, params, cellValue, seProps),
19944
+ ...getComponentOns(renderOpts, params, {
19945
+ model(cellValue) {
19946
+ model.update = true;
19947
+ model.value = cellValue;
19948
+ setCellValue(row, column, cellValue);
19949
+ }
19950
+ }, seOs)
19951
+ })];
19952
+ },
19854
19953
  renderTableCell(renderOpts, params) {
19855
19954
  const {
19856
19955
  startField,
@@ -19887,6 +19986,7 @@ render_renderer.mixin({
19887
19986
  },
19888
19987
  VxeTextarea: {
19889
19988
  tableAutoFocus: 'textarea',
19989
+ renderTableDefault: defaultEditRender,
19890
19990
  renderTableEdit: defaultEditRender,
19891
19991
  renderTableCell(renderOpts, params) {
19892
19992
  const {
@@ -19917,7 +20017,40 @@ render_renderer.mixin({
19917
20017
  renderTableEdit: defaultSelectEditRender,
19918
20018
  renderTableDefault: defaultSelectEditRender,
19919
20019
  renderTableCell(renderOpts, params) {
19920
- return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
20020
+ const {
20021
+ options,
20022
+ optionGroups
20023
+ } = renderOpts;
20024
+ const {
20025
+ $table,
20026
+ row,
20027
+ column
20028
+ } = params;
20029
+ const opSize = options ? options.length : null;
20030
+ const ogSize = optionGroups ? optionGroups.length : null;
20031
+ const {
20032
+ cellResult
20033
+ } = $table.effectCellData(row, column, {
20034
+ key: 'render_table_cell',
20035
+ isChanged({
20036
+ oldValue,
20037
+ cellValue
20038
+ }) {
20039
+ return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
20040
+ },
20041
+ setValue({
20042
+ cellValue
20043
+ }) {
20044
+ return [cellValue, opSize, ogSize];
20045
+ },
20046
+ getResult({
20047
+ cellValue
20048
+ }) {
20049
+ return handleSelectCellValue(cellValue, renderOpts);
20050
+ }
20051
+ });
20052
+ // const cellResult = getSelectCellValue(renderOpts, params)
20053
+ return getCellLabelVNs(renderOpts, params, cellResult);
19921
20054
  },
19922
20055
  createTableFilterOptions: defaultFilterOptions,
19923
20056
  renderTableFilter(renderOpts, params) {
@@ -20022,7 +20155,40 @@ render_renderer.mixin({
20022
20155
  },
20023
20156
  FormatSelect: {
20024
20157
  renderTableDefault(renderOpts, params) {
20025
- return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
20158
+ const {
20159
+ options,
20160
+ optionGroups
20161
+ } = renderOpts;
20162
+ const {
20163
+ $table,
20164
+ row,
20165
+ column
20166
+ } = params;
20167
+ const opSize = options ? options.length : null;
20168
+ const ogSize = optionGroups ? optionGroups.length : null;
20169
+ const {
20170
+ cellResult
20171
+ } = $table.effectCellData(row, column, {
20172
+ key: 'render_table_cell',
20173
+ isChanged({
20174
+ oldValue,
20175
+ cellValue
20176
+ }) {
20177
+ return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
20178
+ },
20179
+ setValue({
20180
+ cellValue
20181
+ }) {
20182
+ return [cellValue, opSize, ogSize];
20183
+ },
20184
+ getResult({
20185
+ cellValue
20186
+ }) {
20187
+ return handleSelectCellValue(cellValue, renderOpts);
20188
+ }
20189
+ });
20190
+ // const cellResult = getSelectCellValue(renderOpts, params)
20191
+ return getCellLabelVNs(renderOpts, params, cellResult);
20026
20192
  },
20027
20193
  tableCellFormatter: handleFormatSelect,
20028
20194
  tableCellCopyMethod: handleFormatSelect,
@@ -20034,7 +20200,40 @@ render_renderer.mixin({
20034
20200
  tableAutoFocus: 'input',
20035
20201
  renderTableEdit: defaultTableOrTreeSelectEditRender,
20036
20202
  renderTableCell(renderOpts, params) {
20037
- return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params));
20203
+ const {
20204
+ options,
20205
+ optionGroups
20206
+ } = renderOpts;
20207
+ const {
20208
+ $table,
20209
+ row,
20210
+ column
20211
+ } = params;
20212
+ const opSize = options ? options.length : null;
20213
+ const ogSize = optionGroups ? optionGroups.length : null;
20214
+ const {
20215
+ cellResult
20216
+ } = $table.effectCellData(row, column, {
20217
+ key: 'render_table_cell',
20218
+ isChanged({
20219
+ oldValue,
20220
+ cellValue
20221
+ }) {
20222
+ return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
20223
+ },
20224
+ setValue({
20225
+ cellValue
20226
+ }) {
20227
+ return [cellValue, opSize, ogSize];
20228
+ },
20229
+ getResult({
20230
+ cellValue
20231
+ }) {
20232
+ return handleTreeSelectCellValue(cellValue, renderOpts);
20233
+ }
20234
+ });
20235
+ // const cellResult = getTreeSelectCellValue(renderOpts, params)
20236
+ return getCellLabelVNs(renderOpts, params, cellResult);
20038
20237
  },
20039
20238
  tableCellFormatter: handleFormatTreeSelect,
20040
20239
  tableCellCopyMethod: handleFormatTreeSelect,
@@ -20052,7 +20251,40 @@ render_renderer.mixin({
20052
20251
  },
20053
20252
  FormatTreeSelect: {
20054
20253
  renderTableDefault(renderOpts, params) {
20055
- return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params));
20254
+ const {
20255
+ options,
20256
+ optionGroups
20257
+ } = renderOpts;
20258
+ const {
20259
+ $table,
20260
+ row,
20261
+ column
20262
+ } = params;
20263
+ const opSize = options ? options.length : null;
20264
+ const ogSize = optionGroups ? optionGroups.length : null;
20265
+ const {
20266
+ cellResult
20267
+ } = $table.effectCellData(row, column, {
20268
+ key: 'render_table_cell',
20269
+ isChanged({
20270
+ oldValue,
20271
+ cellValue
20272
+ }) {
20273
+ return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
20274
+ },
20275
+ setValue({
20276
+ cellValue
20277
+ }) {
20278
+ return [cellValue, opSize, ogSize];
20279
+ },
20280
+ getResult({
20281
+ cellValue
20282
+ }) {
20283
+ return handleTreeSelectCellValue(cellValue, renderOpts);
20284
+ }
20285
+ });
20286
+ // const cellResult = getTreeSelectCellValue(renderOpts, params)
20287
+ return getCellLabelVNs(renderOpts, params, cellResult);
20056
20288
  },
20057
20289
  tableCellFormatter: handleFormatTreeSelect,
20058
20290
  tableCellCopyMethod: handleFormatTreeSelect,
@@ -20063,7 +20295,40 @@ render_renderer.mixin({
20063
20295
  tableAutoFocus: 'input',
20064
20296
  renderTableEdit: defaultTableOrTreeSelectEditRender,
20065
20297
  renderTableCell(renderOpts, params) {
20066
- return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params));
20298
+ const {
20299
+ options,
20300
+ optionGroups
20301
+ } = renderOpts;
20302
+ const {
20303
+ $table,
20304
+ row,
20305
+ column
20306
+ } = params;
20307
+ const opSize = options ? options.length : null;
20308
+ const ogSize = optionGroups ? optionGroups.length : null;
20309
+ const {
20310
+ cellResult
20311
+ } = $table.effectCellData(row, column, {
20312
+ key: 'render_table_cell',
20313
+ isChanged({
20314
+ oldValue,
20315
+ cellValue
20316
+ }) {
20317
+ return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
20318
+ },
20319
+ setValue({
20320
+ cellValue
20321
+ }) {
20322
+ return [cellValue, opSize, ogSize];
20323
+ },
20324
+ getResult({
20325
+ cellValue
20326
+ }) {
20327
+ return handleTreeSelectCellValue(cellValue, renderOpts);
20328
+ }
20329
+ });
20330
+ // const cellResult = getTreeSelectCellValue(renderOpts, params)
20331
+ return getCellLabelVNs(renderOpts, params, cellResult);
20067
20332
  },
20068
20333
  tableCellFormatter: handleFormatTreeSelect,
20069
20334
  tableCellCopyMethod: handleFormatTreeSelect,
@@ -20363,9 +20628,9 @@ remainList.forEach(column=>{const width=Math.max(meanWidth,minCellWidth);column.
20363
20628
  * 排除已设置 max-width
20364
20629
  */const dynamicList=scaleList.concat(scaleMinList).concat(pxMinList).concat(autoMinList).concat(remainList).filter(column=>!parseColumnMaxWidth(column));let dynamicSize=dynamicList.length-1;if(dynamicSize>0){let i=bodyWidth-tWidth;if(i>0){while(i>0&&dynamicSize>=0){i--;dynamicList[dynamicSize--].renderWidth++;}tWidth=bodyWidth;}}}reactData.scrollXWidth=tWidth;reactData.resizeWidthFlag++;updateColumnOffsetLeft();updateHeight();};/**
20365
20630
  * 计算自适应行高
20366
- */const calcCellAutoHeight=(rowRest,wrapperEl)=>{const{scrollXLoad}=reactData;const wrapperElemList=wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);let colHeight=0;let firstCellStyle=null;let topBottomPadding=0;for(let i=0;i<wrapperElemList.length;i++){const wrapperElem=wrapperElemList[i];const cellElem=wrapperElem.parentElement;const cellStyle=cellElem.style;const orHeight=cellStyle.height;if(!scrollXLoad){cellStyle.height='';}if(!firstCellStyle){firstCellStyle=getComputedStyle(cellElem);topBottomPadding=firstCellStyle?Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingTop)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingBottom)):0;}if(!scrollXLoad){cellStyle.height=orHeight;}const cellHeight=wrapperElem?wrapperElem.clientHeight:0;colHeight=Math.max(colHeight,Math.ceil(cellHeight+topBottomPadding));}if(scrollXLoad){colHeight=Math.max(colHeight,rowRest.height);}return colHeight;};/**
20631
+ */const calcCellAutoHeight=(rowid,rowRest,wrapperEl)=>{const{fullCellHeightMaps}=internalData;let chRest=fullCellHeightMaps[rowid];if(!chRest){chRest={};fullCellHeightMaps[rowid]=chRest;}const wrapperElemList=wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);let firstCellStyle=null;let topBottomPadding=0;let changeCH=false;for(let i=0;i<wrapperElemList.length;i++){const wrapperElem=wrapperElemList[i];const cellElem=wrapperElem.parentElement;const cellStyle=cellElem.style;const orHeight=cellStyle.height;const colid=wrapperElem.getAttribute('colid')||'';cellStyle.height='';if(!firstCellStyle){firstCellStyle=getComputedStyle(cellElem);topBottomPadding=firstCellStyle?Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingTop)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingBottom)):0;}const cellHeight=wrapperElem?wrapperElem.clientHeight:0;const colHeight=Math.ceil(cellHeight+topBottomPadding);if(chRest[colid]!==colHeight){changeCH=true;chRest[colid]=colHeight;}cellStyle.height=orHeight;}const cellMaxHeight=getRowMaxHeight(chRest,changeCH);return cellMaxHeight;};/**
20367
20632
  * 自适应行高
20368
- */const calcCellHeight=()=>{const{treeConfig}=props;const{tableData,isAllOverflow,scrollYLoad,scrollXLoad}=reactData;const{fullAllDataRowIdData}=internalData;const el=refElem.value;if(!el||!el.clientWidth){return;}const treeOpts=computeTreeOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;if(!isAllOverflow&&(scrollYLoad||scrollXLoad||treeConfig&&treeOpts.showLine)){const{handleGetRowId}=createHandleGetRowId($xeTable);el.setAttribute('data-calc-row','Y');tableData.forEach(row=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const reHeight=calcCellAutoHeight(rowRest,el);rowRest.height=Math.max(defaultRowHeight,reHeight);}el.removeAttribute('data-calc-row');});reactData.calcCellHeightFlag++;}};const getOrderField=column=>{const{isRowGroupStatus}=reactData;const{sortBy,sortType,aggFunc}=column;return isRowGroupStatus&&aggFunc?row=>{if(row.isAggregate){const aggData=row.aggData;const currAggData=aggData?aggData[column.field]:null;return currAggData?currAggData.value:null;}let cellValue;if(sortBy){cellValue=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(sortBy)?sortBy({row,column}):external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,sortBy);}else{cellValue=$xeTable.getCellLabel(row,column);}if(!sortType||sortType==='auto'){return isNaN(cellValue)?cellValue:external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);}else if(sortType==='number'){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);}else if(sortType==='string'){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(cellValue);}return cellValue;}:row=>{let cellValue;if(sortBy){cellValue=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(sortBy)?sortBy({row,column}):external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,sortBy);}else{cellValue=$xeTable.getCellLabel(row,column);}if(!sortType||sortType==='auto'){return isNaN(cellValue)?cellValue:external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);}else if(sortType==='number'){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);}else if(sortType==='string'){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(cellValue);}return cellValue;};};const updateAfterListIndex=()=>{const{treeConfig}=props;const{afterFullData,fullDataRowIdData,fullAllDataRowIdData}=internalData;const{handleGetRowId}=createHandleGetRowId($xeTable);const fullMaps={};afterFullData.forEach((row,index)=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];const seq=index+1;if(rowRest){if(!treeConfig){rowRest.seq=seq;}rowRest._index=index;}else{const rest={row,rowid,seq,index:-1,$index:-1,_index:index,treeIndex:-1,_tIndex:-1,items:[],parent:null,level:0,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullAllDataRowIdData[rowid]=rest;fullDataRowIdData[rowid]=rest;}fullMaps[rowid]=row;});internalData.afterFullRowMaps=fullMaps;};/**
20633
+ */const calcCellHeight=()=>{const{treeConfig}=props;const{tableData,isAllOverflow,scrollYLoad,scrollXLoad}=reactData;const{fullAllDataRowIdData}=internalData;const el=refElem.value;if(!el||!el.clientWidth){return;}const treeOpts=computeTreeOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;if(!isAllOverflow&&(scrollYLoad||scrollXLoad||treeConfig&&treeOpts.showLine)){const{handleGetRowId}=createHandleGetRowId($xeTable);el.setAttribute('data-calc-row','Y');tableData.forEach(row=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const reHeight=calcCellAutoHeight(rowid,rowRest,el);rowRest.height=Math.max(defaultRowHeight,reHeight);}el.removeAttribute('data-calc-row');});reactData.calcCellHeightFlag++;}};const getOrderField=column=>{const{isRowGroupStatus}=reactData;const{sortBy,sortType,aggFunc}=column;return isRowGroupStatus&&aggFunc?row=>{if(row.isAggregate){const aggData=row.aggData;const currAggData=aggData?aggData[column.field]:null;return currAggData?currAggData.value:null;}let cellValue;if(sortBy){cellValue=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(sortBy)?sortBy({row,column}):external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,sortBy);}else{cellValue=$xeTable.getCellLabel(row,column);}if(!sortType||sortType==='auto'){return isNaN(cellValue)?cellValue:external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);}else if(sortType==='number'){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);}else if(sortType==='string'){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(cellValue);}return cellValue;}:row=>{let cellValue;if(sortBy){cellValue=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(sortBy)?sortBy({row,column}):external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,sortBy);}else{cellValue=$xeTable.getCellLabel(row,column);}if(!sortType||sortType==='auto'){return isNaN(cellValue)?cellValue:external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);}else if(sortType==='number'){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);}else if(sortType==='string'){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(cellValue);}return cellValue;};};const updateAfterListIndex=()=>{const{treeConfig}=props;const{afterFullData,fullDataRowIdData,fullAllDataRowIdData}=internalData;const{handleGetRowId}=createHandleGetRowId($xeTable);const fullMaps={};afterFullData.forEach((row,index)=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];const seq=index+1;if(rowRest){if(!treeConfig){rowRest.seq=seq;}rowRest._index=index;}else{const rest={row,rowid,seq,index:-1,$index:-1,_index:index,treeIndex:-1,_tIndex:-1,items:[],parent:null,level:0,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullAllDataRowIdData[rowid]=rest;fullDataRowIdData[rowid]=rest;}fullMaps[rowid]=row;});internalData.afterFullRowMaps=fullMaps;};/**
20369
20634
  * 预编译
20370
20635
  * 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
20371
20636
  */const updateAfterDataIndex=()=>{const{treeConfig}=props;const{fullDataRowIdData,fullAllDataRowIdData,afterFullData,afterTreeFullData}=internalData;const treeOpts=computeTreeOpts.value;const{transform}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const fullMaps={};if(treeConfig){let _treeIndex=0;const{handleGetRowId}=createHandleGetRowId($xeTable);external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeFullData,(row,index,items,path)=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];const seq=path.map((num,i)=>i%2===0?Number(num)+1:'.').join('');if(rowRest){rowRest.seq=seq;rowRest.treeIndex=index;rowRest._tIndex=_treeIndex;}else{const rest={row,rowid,seq,index:-1,$index:-1,_index:-1,treeIndex:-1,_tIndex:_treeIndex,items:[],parent:null,level:0,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullAllDataRowIdData[rowid]=rest;fullDataRowIdData[rowid]=rest;}_treeIndex++;fullMaps[rowid]=row;},{children:transform?treeOpts.mapChildrenField:childrenField});if(transform){afterFullData.forEach((row,index)=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];const seq=index+1;if(rowRest){if(!treeConfig){rowRest.seq=seq;}rowRest._index=index;}});}internalData.afterFullRowMaps=fullMaps;}else{updateAfterListIndex();}};/**
@@ -20452,8 +20717,9 @@ if(!checkStrictly&&$xeTable.isCheckedByCheckboxRow(row)){handleCheckedCheckboxRo
20452
20717
  const computeScrollLoad=()=>{return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{const{scrollXLoad,scrollYLoad}=reactData;const{scrollXStore,scrollYStore}=internalData;const virtualYOpts=computeVirtualYOpts.value;const virtualXOpts=computeVirtualXOpts.value;// 计算 X 逻辑
20453
20718
  if(scrollXLoad){const{toVisibleIndex:toXVisibleIndex,visibleSize:visibleXSize}=handleVirtualXVisible();const offsetXSize=Math.max(0,virtualXOpts.oSize?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualXOpts.oSize):0);scrollXStore.preloadSize=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualXOpts.preSize);scrollXStore.offsetSize=offsetXSize;scrollXStore.visibleSize=visibleXSize;scrollXStore.endIndex=Math.max(scrollXStore.startIndex+scrollXStore.visibleSize+offsetXSize,scrollXStore.endIndex);scrollXStore.visibleStartIndex=Math.max(scrollXStore.startIndex,toXVisibleIndex);scrollXStore.visibleEndIndex=Math.min(scrollXStore.endIndex,toXVisibleIndex+visibleXSize);$xeTable.updateScrollXData().then(()=>{loadScrollXData();});}else{$xeTable.updateScrollXSpace();}// 计算 Y 逻辑
20454
20719
  const rowHeight=computeRowHeight();scrollYStore.rowHeight=rowHeight;// 已废弃
20455
- reactData.rowHeight=rowHeight;const{toVisibleIndex:toYVisibleIndex,visibleSize:visibleYSize}=handleVirtualYVisible();if(scrollYLoad){const offsetYSize=Math.max(0,virtualYOpts.oSize?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualYOpts.oSize):0);scrollYStore.preloadSize=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualYOpts.preSize);scrollYStore.offsetSize=offsetYSize;scrollYStore.visibleSize=visibleYSize;scrollYStore.endIndex=Math.max(scrollYStore.startIndex+visibleYSize+offsetYSize,scrollYStore.endIndex);scrollYStore.visibleStartIndex=Math.max(scrollYStore.startIndex,toYVisibleIndex);scrollYStore.visibleEndIndex=Math.min(scrollYStore.endIndex,toYVisibleIndex+visibleYSize);$xeTable.updateScrollYData().then(()=>{loadScrollYData();});}else{$xeTable.updateScrollYSpace();}});};const calcScrollbar=()=>{const{scrollXWidth,scrollYHeight}=reactData;const{elemStore}=internalData;const scrollbarOpts=computeScrollbarOpts.value;const el=refElem.value;if(!el||!el.clientWidth){return;}const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const headerTableElem=getRefElem(elemStore['main-header-table']);const footerTableElem=getRefElem(elemStore['main-footer-table']);const xHandleEl=refScrollXHandleElem.value;const yHandleEl=refScrollYHandleElem.value;let overflowY=false;let overflowX=false;if(bodyWrapperElem){overflowY=scrollYHeight>bodyWrapperElem.clientHeight;if(yHandleEl){reactData.scrollbarWidth=scrollbarOpts.width||yHandleEl.offsetWidth-yHandleEl.clientWidth||14;}reactData.overflowY=overflowY;overflowX=scrollXWidth>bodyWrapperElem.clientWidth;if(xHandleEl){reactData.scrollbarHeight=scrollbarOpts.height||xHandleEl.offsetHeight-xHandleEl.clientHeight||14;}const hHeight=headerTableElem?headerTableElem.clientHeight:0;const fHeight=footerTableElem?footerTableElem.clientHeight:0;internalData.tableHeight=bodyWrapperElem.offsetHeight;internalData.tHeaderHeight=hHeight;internalData.tFooterHeight=fHeight;reactData.overflowX=overflowX;reactData.parentHeight=Math.max(hHeight+fHeight+20,$xeTable.getParentHeight());}if(overflowX){$xeTable.checkScrolling();}};const handleRecalculateStyle=(reFull,reWidth,reHeight)=>{const el=refElem.value;internalData.rceRunTime=Date.now();if(!el||!el.clientWidth){return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const varEl=refVarElem.value;if(varEl){const[defEl,mediumEl,smallEl,miniEl]=varEl.children;calcVarRowHeightConfig('default',defEl);calcVarRowHeightConfig('medium',mediumEl);calcVarRowHeightConfig('small',smallEl);calcVarRowHeightConfig('mini',miniEl);}if(reWidth){calcCellWidth();}if(reFull){autoCellWidth();}calcScrollbar();updateStyle();updateRowExpandStyle();if(reFull){updateTreeLineStyle();}return computeScrollLoad().then(()=>{// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
20456
- if(reWidth){calcCellWidth();}if(reFull){autoCellWidth();}if(reHeight){calcCellHeight();}updateStyle();calcScrollbar();if(reFull){updateRowOffsetTop();}updateRowExpandStyle();if(reFull){updateTreeLineStyle();}if(reFull){return computeScrollLoad();}});};const handleLazyRecalculate=(reFull,reWidth,reHeight)=>{return new Promise(resolve=>{const $xeGanttView=internalData.xeGanttView;const{customStore}=reactData;const{rceTimeout,rceRunTime}=internalData;const resizeOpts=computeResizeOpts.value;const refreshDelay=resizeOpts.refreshDelay||20;const el=refElem.value;if(el&&el.clientWidth){autoCellWidth();updateRowExpandStyle();}if(customStore.visible&&$xeTable.handleCustomStyle){$xeTable.handleCustomStyle();}if(rceTimeout){clearTimeout(rceTimeout);if(rceRunTime&&rceRunTime+(refreshDelay-5)<Date.now()){resolve(handleRecalculateStyle(reFull,reWidth,reHeight));}else{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{resolve();});}}else{resolve(handleRecalculateStyle(reFull,reWidth,reHeight));}if($xeGanttView&&$xeGanttView.handleLazyRecalculate){$xeGanttView.handleLazyRecalculate();}internalData.rceTimeout=setTimeout(()=>{internalData.rceTimeout=undefined;handleRecalculateStyle(reFull,reWidth,reHeight);},refreshDelay);});};const handleResizeEvent=()=>{handleLazyRecalculate(true,true,true);};const handleUpdateAggValues=()=>{const{visibleColumn}=internalData;const aggCols=[];visibleColumn.forEach(column=>{if(column.aggFunc){aggCols.push(column);}});reactData.aggHandleAggColumns=aggCols;};const handleUpdateRowGroup=groupFields=>{const aggGroupFields=[];const aggGroupConfs=[];if(groupFields){(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(groupFields)?groupFields:[groupFields]).forEach(field=>{aggGroupFields.push(field);aggGroupConfs.push({field});});}reactData.rowGroupList=aggGroupConfs;reactData.aggHandleFields=aggGroupFields;handleUpdateAggValues();};const handleeGroupSummary=aggList=>{const{fullColumnFieldData}=internalData;const aggregateOpts=computeAggregateOpts.value;const aggFuncColumns=computeAggFuncColumns.value;const{mapChildrenField}=aggregateOpts;const aggCalcMethod=aggregateOpts.calcValuesMethod||aggregateOpts.countMethod||aggregateOpts.aggregateMethod;if(mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(aggList,aggRow=>{let count=0;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(aggRow[mapChildrenField],row=>{if(row.isAggregate){count+=row.childCount||0;}else{count++;}});aggRow.childCount=count;});if($xeTable.handlePivotTableAggData){$xeTable.handlePivotTableAggData(aggList);}else{if(aggFuncColumns.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(aggList,aggRow=>{const aggDtObj={};const aggData=aggRow.aggData;const groupField=aggRow.groupField;const groupContent=aggRow.groupContent;const childList=mapChildrenField?aggRow[mapChildrenField]||[]:[];const childCount=aggRow.childCount;const colRest=fullColumnFieldData[groupField]||{};aggFuncColumns.forEach(column=>{const{field}=column;const currAggData=aggData?aggData[field]:null;const ctParams={$table:$xeTable,groupField,groupColumn:colRest?colRest.column:null,column,groupValue:groupContent,childList,childCount,aggValue:currAggData?currAggData.value:0,/**
20720
+ reactData.rowHeight=rowHeight;const{toVisibleIndex:toYVisibleIndex,visibleSize:visibleYSize}=handleVirtualYVisible();if(scrollYLoad){const offsetYSize=Math.max(0,virtualYOpts.oSize?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualYOpts.oSize):0);scrollYStore.preloadSize=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualYOpts.preSize);scrollYStore.offsetSize=offsetYSize;scrollYStore.visibleSize=visibleYSize;scrollYStore.endIndex=Math.max(scrollYStore.startIndex+visibleYSize+offsetYSize,scrollYStore.endIndex);scrollYStore.visibleStartIndex=Math.max(scrollYStore.startIndex,toYVisibleIndex);scrollYStore.visibleEndIndex=Math.min(scrollYStore.endIndex,toYVisibleIndex+visibleYSize);$xeTable.updateScrollYData().then(()=>{loadScrollYData();});}else{$xeTable.updateScrollYSpace();}});};const calcScrollbar=()=>{const{scrollXWidth,scrollYHeight}=reactData;const{elemStore}=internalData;const scrollbarOpts=computeScrollbarOpts.value;const el=refElem.value;if(!el||!el.clientWidth){return;}const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const headerTableElem=getRefElem(elemStore['main-header-table']);const footerTableElem=getRefElem(elemStore['main-footer-table']);const xHandleEl=refScrollXHandleElem.value;const yHandleEl=refScrollYHandleElem.value;let overflowY=false;let overflowX=false;if(bodyWrapperElem){overflowY=scrollYHeight>bodyWrapperElem.clientHeight;if(yHandleEl){reactData.scrollbarWidth=scrollbarOpts.width||yHandleEl.offsetWidth-yHandleEl.clientWidth||14;}reactData.overflowY=overflowY;overflowX=scrollXWidth>bodyWrapperElem.clientWidth;if(xHandleEl){reactData.scrollbarHeight=scrollbarOpts.height||xHandleEl.offsetHeight-xHandleEl.clientHeight||14;}const hHeight=headerTableElem?headerTableElem.clientHeight:0;const fHeight=footerTableElem?footerTableElem.clientHeight:0;internalData.tableHeight=bodyWrapperElem.offsetHeight;internalData.tHeaderHeight=hHeight;internalData.tFooterHeight=fHeight;reactData.overflowX=overflowX;reactData.parentHeight=Math.max(hHeight+fHeight+20,$xeTable.getParentHeight());}if(overflowX){$xeTable.checkScrolling();}};const handleRecalculateStyle=(reFull,reWidth,reHeight)=>{const el=refElem.value;if(!el||!el.clientWidth){return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const varEl=refVarElem.value;if(varEl){const[defEl,mediumEl,smallEl,miniEl]=varEl.children;calcVarRowHeightConfig('default',defEl);calcVarRowHeightConfig('medium',mediumEl);calcVarRowHeightConfig('small',smallEl);calcVarRowHeightConfig('mini',miniEl);}if(reWidth){calcCellWidth();}if(reFull){autoCellWidth();}calcScrollbar();updateStyle();updateRowExpandStyle();if(reFull){updateTreeLineStyle();}internalData.rceRunTime=Date.now();return computeScrollLoad().then(()=>{// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
20721
+ if(reWidth){calcCellWidth();}if(reFull){autoCellWidth();}if(reHeight){calcCellHeight();}updateStyle();calcScrollbar();if(reFull){updateRowOffsetTop();}updateRowExpandStyle();if(reFull){updateTreeLineStyle();}internalData.rceRunTime=Date.now();if(reFull){return computeScrollLoad();}});};const minRunDelay=50;const handleLazyRecalculate=(reFull,reWidth,reHeight)=>{return new Promise(resolve=>{const $xeGanttView=internalData.xeGanttView;const{customStore}=reactData;const{rceTimeout,rceRunTime}=internalData;const resizeOpts=computeResizeOpts.value;let rceDelay=internalData.rceDelay;// 如果在500毫秒内频繁执行,则执行次数减缓
20722
+ if(rceRunTime&&rceRunTime>Date.now()-500){rceDelay+=50;}else{rceDelay=0;}internalData.rceDelay=rceDelay;const refreshDelay=resizeOpts.refreshDelay||30;const reDelay=rceDelay+refreshDelay;const el=refElem.value;if(el&&el.clientWidth){autoCellWidth();updateRowExpandStyle();}if(customStore.visible&&$xeTable.handleCustomStyle){$xeTable.handleCustomStyle();}if(rceTimeout){clearTimeout(rceTimeout);if(rceRunTime&&rceRunTime+minRunDelay<Date.now()){resolve(handleRecalculateStyle(reFull,reWidth,reHeight));}else{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{resolve();});}}else{resolve(handleRecalculateStyle(reFull,reWidth,reHeight));}if($xeGanttView&&$xeGanttView.handleLazyRecalculate){$xeGanttView.handleLazyRecalculate();}internalData.rceTimeout=setTimeout(()=>{internalData.rceTimeout=undefined;handleRecalculateStyle(reFull,reWidth,reHeight);if($xeGanttView&&$xeGanttView.handleLazyRecalculate){$xeGanttView.handleLazyRecalculate();}},reDelay);});};let resizePending=false;const handleResizeEvent=()=>{if(resizePending){return;}resizePending=true;handleLazyRecalculate(true,true,true).then(()=>{resizePending=false;}).catch(()=>{resizePending=false;});};const handleUpdateAggValues=()=>{const{visibleColumn}=internalData;const aggCols=[];visibleColumn.forEach(column=>{if(column.aggFunc){aggCols.push(column);}});reactData.aggHandleAggColumns=aggCols;};const handleUpdateRowGroup=groupFields=>{const aggGroupFields=[];const aggGroupConfs=[];if(groupFields){(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(groupFields)?groupFields:[groupFields]).forEach(field=>{aggGroupFields.push(field);aggGroupConfs.push({field});});}reactData.rowGroupList=aggGroupConfs;reactData.aggHandleFields=aggGroupFields;handleUpdateAggValues();};const handleeGroupSummary=aggList=>{const{fullColumnFieldData}=internalData;const aggregateOpts=computeAggregateOpts.value;const aggFuncColumns=computeAggFuncColumns.value;const{mapChildrenField}=aggregateOpts;const aggCalcMethod=aggregateOpts.calcValuesMethod||aggregateOpts.countMethod||aggregateOpts.aggregateMethod;if(mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(aggList,aggRow=>{let count=0;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(aggRow[mapChildrenField],row=>{if(row.isAggregate){count+=row.childCount||0;}else{count++;}});aggRow.childCount=count;});if($xeTable.handlePivotTableAggData){$xeTable.handlePivotTableAggData(aggList);}else{if(aggFuncColumns.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(aggList,aggRow=>{const aggDtObj={};const aggData=aggRow.aggData;const groupField=aggRow.groupField;const groupContent=aggRow.groupContent;const childList=mapChildrenField?aggRow[mapChildrenField]||[]:[];const childCount=aggRow.childCount;const colRest=fullColumnFieldData[groupField]||{};aggFuncColumns.forEach(column=>{const{field}=column;const currAggData=aggData?aggData[field]:null;const ctParams={$table:$xeTable,groupField,groupColumn:colRest?colRest.column:null,column,groupValue:groupContent,childList,childCount,aggValue:currAggData?currAggData.value:0,/**
20457
20723
  * 已废弃
20458
20724
  * @deprecated
20459
20725
  */children:childList,/**
@@ -20470,7 +20736,7 @@ if(!treeOpts.rowField){errLog('vxe.error.reqProp',['tree-config.rowField']);}if(
20470
20736
  // warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${treeOpts.children}`])
20471
20737
  // }
20472
20738
  // })
20473
- treeData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(fullData,{key:treeOpts.rowField,parentKey:treeOpts.parentField,children:childrenField,mapChildren:treeOpts.mapChildrenField});fullData=treeData.slice(0);}else{treeData=fullData.slice(0);}}else if((aggregateConfig||rowGroupConfig)&&rowGroupList.length){const groupRest=initGroupData(fullData,rowGroupList);treeData=groupRest.treeData;fullData=groupRest.fullData;isRGroup=true;}reactData.isRowGroupStatus=isRGroup;scrollYStore.startIndex=0;scrollYStore.endIndex=1;scrollXStore.startIndex=0;scrollXStore.endIndex=1;internalData.cvCacheMaps={};reactData.isRowLoading=true;reactData.scrollVMLoading=false;reactData.treeExpandedFlag++;reactData.rowExpandedFlag++;internalData.insertRowMaps={};reactData.insertRowFlag++;internalData.removeRowMaps={};reactData.removeRowFlag++;const sYLoad=updateScrollYStatus(fullData);// 全量数据
20739
+ treeData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(fullData,{key:treeOpts.rowField,parentKey:treeOpts.parentField,children:childrenField,mapChildren:treeOpts.mapChildrenField});fullData=treeData.slice(0);}else{treeData=fullData.slice(0);}}else if((aggregateConfig||rowGroupConfig)&&rowGroupList.length){const groupRest=initGroupData(fullData,rowGroupList);treeData=groupRest.treeData;fullData=groupRest.fullData;isRGroup=true;}reactData.isRowGroupStatus=isRGroup;scrollYStore.startIndex=0;scrollYStore.endIndex=1;scrollXStore.startIndex=0;scrollXStore.endIndex=1;internalData.cvCacheMaps={};reactData.isRowLoading=true;reactData.scrollVMLoading=false;reactData.treeExpandedFlag++;reactData.rowExpandedFlag++;internalData.insertRowMaps={};reactData.insertRowFlag++;internalData.removeRowMaps={};reactData.removeRowFlag++;internalData.fullCellHeightMaps={};internalData.fullCellStoreMaps={};const sYLoad=updateScrollYStatus(fullData);// 全量数据
20474
20740
  internalData.tableFullData=fullData;internalData.tableFullTreeData=isRGroup?[]:treeData;internalData.tableFullGroupData=isRGroup?treeData:[];// 缓存数据
20475
20741
  $xeTable.cacheRowMap(isReset);// 原始数据
20476
20742
  internalData.tableSynchData=datas;if(isReset){internalData.isResizeCellHeight=false;}// 克隆原数据,用于显示编辑状态,与编辑值做对比
@@ -20519,7 +20785,7 @@ tableFullColumn.forEach(column=>{if(column.visible){if(column.fixed==='left'){le
20519
20785
  // }
20520
20786
  if(props.spanMethod){warnLog('vxe.error.scrollErrProp',['span-method']);}if(props.footerSpanMethod){warnLog('vxe.error.scrollErrProp',['footer-span-method']);}if(isReset){const{visibleSize}=handleVirtualXVisible();scrollXStore.startIndex=0;scrollXStore.endIndex=visibleSize;scrollXStore.visibleSize=visibleSize;scrollXStore.visibleStartIndex=0;scrollXStore.visibleEndIndex=visibleSize;}}// 如果列被显示/隐藏,则清除合并状态
20521
20787
  // 如果列被设置为固定,则清除合并状态
20522
- if(visibleColumn.length!==internalData.visibleColumn.length||!internalData.visibleColumn.every((column,index)=>column===visibleColumn[index])){$xeTable.clearMergeCells();$xeTable.clearMergeFooterItems();}visibleColumn.forEach((column,index)=>{const colid=column.id;const colRest=fullColumnIdData[colid];if(colRest){colRest._index=index;}});handleTableColumn();handleUpdateAggValues();if(isReset){updateColumnOffsetLeft();return $xeTable.updateFooter().then(()=>{return $xeTable.recalculate();}).then(()=>{$xeTable.updateCellAreas();return $xeTable.recalculate();});}return $xeTable.updateFooter();};const initColumnHierarchy=()=>{const{collectColumn}=internalData;const fullColIdData={};const fullColFieldData={};let sortIndex=1;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const{id:colid,field}=column;const parentId=parentColumn?parentColumn.id:null;const rest={$index:-1,_index:-1,column,colid,index,items,parent:parentColumn||null,width:0,oLeft:0};column.parentId=parentId;column.defaultParentId=parentId;column.sortNumber=sortIndex;column.renderSortNumber=sortIndex;sortIndex++;if(field){if(fullColFieldData[field]){errLog('vxe.error.colRepet',['field',field]);}fullColFieldData[field]=rest;}fullColIdData[colid]=rest;});internalData.fullColumnIdData=fullColIdData;internalData.fullColumnFieldData=fullColFieldData;};const handleInitColumn=collectColumn=>{const expandOpts=computeExpandOpts.value;internalData.collectColumn=collectColumn;const tFullColumn=getColumnList(collectColumn);internalData.tableFullColumn=tFullColumn;reactData.updateColFlag++;reactData.isColLoading=true;initColumnHierarchy();return Promise.resolve(restoreCustomStorage()).then(()=>{const{scrollXLoad,scrollYLoad,expandColumn}=reactData;cacheColumnMap();parseColumns(true).then(()=>{if(reactData.scrollXLoad){loadScrollXData();}});$xeTable.clearHeaderFormatterCache();$xeTable.clearMergeCells();$xeTable.clearMergeFooterItems();$xeTable.handleTableData(true);$xeTable.handleAggregateSummaryData();if((scrollXLoad||scrollYLoad)&&expandColumn&&expandOpts.mode!=='fixed'){warnLog('vxe.error.scrollErrProp',['column.type=expand']);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{if($xeToolbar){$xeToolbar.syncUpdate({collectColumn:internalData.collectColumn,$table:$xeTable});}if($xeTable.handleUpdateCustomColumn){$xeTable.handleUpdateCustomColumn();}const columnOpts=computeColumnOpts.value;if(props.showCustomHeader&&reactData.isGroup&&(columnOpts.resizable||props.resizable)){warnLog('vxe.error.notConflictProp',['show-custom-header & colgroup','column-config.resizable=false']);}reactData.isColLoading=false;return handleLazyRecalculate(false,true,true);});});};const updateScrollXStatus=fullColumn=>{const virtualXOpts=computeVirtualXOpts.value;const allCols=fullColumn||internalData.tableFullColumn;// 如果gt为0,则总是启用
20788
+ if(visibleColumn.length!==internalData.visibleColumn.length||!internalData.visibleColumn.every((column,index)=>column===visibleColumn[index])){$xeTable.clearMergeCells();$xeTable.clearMergeFooterItems();}visibleColumn.forEach((column,index)=>{const colid=column.id;const colRest=fullColumnIdData[colid];if(colRest){colRest._index=index;}});handleTableColumn();handleUpdateAggValues();if(isReset){updateColumnOffsetLeft();return $xeTable.updateFooter().then(()=>{return $xeTable.recalculate();}).then(()=>{$xeTable.updateCellAreas();return $xeTable.recalculate();});}return $xeTable.updateFooter();};const initColumnHierarchy=()=>{const{collectColumn}=internalData;const fullColIdData={};const fullColFieldData={};let sortIndex=1;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const{id:colid,field}=column;const parentId=parentColumn?parentColumn.id:null;const rest={$index:-1,_index:-1,column,colid,index,items,parent:parentColumn||null,width:0,oLeft:0};column.parentId=parentId;column.defaultParentId=parentId;column.sortNumber=sortIndex;column.renderSortNumber=sortIndex;sortIndex++;if(field){if(fullColFieldData[field]){errLog('vxe.error.colRepet',['field',field]);}fullColFieldData[field]=rest;}fullColIdData[colid]=rest;});internalData.fullColumnIdData=fullColIdData;internalData.fullColumnFieldData=fullColFieldData;};const buildColumnInfo=()=>{const{scrollXLoad,scrollYLoad,expandColumn}=reactData;const expandOpts=computeExpandOpts.value;cacheColumnMap();parseColumns(true).then(()=>{if(reactData.scrollXLoad){loadScrollXData();}});$xeTable.clearHeaderFormatterCache();$xeTable.clearMergeCells();$xeTable.clearMergeFooterItems();$xeTable.handleTableData(true);$xeTable.handleAggregateSummaryData();if((scrollXLoad||scrollYLoad)&&expandColumn&&expandOpts.mode!=='fixed'){warnLog('vxe.error.scrollErrProp',['column.type=expand']);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{if($xeToolbar){$xeToolbar.syncUpdate({collectColumn:internalData.collectColumn,$table:$xeTable});}if($xeTable.handleUpdateCustomColumn){$xeTable.handleUpdateCustomColumn();}const columnOpts=computeColumnOpts.value;if(props.showCustomHeader&&reactData.isGroup&&(columnOpts.resizable||props.resizable)){warnLog('vxe.error.notConflictProp',['show-custom-header & colgroup','column-config.resizable=false']);}reactData.isColLoading=false;return handleLazyRecalculate(false,true,true);});};const handleInitColumn=collectColumn=>{internalData.collectColumn=collectColumn;const tFullColumn=getColumnList(collectColumn);internalData.tableFullColumn=tFullColumn;reactData.updateColFlag++;reactData.isColLoading=true;initColumnHierarchy();return Promise.resolve(restoreCustomStorage()).then(()=>{return buildColumnInfo();});};const updateScrollXStatus=fullColumn=>{const virtualXOpts=computeVirtualXOpts.value;const allCols=fullColumn||internalData.tableFullColumn;// 如果gt为0,则总是启用
20523
20789
  const scrollXLoad=!!virtualXOpts.enabled&&virtualXOpts.gt>-1&&(virtualXOpts.gt===0||virtualXOpts.gt<allCols.length);reactData.scrollXLoad=scrollXLoad;return scrollXLoad;};const syncGanttScrollYStatus=()=>{const $xeGanttView=internalData.xeGanttView;if($xeGanttView&&$xeGanttView.handleUpdateSYStatus){$xeGanttView.handleUpdateSYStatus(reactData.scrollYLoad);}};const updateScrollYStatus=fullData=>{const{treeConfig}=props;const virtualYOpts=computeVirtualYOpts.value;const treeOpts=computeTreeOpts.value;const{transform}=treeOpts;const allList=fullData||internalData.tableFullData;// 如果gt为0,则总是启用
20524
20790
  const scrollYLoad=(transform||!treeConfig)&&!!virtualYOpts.enabled&&virtualYOpts.gt>-1&&(virtualYOpts.gt===0||virtualYOpts.gt<allList.length);reactData.scrollYLoad=scrollYLoad;syncGanttScrollYStatus();return scrollYLoad;};/**
20525
20791
  * 展开与收起树节点
@@ -20638,7 +20904,7 @@ if(virtualXOpts.scrollToLeftOnChange){targetScrollLeft=0;}if(virtualYOpts.scroll
20638
20904
  * 如果还额外传了 field 则清空指定单元格内容
20639
20905
  * @param {Array/Row} rows 行数据
20640
20906
  * @param {String} field 字段名
20641
- */clearData(rows,field){const{tableFullData,visibleColumn}=internalData;if(!arguments.length){rows=tableFullData;}else if(rows&&!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)){rows=[rows];}if(field){rows.forEach(row=>external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row,field,null));}else{rows.forEach(row=>{visibleColumn.forEach(column=>{if(column.field){setCellValue(row,column,null);}});});}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},getCellElement(row,fieldOrColumn){const{elemStore}=internalData;const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return null;}const rowid=getRowid($xeTable,row);const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const leftScrollElem=getRefElem(elemStore['left-body-scroll']);const rightScrollElem=getRefElem(elemStore['right-body-scroll']);let bodyElem;if(column){if(column.fixed){if(column.fixed==='left'){if(leftScrollElem){bodyElem=leftScrollElem;}}else{if(rightScrollElem){bodyElem=rightScrollElem;}}}if(!bodyElem){bodyElem=bodyScrollElem;}if(bodyElem){return bodyElem.querySelector(`.vxe-body--row[rowid="${rowid}"] .${column.id}`);}}return null;},getCellLabel(row,fieldOrColumn){const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return null;}const{editConfig}=props;const{formatter,editRender,cellRender}=column;// formatter > tableCellFormatter
20907
+ */clearData(rows,field){const{tableFullData,visibleColumn}=internalData;if(!arguments.length){rows=tableFullData;}else if(rows&&!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)){rows=[rows];}if(field){rows.forEach(row=>external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row,field,null));}else{rows.forEach(row=>{visibleColumn.forEach(column=>{if(column.field){setCellValue(row,column,null);}});});}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},effectCellData(row,column,options){const{fullCellStoreMaps}=internalData;const editOpts=computeEditOpts.value;const{key,isChanged,setValue,getResult}=options;const rowid=getRowid($xeTable,row);const colid=column.id;let rowStore=fullCellStoreMaps[rowid];const cellValue=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,column.field);const restParams={$table:$xeTable,row,rowid,column,colid,cellValue,oldValue:null};if(editOpts.cache===false&&key==='render_table_cell'){const rest=restParams;rest.cellResult=getResult?getResult(restParams):cellValue;return rest;}if(!rowStore){rowStore={};fullCellStoreMaps[rowid]=rowStore;}let cellStore=rowStore[colid];if(!cellStore){cellStore={value:undefined,result:{}};rowStore[colid]=cellStore;}const restData=rowStore[colid];const oldValue=restData.value;restParams.oldValue=oldValue;if(isChanged?!isChanged(restParams):oldValue!==cellValue){restData.value=setValue?setValue(restParams):cellValue;restData.result={};}const storeData=restData.result;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(storeData[key])){storeData[key]=getResult?getResult(restParams):cellValue;}const cellResult=storeData[key];const rest=restParams;rest.cellResult=cellResult;return rest;},getCellElement(row,fieldOrColumn){const{elemStore}=internalData;const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return null;}const rowid=getRowid($xeTable,row);const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const leftScrollElem=getRefElem(elemStore['left-body-scroll']);const rightScrollElem=getRefElem(elemStore['right-body-scroll']);let bodyElem;if(column){if(column.fixed){if(column.fixed==='left'){if(leftScrollElem){bodyElem=leftScrollElem;}}else{if(rightScrollElem){bodyElem=rightScrollElem;}}}if(!bodyElem){bodyElem=bodyScrollElem;}if(bodyElem){return bodyElem.querySelector(`.vxe-body--row[rowid="${rowid}"] .${column.id}`);}}return null;},getCellLabel(row,fieldOrColumn){const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return null;}const{editConfig}=props;const{formatter,editRender,cellRender}=column;// formatter > tableCellFormatter
20642
20908
  const renderOpts=formatter?null:editConfig&&isEnableConf(editRender)?editRender:isEnableConf(cellRender)?cellRender:null;const compConf=renderOpts?table_renderer.get(renderOpts.name):null;const tcFormatter=compConf?compConf.tableCellFormatter:null;const cellValue=getCellValue(row,column);let cellLabel=cellValue;if(formatter||tcFormatter){let formatData;const{fullAllDataRowIdData}=internalData;const rowid=getRowid($xeTable,row);const colid=column.id;const rowRest=fullAllDataRowIdData[rowid];if(rowRest){formatData=rowRest.formatData;if(!formatData){formatData=fullAllDataRowIdData[rowid].formatData={};}if(rowRest&&formatData[colid]){if(formatData[colid].value===cellValue){return formatData[colid].label;}}}const formatParams={$table:$xeTable,cellValue,row,rowIndex:$xeTable.getRowIndex(row),column,columnIndex:$xeTable.getColumnIndex(column)};if(formatter){if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)){const gFormatOpts=table_formats.get(formatter);const tcFormatMethod=gFormatOpts?gFormatOpts.tableCellFormatMethod||gFormatOpts.cellFormatMethod:null;cellLabel=tcFormatMethod?tcFormatMethod(formatParams):'';}else if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)){const gFormatOpts=table_formats.get(formatter[0]);const tcFormatMethod=gFormatOpts?gFormatOpts.tableCellFormatMethod||gFormatOpts.cellFormatMethod:null;cellLabel=tcFormatMethod?tcFormatMethod(formatParams,...formatter.slice(1)):'';}else{cellLabel=formatter(formatParams);}}else if(renderOpts&&tcFormatter){cellLabel=tcFormatter(renderOpts,formatParams);}if(formatData){formatData[colid]={value:cellValue,label:cellLabel};}}return cellLabel;},updateCellLabel(row,fieldOrColumn){const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return null;}const{fullAllDataRowIdData}=internalData;const rowid=getRowid($xeTable,row);if(rowid){const colid=column.id;const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const formatData=rowRest.formatData;if(formatData){delete formatData[colid];}}}return $xeTable.getFooterCellLabel(row,column);},clearFormatterCache(isUpdate){const{tableData,tableColumn}=reactData;const{fullAllDataRowIdData}=internalData;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(fullAllDataRowIdData,rowRest=>{if(rowRest.formatData){rowRest.formatData=undefined;}});if(isUpdate){tableData.forEach(row=>{tableColumn.forEach(column=>{$xeTable.getCellLabel(row,column);});});}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},getHeaderCellLabel(fieldOrColumn){const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return null;}const{headerFormatter}=column;const _columnIndex=$xeTable.getVTColumnIndex(column);let cellLabel=column.getTitle();if(headerFormatter){let formatData;const{headerFullDataColData}=internalData;const colid=column.id;let colRest=headerFullDataColData[colid];if(!colRest){colRest=headerFullDataColData[colid]={};}const formatObj=colRest.formatObj;if(formatObj&&formatObj.value===cellLabel){return formatObj.label;}const headFormatParams={$table:$xeTable,cellTitle:cellLabel,cellValue:cellLabel,column,_columnIndex,columnIndex:$xeTable.getColumnIndex(column)};if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(headerFormatter)){const gFormatOpts=table_formats.get(headerFormatter);const fcFormatMethod=gFormatOpts?gFormatOpts.tableHeaderCellFormatMethod:null;cellLabel=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(fcFormatMethod?fcFormatMethod(headFormatParams):'');}else if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(headerFormatter)){const gFormatOpts=table_formats.get(headerFormatter[0]);const fcFormatMethod=gFormatOpts?gFormatOpts.tableHeaderCellFormatMethod:null;cellLabel=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(fcFormatMethod?fcFormatMethod(headFormatParams,...headerFormatter.slice(1)):'');}else{cellLabel=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(headerFormatter(headFormatParams));}if(formatData){colRest.formatObj={value:cellLabel,label:cellLabel};}}return cellLabel;},updateHeaderCellLabel(fieldOrColumn){const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return'';}const{headerFullDataColData}=internalData;const colid=column.id;const colRest=headerFullDataColData[colid];if(colRest){colRest.formatObj=undefined;}return $xeTable.getHeaderCellLabel(column);},clearHeaderFormatterCache(isUpdate){const{tableColumn}=reactData;const{headerFullDataColData}=internalData;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(headerFullDataColData,colRest=>{if(colRest.formatObj){colRest.formatObj=undefined;}});if(isUpdate){tableColumn.forEach(column=>{$xeTable.getHeaderCellLabel(column);});}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},getFooterCellLabel(row,fieldOrColumn){const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return null;}const{footerFormatter}=column;const _columnIndex=$xeTable.getVTColumnIndex(column);let itemValue='';// 兼容老模式
20643
20909
  if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(row)){itemValue=row[_columnIndex];}else{itemValue=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row,column.field);}let cellLabel=itemValue;if(footerFormatter){let formatData;const{footerTableData}=reactData;const{footerFullDataRowData}=internalData;const colid=column.id;const $rowIndex=footerTableData.indexOf(row);let rowRest=null;if($rowIndex>-1){rowRest=footerFullDataRowData[$rowIndex];if(!rowRest){rowRest=footerFullDataRowData[$rowIndex]={};}formatData=rowRest.formatData;if(!formatData){formatData=footerFullDataRowData[$rowIndex].formatData={};}if(rowRest&&formatData[colid]){if(formatData[colid].value===itemValue){return formatData[colid].label;}}}const footerFormatParams={$table:$xeTable,cellValue:itemValue,itemValue,row,items:row,$rowIndex,column,_columnIndex,columnIndex:$xeTable.getColumnIndex(column)};if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(footerFormatter)){const gFormatOpts=table_formats.get(footerFormatter);const fcFormatMethod=gFormatOpts?gFormatOpts.tableFooterCellFormatMethod:null;cellLabel=fcFormatMethod?fcFormatMethod(footerFormatParams):'';}else if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(footerFormatter)){const gFormatOpts=table_formats.get(footerFormatter[0]);const fcFormatMethod=gFormatOpts?gFormatOpts.tableFooterCellFormatMethod:null;cellLabel=fcFormatMethod?fcFormatMethod(footerFormatParams,...footerFormatter.slice(1)):'';}else{cellLabel=footerFormatter(footerFormatParams);}if(formatData){formatData[colid]={value:itemValue,label:cellLabel};}}return cellLabel;},updateFooterCellLabel(row,fieldOrColumn){const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(!column){return null;}const{footerTableData}=reactData;const{footerFullDataRowData}=internalData;const colid=column.id;const $rowIndex=footerTableData.indexOf(row);const rowRest=footerFullDataRowData[$rowIndex];if(rowRest){const formatData=rowRest.formatData;if(formatData){delete formatData[colid];}}return $xeTable.getFooterCellLabel(row,column);},clearFooterFormatterCache(isUpdate){const{tableData,tableColumn}=reactData;const{footerFullDataRowData}=internalData;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(footerFullDataRowData,rowRest=>{if(rowRest.formatData){rowRest.formatData=undefined;}});if(isUpdate){tableData.forEach(row=>{tableColumn.forEach(column=>{$xeTable.getFooterCellLabel(row,column);});});}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},/**
20644
20910
  * 检查是否为临时行数据
@@ -20713,7 +20979,7 @@ if(!targetColumn.fixed&&isMaxFixedColumn){if(core_.VxeUI.modal){core_.VxeUI.moda
20713
20979
  * 刷新列信息
20714
20980
  * 将固定的列左边、右边分别靠边
20715
20981
  * 如果传 true 则会检查列顺序并排序
20716
- */refreshColumn(initSort){if(initSort){handleUpdateColumn();}return parseColumns(true).then(()=>{return $xeTable.refreshScroll();}).then(()=>{return handleLazyRecalculate(false,true,true);});},setRowHeightConf(heightConf){const{fullAllDataRowIdData}=internalData;let status=false;if(heightConf){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(heightConf,(height,rowid)=>{const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const rHeight=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(height);if(rHeight){rowRest.resizeHeight=rHeight;if(!status){status=true;}}}});if(status){internalData.isResizeCellHeight=true;reactData.resizeHeightFlag++;}}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{updateRowOffsetTop();return{status};});},getRowHeightConf(isFull){const{fullAllDataRowIdData,afterFullData}=internalData;const{handleGetRowId}=createHandleGetRowId($xeTable);const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const rest={};afterFullData.forEach(row=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const resizeHeight=rowRest.resizeHeight;if(resizeHeight||isFull){const currCellHeight=resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;rest[rowid]=currCellHeight;}}});return rest;},recalcRowHeight(rowOrId){const{fullAllDataRowIdData}=internalData;const rows=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rowOrId)?rowOrId:[rowOrId];const el=refElem.value;if(el){const{handleGetRowId}=createHandleGetRowId($xeTable);el.setAttribute('data-calc-row','Y');rows.forEach(row=>{const rowid=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(row)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row)?row:handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){rowRest.resizeHeight=calcCellAutoHeight(rowRest,el);}el.removeAttribute('data-calc-row');});reactData.calcCellHeightFlag++;}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},setRowHeight(rowOrId,height){const{fullAllDataRowIdData}=internalData;let status=false;const rows=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rowOrId)?rowOrId:[rowOrId];let rHeight=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(height);if(isScale(height)){const tableBody=refTableBody.value;const bodyElem=tableBody?tableBody.$el:null;const bodyHeight=bodyElem?bodyElem.clientHeight-1:0;rHeight=Math.floor(rHeight*bodyHeight);}if(rHeight){const{handleGetRowId}=createHandleGetRowId($xeTable);rows.forEach(row=>{const rowid=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(row)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row)?row:handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){rowRest.resizeHeight=rHeight;if(!status){status=true;}}});if(status){internalData.isResizeCellHeight=true;reactData.resizeHeightFlag++;}}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{return{status};});},getRowHeight(rowOrId){const{fullAllDataRowIdData}=internalData;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const rowid=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrId)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrId)?rowOrId:getRowid($xeTable,rowOrId);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){return rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;}return 0;},/**
20982
+ */refreshColumn(initSort){if(initSort){handleUpdateColumn();}return parseColumns(true).then(()=>{return $xeTable.refreshScroll();}).then(()=>{return handleLazyRecalculate(false,true,true);});},setRowHeightConf(heightConf){const{fullAllDataRowIdData}=internalData;let status=false;if(heightConf){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(heightConf,(height,rowid)=>{const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const rHeight=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(height);if(rHeight){rowRest.resizeHeight=rHeight;if(!status){status=true;}}}});if(status){internalData.isResizeCellHeight=true;reactData.resizeHeightFlag++;}}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{updateRowOffsetTop();return{status};});},getRowHeightConf(isFull){const{fullAllDataRowIdData,afterFullData}=internalData;const{handleGetRowId}=createHandleGetRowId($xeTable);const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const rest={};afterFullData.forEach(row=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const resizeHeight=rowRest.resizeHeight;if(resizeHeight||isFull){const currCellHeight=resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;rest[rowid]=currCellHeight;}}});return rest;},recalcRowHeight(rowOrId){const{fullAllDataRowIdData}=internalData;const rows=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rowOrId)?rowOrId:[rowOrId];const el=refElem.value;if(el){const{handleGetRowId}=createHandleGetRowId($xeTable);el.setAttribute('data-calc-row','Y');rows.forEach(row=>{const rowid=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(row)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row)?row:handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){rowRest.resizeHeight=calcCellAutoHeight(rowid,rowRest,el);}el.removeAttribute('data-calc-row');});reactData.calcCellHeightFlag++;}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},setRowHeight(rowOrId,height){const{fullAllDataRowIdData}=internalData;let status=false;const rows=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rowOrId)?rowOrId:[rowOrId];let rHeight=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(height);if(isScale(height)){const tableBody=refTableBody.value;const bodyElem=tableBody?tableBody.$el:null;const bodyHeight=bodyElem?bodyElem.clientHeight-1:0;rHeight=Math.floor(rHeight*bodyHeight);}if(rHeight){const{handleGetRowId}=createHandleGetRowId($xeTable);rows.forEach(row=>{const rowid=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(row)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row)?row:handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){rowRest.resizeHeight=rHeight;if(!status){status=true;}}});if(status){internalData.isResizeCellHeight=true;reactData.resizeHeightFlag++;}}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{return{status};});},getRowHeight(rowOrId){const{fullAllDataRowIdData}=internalData;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const rowid=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrId)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrId)?rowOrId:getRowid($xeTable,rowOrId);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){return rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;}return 0;},/**
20717
20983
  * 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
20718
20984
  */refreshScroll(){const{elemStore,lastScrollLeft,lastScrollTop}=internalData;const headerScrollElem=getRefElem(elemStore['main-header-scroll']);const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const footerScrollElem=getRefElem(elemStore['main-footer-scroll']);const leftScrollElem=getRefElem(elemStore['left-body-scroll']);const rightScrollElem=getRefElem(elemStore['right-body-scroll']);const xHandleEl=refScrollXHandleElem.value;const yHandleEl=refScrollYHandleElem.value;return new Promise(resolve=>{// 还原滚动条位置
20719
20985
  if(lastScrollLeft||lastScrollTop){return restoreScrollLocation($xeTable,lastScrollLeft,lastScrollTop).then(()=>{// 存在滚动行为未结束情况
@@ -20881,7 +21147,17 @@ return $xeTable.removeMergeFooterCells(merges);},/**
20881
21147
  return $xeTable.getMergeFooterCells();},/**
20882
21148
  * 清除所有表尾合并
20883
21149
  */clearMergeFooterCells(){internalData.mergeFooterList=[];internalData.mergeFooterMaps={};internalData.mergeFooterCellMaps={};internalData.mergeFooterRowMaps={};internalData.mergeFooterColMaps={};reactData.mergeFootFlag++;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{return updateStyle();});},clearMergeFooterItems(){// errLog('vxe.error.delFunc', ['clearMergeFooterItems', 'clearMergeFooterCells'])
20884
- return $xeTable.clearMergeFooterCells();},updateCellAreas(){const{mouseConfig}=props;const mouseOpts=computeMouseOpts.value;if(mouseConfig&&mouseOpts.area&&$xeTable.handleRecalculateCellAreaEvent){return $xeTable.handleRecalculateCellAreaEvent();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},undo(){return $xeTable.handleUndoStackEvent(null);},redo(){return $xeTable.handleRedoStackEvent(null);},clearHistory(){return $xeTable.handleClearStack();},getCustomStoreData(){const{id}=props;const customOpts=computeCustomOpts.value;const{isRowGroupStatus,rowGroupList}=reactData;const{fullColumnFieldData,collectColumn}=internalData;const{storage,checkMethod,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}:storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);const resizableData={};const sortData=[];const visibleData={};const fixedData={};const aggGroupData={};const aggFuncData={};const storeData={resizableData:undefined,sortData:undefined,visibleData:undefined,fixedData:undefined,aggGroupData:undefined,aggFuncData:undefined};if(!id){if(storage){errLog('vxe.error.reqProp',['id']);}return storeData;}let hasResizable=0;let hasSort=0;let hasFixed=0;let hasVisible=0;let hasAggFunc=0;const sortMaps={};external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const colKey=column.getKey();if(!colKey){errLog('vxe.error.reqProp',[`${column.getTitle()||column.type||''} -> column.field=?`]);return;}if(parentColumn){if(isCustomSort){const pColKey=parentColumn.getKey();const psObj=sortMaps[pColKey];hasSort=1;if(psObj){const sObj={k:colKey};sortMaps[colKey]=sObj;if(!psObj.c){psObj.c=[];}psObj.c.push(sObj);}}}else{if(isCustomSort){hasSort=1;const sObj={k:colKey};sortMaps[colKey]=sObj;sortData.push(sObj);}// 只支持一级
21150
+ return $xeTable.clearMergeFooterCells();},updateCellAreas(){const{mouseConfig}=props;const mouseOpts=computeMouseOpts.value;if(mouseConfig&&mouseOpts.area&&$xeTable.handleRecalculateCellAreaEvent){return $xeTable.handleRecalculateCellAreaEvent();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},undo(){return $xeTable.handleUndoStackEvent(null);},redo(){return $xeTable.handleRedoStackEvent(null);},clearHistory(){return $xeTable.handleClearStack();},/**
21151
+ * 用于 custom-config,用于手动恢复自定义列设置信息,恢复表格重置为初始状态
21152
+ * @param storeData
21153
+ * @returns
21154
+ */setCustomStoreData(storeData){if(!storeData){return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const customOpts=computeCustomOpts.value;const{checkMethod}=customOpts;// 重置状态
21155
+ clearTableAllStatus($xeTable);// 恢复列
21156
+ const allCols=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.collectColumn,column=>{column.resizeWidth=0;column.fixed=column.defaultFixed;column.renderSortNumber=column.sortNumber;column.parentId=column.defaultParentId;if(!checkMethod||checkMethod({$table:$xeTable,column})){column.visible=column.defaultVisible;}column.aggFunc=column.defaultAggFunc;column.renderAggFn=column.defaultAggFunc;column.renderResizeWidth=column.renderWidth;allCols.push(column);});const newCollectCols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(allCols,'renderSortNumber'),{key:'id',parentKey:'parentId',children:'children'});internalData.collectColumn=newCollectCols;internalData.tableFullColumn=getColumnList(newCollectCols);reactData.updateColFlag++;reactData.isColLoading=true;initColumnHierarchy();return Promise.resolve(handleCustomRestore(storeData)).then(()=>{return buildColumnInfo();}).then(()=>{// 恢复数据聚合分组
21157
+ const{isRowGroupStatus,rowGroupList}=reactData;if(isRowGroupStatus&&!!$xeTable.handlePivotTableAggData){const rowGroupFields=computeRowGroupFields.value;if(rowGroupFields?rowGroupFields.length:rowGroupList.length){if(rowGroupFields&&rowGroupFields.length){$xeTable.setRowGroups(rowGroupFields);}else{$xeTable.clearRowGroups();}}else{$xeTable.handleUpdateAggData();}}});},/**
21158
+ * 用于 custom-config,用于获取自定义列设置信息,用于自定义保持
21159
+ * @returns
21160
+ */getCustomStoreData(){const{id}=props;const customOpts=computeCustomOpts.value;const{isRowGroupStatus,rowGroupList}=reactData;const{fullColumnFieldData,collectColumn}=internalData;const{storage,checkMethod,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}:storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);const resizableData={};const sortData=[];const visibleData={};const fixedData={};const aggGroupData={};const aggFuncData={};const storeData={resizableData:undefined,sortData:undefined,visibleData:undefined,fixedData:undefined,aggGroupData:undefined,aggFuncData:undefined};if(!id){if(storage){errLog('vxe.error.reqProp',['id']);}return storeData;}let hasResizable=0;let hasSort=0;let hasFixed=0;let hasVisible=0;let hasAggFunc=0;const sortMaps={};external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const colKey=column.getKey();if(!colKey){errLog('vxe.error.reqProp',[`${column.getTitle()||column.type||''} -> column.field=?`]);return;}if(parentColumn){if(isCustomSort){const pColKey=parentColumn.getKey();const psObj=sortMaps[pColKey];hasSort=1;if(psObj){const sObj={k:colKey};sortMaps[colKey]=sObj;if(!psObj.c){psObj.c=[];}psObj.c.push(sObj);}}}else{if(isCustomSort){hasSort=1;const sObj={k:colKey};sortMaps[colKey]=sObj;sortData.push(sObj);}// 只支持一级
20885
21161
  if(isCustomFixed&&(column.fixed||'')!==(column.defaultFixed||'')){hasFixed=1;fixedData[colKey]=column.fixed;}}if(isCustomResizable&&column.resizeWidth){hasResizable=1;resizableData[colKey]=column.renderWidth;}if(isCustomVisible&&(!checkMethod||checkMethod({$table:$xeTable,column}))){if(!column.visible&&column.defaultVisible){hasVisible=1;visibleData[colKey]=false;}else if(column.visible&&!column.defaultVisible){hasVisible=1;visibleData[colKey]=true;}}if(isCustomAggFunc&&(column.aggFunc||'')!==(column.defaultAggFunc||'')){hasAggFunc=1;aggFuncData[colKey]=column.aggFunc;}});if(hasResizable){storeData.resizableData=resizableData;}if(hasSort){storeData.sortData=sortData;}if(hasFixed){storeData.fixedData=fixedData;}if(hasVisible){storeData.visibleData=visibleData;}if(isCustomAggGroup&&isRowGroupStatus){rowGroupList.forEach(aggConf=>{const colRest=fullColumnFieldData[aggConf.field];if(colRest){aggGroupData[colRest.column.getKey()]=true;}});storeData.aggGroupData=aggGroupData;}if(hasAggFunc){storeData.aggFuncData=aggFuncData;}return storeData;},focus(){internalData.isActivated=true;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},blur(){internalData.isActivated=false;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},/**
20886
21162
  * 已废弃,被 connectToolbar 替换
20887
21163
  * @deprecated
@@ -20996,9 +21272,17 @@ if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;ext
20996
21272
  const maxInterval=getColReMaxWidth(cellParams);// 列之间的最大间距
20997
21273
  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;}}}}// 处理拖动事件
20998
21274
  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);// 最大宽
20999
- if(maxInterval>1){dragLeft=Math.min(dragLeft,maxInterval+dragMinLeft-minInterval);}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,$table:$xeTable});const colMinWidth=getColReMinWidth(cellParams);const colMaxWidth=getColReMaxWidth(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);if(colMaxWidth>1){resizeWidth=Math.min(colMaxWidth,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{showOverflow}=props;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;let tableEl=refElem.value;if($xeGantt){const{refGanttContainerElem}=$xeGantt.getRefMaps();const ganttContainerElem=refGanttContainerElem.value;if(ganttContainerElem){tableEl=ganttContainerElem;}}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;let currCellHeight=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;if(!showOverflow){currCellHeight=tdEl.clientHeight;}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;// 处理拖动事件
21000
- 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,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}:storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
21001
- reactData.isCustomStatus=true;}if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){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:{},aggGroupData:{},aggFuncData:{}}:$xeTable.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();}}$xeTable.analyColumnWidth();return $xeTable.refreshColumn(true);},handleUpdateDataQueue(){reactData.upDataFlag++;},handleRefreshColumnQueue(){reactData.reColumnFlag++;},handleFilterOptions(column){if(column){const{filterStore}=reactData;const{filterRender,filters}=column;const filterOptions=filters||[];const compConf=isEnableConf(filterRender)?table_renderer.get(filterRender.name):null;const frMethod=column.filterRecoverMethod||(compConf?compConf.tableFilterRecoverMethod||compConf.filterRecoverMethod:null);filterStore.column=column;// 复原状态
21275
+ if(maxInterval>1){dragLeft=Math.min(dragLeft,maxInterval+dragMinLeft-minInterval);}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,$table:$xeTable});const colMinWidth=getColReMinWidth(cellParams);const colMaxWidth=getColReMaxWidth(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);if(colMaxWidth>1){resizeWidth=Math.min(colMaxWidth,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);}}},/**
21276
+ * @private
21277
+ */handleRowResizeMousedownEvent(evnt,params){evnt.stopPropagation();evnt.preventDefault();const{row}=params;const{showOverflow}=props;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;let tableEl=refElem.value;if($xeGantt){const{refGanttContainerElem}=$xeGantt.getRefMaps();const ganttContainerElem=refGanttContainerElem.value;if(ganttContainerElem){tableEl=ganttContainerElem;}}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;let currCellHeight=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;if(!showOverflow){currCellHeight=tdEl.clientHeight;}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;// 处理拖动事件
21278
+ 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);},/**
21279
+ * @private
21280
+ */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(rowid,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();}}},/**
21281
+ * @private
21282
+ */saveCustomStore(type){const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{updateStore,storage,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}:storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
21283
+ reactData.isCustomStatus=true;}if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){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:{},aggGroupData:{},aggFuncData:{}}:$xeTable.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)();},/**
21284
+ * @private
21285
+ */handleCustom(){const{mouseConfig}=props;if(mouseConfig){if($xeTable.clearSelected){$xeTable.clearSelected();}if($xeTable.clearCellAreas){$xeTable.clearCellAreas();$xeTable.clearCopyCellArea();}}$xeTable.analyColumnWidth();return $xeTable.refreshColumn(true);},handleUpdateDataQueue(){reactData.upDataFlag++;},handleRefreshColumnQueue(){reactData.reColumnFlag++;},handleFilterOptions(column){if(column){const{filterStore}=reactData;const{filterRender,filters}=column;const filterOptions=filters||[];const compConf=isEnableConf(filterRender)?table_renderer.get(filterRender.name):null;const frMethod=column.filterRecoverMethod||(compConf?compConf.tableFilterRecoverMethod||compConf.filterRecoverMethod:null);filterStore.column=column;// 复原状态
21002
21286
  filterOptions.forEach(option=>{const{_checked,checked}=option;option._checked=checked;if(!checked&&_checked!==checked){if(frMethod){frMethod({option,column,$table:$xeTable});}}});$xeTable.checkFilterOptions();}},preventEvent(evnt,type,args,next,end){let evntList=table_interceptor.get(type);// 兼容老版本
21003
21287
  if(!evntList.length&&type==='event.clearEdit'){evntList=table_interceptor.get('event.clearActived');if(evntList.length){warnLog('vxe.error.delEvent',['event.clearActived','event.clearEdit']);}}// 兼容老版本
21004
21288
  let rest=null;let isStop=false;for(let i=0;i<evntList.length;i++){const func=evntList[i];const fnRest=func(Object.assign({$table:$xeTable,$grid:$xeGrid,gantt:$xeGantt,$event:evnt},args));if(fnRest===false){isStop=true;break;}else if(fnRest&&fnRest.status===false){rest=fnRest.result;isStop=true;break;}}if(!isStop){if(next){rest=next();}}if(end){end();}return rest;},updateCheckboxStatus(){const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{afterTreeFullData,afterGroupFullData,selectCheckboxMaps,treeIndeterminateRowMaps}=internalData;const aggregateOpts=computeAggregateOpts.value;const treeOpts=computeTreeOpts.value;const childrenField=treeOpts.children||treeOpts.childrenField;const checkboxOpts=computeCheckboxOpts.value;const{checkField,indeterminateField,checkStrictly,checkMethod}=checkboxOpts;if(checkStrictly){return;}if(isRowGroupStatus||treeConfig){const{handleGetRowId}=createHandleGetRowId($xeTable);const childRowMaps={};const childRowList=[];if(isRowGroupStatus){// 行分组
@@ -22043,7 +22327,7 @@ const {
22043
22327
  renderEmptyElement: grid_renderEmptyElement
22044
22328
  } = core_.VxeUI;
22045
22329
  const tableComponentPropKeys = Object.keys(tableProps);
22046
- const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeRowLevel', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'getScrollData', 'scrollTo', 'scrollToStartRow', 'scrollToEndRow', 'scrollToRow', 'scrollToStartColumn', 'scrollToEndColumn', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'setMergeHeaderCells', 'removeMergeHeaderCells', 'getMergeHeaderCells', 'clearMergeHeaderCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'updateCellLabel', 'clearFormatterCache', 'getFooterCellLabel', 'updateFooterCellLabel', 'clearFooterFormatterCache', 'undo', 'redo', 'getCellElement', 'focus', 'blur', 'connect', 'connectToolbar'];
22330
+ const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeRowLevel', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'getScrollData', 'scrollTo', 'scrollToStartRow', 'scrollToEndRow', 'scrollToRow', 'scrollToStartColumn', 'scrollToEndColumn', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'setMergeHeaderCells', 'removeMergeHeaderCells', 'getMergeHeaderCells', 'clearMergeHeaderCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'setCustomStoreData', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'updateCellLabel', 'clearFormatterCache', 'getFooterCellLabel', 'updateFooterCellLabel', 'clearFooterFormatterCache', 'undo', 'redo', 'effectCellData', 'getCellElement', 'focus', 'blur', 'connect', 'connectToolbar'];
22047
22331
  function grid_createReactData() {
22048
22332
  return {
22049
22333
  tableLoading: false,