vxe-table 4.17.9 → 4.17.11

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.
@@ -223,6 +223,7 @@ function getFooterContent(params) {
223
223
  itemValue = XEUtils.get(row, column.field);
224
224
  }
225
225
  const footParams = Object.assign(params, {
226
+ cellValue: itemValue,
226
227
  itemValue
227
228
  });
228
229
  if (footerFormatter) {
@@ -3671,9 +3671,9 @@ export default defineVxeComponent({
3671
3671
  // if (!props.showOverflow) {
3672
3672
  // warnLog('vxe.error.reqProp', ['table.show-overflow'])
3673
3673
  // }
3674
- if (props.spanMethod) {
3675
- errLog('vxe.error.scrollErrProp', ['table.span-method']);
3676
- }
3674
+ // if (props.spanMethod) {
3675
+ // warnLog('vxe.error.scrollErrProp', ['span-method'])
3676
+ // }
3677
3677
  }
3678
3678
  handleReserveStatus();
3679
3679
  $xeTable.checkSelectionStatus();
@@ -8528,7 +8528,7 @@ export default defineVxeComponent({
8528
8528
  cacheRowMap(isReset) {
8529
8529
  const { treeConfig } = props;
8530
8530
  const { isRowGroupStatus } = reactData;
8531
- const { currKeyField, fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps } = internalData;
8531
+ const { currKeyField, fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps, rowExpandedMaps, selectCheckboxMaps } = internalData;
8532
8532
  const fullAllDataRowIdMaps = isReset ? {} : Object.assign({}, fullAllDataRowIdData); // 存在已删除数据
8533
8533
  const fullDataRowIdMaps = {};
8534
8534
  const idMaps = {};
@@ -8551,6 +8551,13 @@ export default defineVxeComponent({
8551
8551
  rowRest.level = level;
8552
8552
  rowRest.index = currIndex;
8553
8553
  rowRest.treeIndex = index;
8554
+ // 更新缓存
8555
+ if (selectCheckboxMaps[rowid]) {
8556
+ selectCheckboxMaps[rowid] = row;
8557
+ }
8558
+ if (rowExpandedMaps[rowid]) {
8559
+ rowExpandedMaps[rowid] = row;
8560
+ }
8554
8561
  idMaps[rowid] = true;
8555
8562
  fullDataRowIdMaps[rowid] = rowRest;
8556
8563
  fullAllDataRowIdMaps[rowid] = rowRest;
@@ -11820,22 +11827,27 @@ export default defineVxeComponent({
11820
11827
  }
11821
11828
  else {
11822
11829
  const firstRow = afterFullData[startIndex];
11823
- let rowid = getRowid($xeTable, firstRow);
11824
- let rowRest = fullAllDataRowIdData[rowid] || {};
11825
- ySpaceTop = (rowRest.oTop || 0);
11826
- const lastRow = afterFullData[afterFullData.length - 1];
11827
- rowid = getRowid($xeTable, lastRow);
11828
- rowRest = fullAllDataRowIdData[rowid] || {};
11829
- // 如果为空时还没计算完数据,保持原高度不变
11830
- if (rowRest.oTop) {
11831
- sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
11832
- // 是否展开行
11833
- if (expandColumn && rowExpandedMaps[rowid]) {
11834
- sYHeight += rowRest.expandHeight || expandOpts.height || 0;
11830
+ if (firstRow) {
11831
+ let rowid = getRowid($xeTable, firstRow);
11832
+ let rowRest = fullAllDataRowIdData[rowid] || {};
11833
+ ySpaceTop = (rowRest.oTop || 0);
11834
+ const lastRow = afterFullData[afterFullData.length - 1];
11835
+ rowid = getRowid($xeTable, lastRow);
11836
+ rowRest = fullAllDataRowIdData[rowid] || {};
11837
+ // 如果为空时还没计算完数据,保持原高度不变
11838
+ if (rowRest.oTop) {
11839
+ sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
11840
+ // 是否展开行
11841
+ if (expandColumn && rowExpandedMaps[rowid]) {
11842
+ sYHeight += rowRest.expandHeight || expandOpts.height || 0;
11843
+ }
11844
+ }
11845
+ if (sYHeight > maxYHeight) {
11846
+ isScrollYBig = true;
11835
11847
  }
11836
11848
  }
11837
- if (sYHeight > maxYHeight) {
11838
- isScrollYBig = true;
11849
+ else {
11850
+ sYHeight = bodyTableElem ? bodyTableElem.clientHeight : 0;
11839
11851
  }
11840
11852
  }
11841
11853
  }
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "4.17.9";
3
+ export const version = "4.17.11";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"4.17.9"}`;
3
+ const version = `table v${"4.17.11"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3141,7 +3141,7 @@ function eqEmptyValue(cellValue) {
3141
3141
  ;// ./packages/ui/index.ts
3142
3142
 
3143
3143
 
3144
- const version = "4.17.9";
3144
+ const version = "4.17.11";
3145
3145
  core_.VxeUI.version = version;
3146
3146
  core_.VxeUI.tableVersion = version;
3147
3147
  core_.VxeUI.setConfig({
@@ -3654,7 +3654,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3654
3654
  const {
3655
3655
  log: log_log
3656
3656
  } = core_.VxeUI;
3657
- const log_version = `table v${"4.17.9"}`;
3657
+ const log_version = `table v${"4.17.11"}`;
3658
3658
  const warnLog = log_log.create('warn', log_version);
3659
3659
  const errLog = log_log.create('error', log_version);
3660
3660
  ;// ./packages/table/src/columnInfo.ts
@@ -5216,6 +5216,7 @@ function getFooterContent(params) {
5216
5216
  itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
5217
5217
  }
5218
5218
  const footParams = Object.assign(params, {
5219
+ cellValue: itemValue,
5219
5220
  itemValue
5220
5221
  });
5221
5222
  if (footerFormatter) {
@@ -14788,8 +14789,7 @@ export_hook_hooks.add('tableExportModule', {
14788
14789
  let loadRest;
14789
14790
  if (opts.mode === 'insert' || opts.mode === 'insertBottom') {
14790
14791
  loadRest = $xeTable.insertAt(data, -1);
14791
- }
14792
- if (opts.mode === 'insertTop') {
14792
+ } else if (opts.mode === 'insertTop') {
14793
14793
  loadRest = $xeTable.insert(data);
14794
14794
  } else {
14795
14795
  loadRest = $xeTable.reloadData(data);
@@ -19104,7 +19104,10 @@ if(sYLoad){scrollYStore.endIndex=scrollYStore.visibleSize;}if(sYLoad){if(reactDa
19104
19104
  if(!(props.height||props.maxHeight)){errLog('vxe.error.reqProp',['height | max-height | virtual-y-config={enabled: false}']);}// if (!props.showOverflow) {
19105
19105
  // warnLog('vxe.error.reqProp', ['table.show-overflow'])
19106
19106
  // }
19107
- if(props.spanMethod){errLog('vxe.error.scrollErrProp',['table.span-method']);}}handleReserveStatus();$xeTable.checkSelectionStatus();$xeTable.dispatchEvent('data-change',{visibleColumn:internalData.visibleColumn,visibleData:internalData.afterFullData},null);return new Promise(resolve=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>handleRecalculateStyle(false,false,false)).then(()=>{handleRecalculateStyle(false,true,true);updateRowOffsetTop();}).then(()=>{let targetScrollLeft=lastScrollLeft;let targetScrollTop=lastScrollTop;const virtualXOpts=computeVirtualXOpts.value;const virtualYOpts=computeVirtualYOpts.value;// 是否在更新数据之后自动滚动重置滚动条
19107
+ // if (props.spanMethod) {
19108
+ // warnLog('vxe.error.scrollErrProp', ['span-method'])
19109
+ // }
19110
+ }handleReserveStatus();$xeTable.checkSelectionStatus();$xeTable.dispatchEvent('data-change',{visibleColumn:internalData.visibleColumn,visibleData:internalData.afterFullData},null);return new Promise(resolve=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>handleRecalculateStyle(false,false,false)).then(()=>{handleRecalculateStyle(false,true,true);updateRowOffsetTop();}).then(()=>{let targetScrollLeft=lastScrollLeft;let targetScrollTop=lastScrollTop;const virtualXOpts=computeVirtualXOpts.value;const virtualYOpts=computeVirtualYOpts.value;// 是否在更新数据之后自动滚动重置滚动条
19108
19111
  if(virtualXOpts.scrollToLeftOnChange){targetScrollLeft=0;}if(virtualYOpts.scrollToTopOnChange){targetScrollTop=0;}reactData.isRowLoading=false;handleRecalculateStyle(false,false,false);updateTreeLineStyle();// 如果是自动行高,特殊情况需调用 recalculate 手动刷新
19109
19112
  if(!props.showOverflow){setTimeout(()=>{handleLazyRecalculate(false,true,true);setTimeout(()=>handleLazyRecalculate(false,true,true),3000);},2000);}// 是否变更虚拟滚动
19110
19113
  if(oldScrollYLoad===sYLoad){restoreScrollLocation($xeTable,targetScrollLeft,targetScrollTop).then(()=>{handleRecalculateStyle(false,true,true);updateRowOffsetTop();updateTreeLineStyle();resolve();});}else{setTimeout(()=>{restoreScrollLocation($xeTable,targetScrollLeft,targetScrollTop).then(()=>{handleRecalculateStyle(false,true,true);updateRowOffsetTop();updateTreeLineStyle();resolve();});});}});});});};/**
@@ -19584,8 +19587,9 @@ if(force){// 更新数据,处理筛选和排序
19584
19587
  updateAfterFullData();// 如果为虚拟树,将树结构拍平
19585
19588
  fullList=handleVirtualTreeToList();}const tableData=scrollYLoad?fullList.slice(scrollYStore.startIndex,scrollYStore.endIndex):fullList.slice(0);const visibleDataRowIdMaps={};tableData.forEach((row,$index)=>{const rowid=getRowid($xeTable,row);const rest=fullDataRowIdData[rowid];if(rest){rest.$index=$index;}visibleDataRowIdMaps[rowid]=row;});reactData.tableData=tableData;internalData.visibleDataRowIdData=visibleDataRowIdMaps;if($xeGanttView&&$xeGanttView.updateViewData){$xeGanttView.updateViewData();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},/**
19586
19589
  * 更新数据行的 Map
19587
- */cacheRowMap(isReset){const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{currKeyField,fullAllDataRowIdData,tableFullData,tableFullTreeData,tableFullGroupData,treeExpandedMaps}=internalData;const fullAllDataRowIdMaps=isReset?{}:{...fullAllDataRowIdData};// 存在已删除数据
19588
- const fullDataRowIdMaps={};const idMaps={};const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const handleRowCache=(row,index,items,currIndex,parentRow,rowid,level,seq)=>{let rowRest=fullAllDataRowIdMaps[rowid];if(idMaps[rowid]){errLog('vxe.error.repeatKey',[currKeyField,rowid]);}if(!rowRest){rowRest={row,rowid,seq,index:-1,_index:-1,$index:-1,treeIndex:index,_tIndex:-1,items,parent:parentRow,level,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;}rowRest.treeLoaded=false;rowRest.expandLoaded=false;rowRest.row=row;rowRest.items=items;rowRest.parent=parentRow;rowRest.level=level;rowRest.index=currIndex;rowRest.treeIndex=index;idMaps[rowid]=true;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=computeTreeOpts.value;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(treeConfig&&lazy){if(row[hasChildField]&&row[childrenField]===undefined){row[childrenField]=null;}if(treeExpandedMaps[rowid]){if(!row[childrenField]||!row[childrenField].length){delete treeExpandedMaps[rowid];}}}handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:childrenField});}else if(isRowGroupStatus){const aggregateOpts=computeAggregateOpts.value;const{mapChildrenField}=aggregateOpts;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:mapChildrenField});}else{tableFullData.forEach((row,index,items)=>{handleRowCache(row,index,items,index,null,handleUpdateRowId(row),0,index+1);});}internalData.fullDataRowIdData=fullDataRowIdMaps;internalData.fullAllDataRowIdData=fullAllDataRowIdMaps;reactData.treeExpandedFlag++;},cacheSourceMap(fullData){const{treeConfig}=props;const treeOpts=computeTreeOpts.value;const sourceData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData,true);const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const sourceRowIdData={};const handleSourceRow=row=>{const rowid=handleUpdateRowId(row);sourceRowIdData[rowid]=row;};// 源数据缓存
19590
+ */cacheRowMap(isReset){const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{currKeyField,fullAllDataRowIdData,tableFullData,tableFullTreeData,tableFullGroupData,treeExpandedMaps,rowExpandedMaps,selectCheckboxMaps}=internalData;const fullAllDataRowIdMaps=isReset?{}:{...fullAllDataRowIdData};// 存在已删除数据
19591
+ const fullDataRowIdMaps={};const idMaps={};const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const handleRowCache=(row,index,items,currIndex,parentRow,rowid,level,seq)=>{let rowRest=fullAllDataRowIdMaps[rowid];if(idMaps[rowid]){errLog('vxe.error.repeatKey',[currKeyField,rowid]);}if(!rowRest){rowRest={row,rowid,seq,index:-1,_index:-1,$index:-1,treeIndex:index,_tIndex:-1,items,parent:parentRow,level,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;}rowRest.treeLoaded=false;rowRest.expandLoaded=false;rowRest.row=row;rowRest.items=items;rowRest.parent=parentRow;rowRest.level=level;rowRest.index=currIndex;rowRest.treeIndex=index;// 更新缓存
19592
+ if(selectCheckboxMaps[rowid]){selectCheckboxMaps[rowid]=row;}if(rowExpandedMaps[rowid]){rowExpandedMaps[rowid]=row;}idMaps[rowid]=true;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=computeTreeOpts.value;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(treeConfig&&lazy){if(row[hasChildField]&&row[childrenField]===undefined){row[childrenField]=null;}if(treeExpandedMaps[rowid]){if(!row[childrenField]||!row[childrenField].length){delete treeExpandedMaps[rowid];}}}handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:childrenField});}else if(isRowGroupStatus){const aggregateOpts=computeAggregateOpts.value;const{mapChildrenField}=aggregateOpts;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:mapChildrenField});}else{tableFullData.forEach((row,index,items)=>{handleRowCache(row,index,items,index,null,handleUpdateRowId(row),0,index+1);});}internalData.fullDataRowIdData=fullDataRowIdMaps;internalData.fullAllDataRowIdData=fullAllDataRowIdMaps;reactData.treeExpandedFlag++;},cacheSourceMap(fullData){const{treeConfig}=props;const treeOpts=computeTreeOpts.value;const sourceData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData,true);const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const sourceRowIdData={};const handleSourceRow=row=>{const rowid=handleUpdateRowId(row);sourceRowIdData[rowid]=row;};// 源数据缓存
19589
19593
  if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sourceData,handleSourceRow,{children:treeOpts.transform?treeOpts.mapChildrenField:childrenField});}else{sourceData.forEach(handleSourceRow);}internalData.sourceDataRowIdData=sourceRowIdData;internalData.tableSourceData=sourceData;},/**
19590
19594
  * 指定列宽的列进行拆分
19591
19595
  */analyColumnWidth(){const{tableFullColumn}=internalData;const columnOpts=computeColumnOpts.value;const{width:defaultWidth,minWidth:defaultMinWidth}=columnOpts;const resizeList=[];const pxList=[];const pxMinList=[];const autoMinList=[];const scaleList=[];const scaleMinList=[];const autoList=[];const remainList=[];tableFullColumn.forEach(column=>{if(defaultWidth&&!column.width){column.width=defaultWidth;}if(defaultMinWidth&&!column.minWidth){column.minWidth=defaultMinWidth;}if(column.visible){if(column.resizeWidth){resizeList.push(column);}else if(column.width==='auto'){autoList.push(column);}else if(isPx(column.width)){pxList.push(column);}else if(isScale(column.width)){scaleList.push(column);}else if(isPx(column.minWidth)){pxMinList.push(column);}else if(column.minWidth==='auto'){autoMinList.push(column);}else if(isScale(column.minWidth)){scaleMinList.push(column);}else{remainList.push(column);}}});Object.assign(reactData.columnStore,{resizeList,pxList,pxMinList,autoMinList,scaleList,scaleMinList,autoList,remainList});},handleColResizeMousedownEvent(evnt,fixedType,params){evnt.stopPropagation();evnt.preventDefault();const{column}=params;const{columnStore,overflowX,scrollbarHeight}=reactData;const{visibleColumn}=internalData;const{leftList,rightList}=columnStore;const resizableOpts=computeResizableOpts.value;const osbHeight=overflowX?scrollbarHeight:0;const tableEl=refElem.value;const leftContainerElem=refLeftContainer.value;const rightContainerElem=refRightContainer.value;const resizeBarElem=refColResizeBar.value;if(!resizeBarElem){return;}const isLeftFixed=fixedType==='left';const isRightFixed=fixedType==='right';const resizeTipElem=resizeBarElem.firstElementChild;const scrollbarXToTop=computeScrollbarXToTop.value;const{clientX:dragClientX}=evnt;const dragBtnElem=evnt.target;let cell=dragBtnElem.parentElement;let resizeColumn=column;const isDragGroupCol=column.children&&column.children.length;if(isDragGroupCol){resizeColumn=getLastChildColumn(column);if(isDragGroupCol){const trEl=cell?cell.parentElement:null;const theadEl=trEl?trEl.parentElement:null;cell=theadEl?theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`):null;}}if(!cell){return;}const cellParams=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(params,{cell,$table:$xeTable});let dragLeft=0;const tableRect=tableEl.getBoundingClientRect();const rightContainerRect=rightContainerElem?rightContainerElem.getBoundingClientRect():null;const cellRect=cell.getBoundingClientRect();const dragBtnRect=dragBtnElem.getBoundingClientRect();const dragBtnWidth=dragBtnElem.clientWidth;const dragBtnOffsetWidth=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(dragBtnWidth/2);const dragPosLeft=dragBtnRect.x-tableRect.x+dragBtnOffsetWidth;const minInterval=getColReMinWidth(cellParams)-dragBtnOffsetWidth;// 列之间的最小间距
@@ -19732,9 +19736,9 @@ updateScrollXSpace(){const{scrollXLoad,overflowX,scrollXWidth}=reactData;const{v
19732
19736
  let isScrollXBig=false;let ySpaceWidth=scrollXWidth;if(scrollXWidth>maxXWidth){// 触右
19733
19737
  if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollLeft+clientWidth>=maxXWidth){xSpaceLeft=maxXWidth-bodyTableElem.clientWidth;}else{xSpaceLeft=(maxXWidth-clientWidth)*(xSpaceLeft/(scrollXWidth-clientWidth));}ySpaceWidth=maxXWidth;isScrollXBig=true;}if(!(scrollXLoad&&overflowX)){xSpaceLeft=0;}if(table_getConfig().scrollMarginStyle){// 已废弃方式
19734
19738
  if(headerTableElem){headerTableElem.style.marginLeft=headerTableElem.getAttribute('xvm')?`${xSpaceLeft}px`:'';}if(bodyTableElem){bodyTableElem.style.marginLeft=`${xSpaceLeft}px`;}if(footerTableElem){footerTableElem.style.marginLeft=footerTableElem.getAttribute('xvm')?`${xSpaceLeft}px`:'';}}else{if(headerTableElem){headerTableElem.style.transform=headerTableElem.getAttribute('xvm')?`translate(${xSpaceLeft}px, 0px)`:'';}if(bodyTableElem){bodyTableElem.style.transform=`translate(${xSpaceLeft}px, ${reactData.scrollYTop||0}px)`;}if(footerTableElem){footerTableElem.style.transform=footerTableElem.getAttribute('xvm')?`translate(${xSpaceLeft}px, 0px)`:'';}}const containerList=['main'];containerList.forEach(name=>{const layoutList=['header','body','footer'];layoutList.forEach(layout=>{const xSpaceElem=getRefElem(elemStore[`${name}-${layout}-xSpace`]);if(xSpaceElem){xSpaceElem.style.width=scrollXLoad?`${ySpaceWidth}px`:'';}});});reactData.scrollXLeft=xSpaceLeft;reactData.scrollXWidth=ySpaceWidth;reactData.isScrollXBig=isScrollXBig;const scrollXSpaceEl=refScrollXSpaceElem.value;if(scrollXSpaceEl){scrollXSpaceEl.style.width=`${ySpaceWidth}px`;}calcScrollbar();if(isScrollXBig&&mouseOpts.area){errLog('vxe.error.notProp',['mouse-config.area']);}if($xeGanttView&&$xeGanttView.handleUpdateSXSpace){$xeGanttView.handleUpdateSXSpace();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{updateStyle();});}},// 更新纵向 Y 可视渲染上下剩余空间大小
19735
- updateScrollYSpace(){const{isAllOverflow,overflowY,scrollYLoad,scrollYHeight,expandColumn}=reactData;const{scrollYStore,elemStore,isResizeCellHeight,afterFullData,fullAllDataRowIdData,rowExpandedMaps}=internalData;const $xeGanttView=internalData.xeGanttView;const{startIndex}=scrollYStore;const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const bodyTableElem=getRefElem(elemStore['main-body-table']);const leftBodyTableElem=getRefElem(elemStore['left-body-table']);const rightbodyTableElem=getRefElem(elemStore['right-body-table']);const containerList=['main','left','right'];let ySpaceTop=0;let sYHeight=scrollYHeight;let isScrollYBig=false;if(scrollYLoad){const isCustomCellHeight=isResizeCellHeight||cellOpts.height||rowOpts.height;if(!isCustomCellHeight&&!expandColumn&&isAllOverflow){sYHeight=afterFullData.length*defaultRowHeight;if(sYHeight>maxYHeight){isScrollYBig=true;}ySpaceTop=Math.max(0,startIndex*defaultRowHeight);}else{const firstRow=afterFullData[startIndex];let rowid=getRowid($xeTable,firstRow);let rowRest=fullAllDataRowIdData[rowid]||{};ySpaceTop=rowRest.oTop||0;const lastRow=afterFullData[afterFullData.length-1];rowid=getRowid($xeTable,lastRow);rowRest=fullAllDataRowIdData[rowid]||{};// 如果为空时还没计算完数据,保持原高度不变
19739
+ updateScrollYSpace(){const{isAllOverflow,overflowY,scrollYLoad,scrollYHeight,expandColumn}=reactData;const{scrollYStore,elemStore,isResizeCellHeight,afterFullData,fullAllDataRowIdData,rowExpandedMaps}=internalData;const $xeGanttView=internalData.xeGanttView;const{startIndex}=scrollYStore;const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const bodyTableElem=getRefElem(elemStore['main-body-table']);const leftBodyTableElem=getRefElem(elemStore['left-body-table']);const rightbodyTableElem=getRefElem(elemStore['right-body-table']);const containerList=['main','left','right'];let ySpaceTop=0;let sYHeight=scrollYHeight;let isScrollYBig=false;if(scrollYLoad){const isCustomCellHeight=isResizeCellHeight||cellOpts.height||rowOpts.height;if(!isCustomCellHeight&&!expandColumn&&isAllOverflow){sYHeight=afterFullData.length*defaultRowHeight;if(sYHeight>maxYHeight){isScrollYBig=true;}ySpaceTop=Math.max(0,startIndex*defaultRowHeight);}else{const firstRow=afterFullData[startIndex];if(firstRow){let rowid=getRowid($xeTable,firstRow);let rowRest=fullAllDataRowIdData[rowid]||{};ySpaceTop=rowRest.oTop||0;const lastRow=afterFullData[afterFullData.length-1];rowid=getRowid($xeTable,lastRow);rowRest=fullAllDataRowIdData[rowid]||{};// 如果为空时还没计算完数据,保持原高度不变
19736
19740
  if(rowRest.oTop){sYHeight=(rowRest.oTop||0)+(rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight);// 是否展开行
19737
- if(expandColumn&&rowExpandedMaps[rowid]){sYHeight+=rowRest.expandHeight||expandOpts.height||0;}}if(sYHeight>maxYHeight){isScrollYBig=true;}}}else{if(bodyTableElem){sYHeight=bodyTableElem.clientHeight;}}let clientHeight=0;if(bodyScrollElem){clientHeight=bodyScrollElem.clientHeight;}// 虚拟渲染
19741
+ if(expandColumn&&rowExpandedMaps[rowid]){sYHeight+=rowRest.expandHeight||expandOpts.height||0;}}if(sYHeight>maxYHeight){isScrollYBig=true;}}else{sYHeight=bodyTableElem?bodyTableElem.clientHeight:0;}}}else{if(bodyTableElem){sYHeight=bodyTableElem.clientHeight;}}let clientHeight=0;if(bodyScrollElem){clientHeight=bodyScrollElem.clientHeight;}// 虚拟渲染
19738
19742
  let ySpaceHeight=sYHeight;let scrollYTop=ySpaceTop;if(isScrollYBig){// 触底
19739
19743
  if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollTop+clientHeight>=maxYHeight){scrollYTop=maxYHeight-bodyTableElem.clientHeight;}else{scrollYTop=(maxYHeight-clientHeight)*(ySpaceTop/(scrollYHeight-clientHeight));}ySpaceHeight=maxYHeight;}if(!(scrollYLoad&&overflowY)){scrollYTop=0;}if(table_getConfig().scrollMarginStyle){if(leftBodyTableElem){leftBodyTableElem.style.marginTop=`${scrollYTop}px`;}if(bodyTableElem){bodyTableElem.style.marginTop=`${scrollYTop}px`;}if(rightbodyTableElem){rightbodyTableElem.style.marginTop=`${scrollYTop}px`;}}else{if(leftBodyTableElem){leftBodyTableElem.style.transform=`translate(0px, ${scrollYTop}px)`;}if(bodyTableElem){bodyTableElem.style.transform=`translate(${reactData.scrollXLeft||0}px, ${scrollYTop}px)`;}if(rightbodyTableElem){rightbodyTableElem.style.transform=`translate(0px, ${scrollYTop}px)`;}}containerList.forEach(name=>{const layoutList=['header','body','footer'];layoutList.forEach(layout=>{const ySpaceElem=getRefElem(elemStore[`${name}-${layout}-ySpace`]);if(ySpaceElem){ySpaceElem.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}});});const scrollYSpaceEl=refScrollYSpaceElem.value;if(scrollYSpaceEl){scrollYSpaceEl.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}const rowExpandYSpaceEl=refRowExpandYSpaceElem.value;if(rowExpandYSpaceEl){rowExpandYSpaceEl.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}reactData.scrollYTop=scrollYTop;reactData.scrollYHeight=ySpaceHeight;reactData.isScrollYBig=isScrollYBig;calcScrollbar();if(isScrollYBig&&mouseOpts.area){errLog('vxe.error.notProp',['mouse-config.area']);}if($xeGanttView&&$xeGanttView.handleUpdateSYSpace){$xeGanttView.handleUpdateSYSpace();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{updateStyle();});},updateScrollXData(){const{isAllOverflow}=reactData;handleTableColumn();$xeTable.updateScrollXSpace();return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{handleTableColumn();$xeTable.updateScrollXSpace();if(!isAllOverflow){$xeTable.updateScrollYSpace();}});},updateScrollYData(){$xeTable.handleTableData();$xeTable.updateScrollYSpace();return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{$xeTable.handleTableData();$xeTable.updateScrollYSpace();});},/**
19740
19744
  * 处理固定列的显示状态