tomtaw-vxe-table 3.25.11 → 3.25.13

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.
package/lib/index.umd.js CHANGED
@@ -3445,7 +3445,7 @@ function getDefaultConfig(val1, def1) {
3445
3445
  /* unused harmony import specifier */ var VxeUI;
3446
3446
 
3447
3447
 
3448
- const ui_version = "3.25.11";
3448
+ const ui_version = "3.25.13";
3449
3449
  core_.VxeUI.version = ui_version;
3450
3450
  core_.VxeUI.tableVersion = ui_version;
3451
3451
  core_.VxeUI.setConfig({
@@ -4440,7 +4440,7 @@ function getPopupAppendElement(appendTo) {
4440
4440
  const {
4441
4441
  log: log_log
4442
4442
  } = core_.VxeUI;
4443
- const tableVersion = `table v${"3.25.11"}`;
4443
+ const tableVersion = `table v${"3.25.13"}`;
4444
4444
  function createComponentLog(name) {
4445
4445
  const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
4446
4446
  const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
@@ -8686,7 +8686,17 @@ let renderColumnList=tableColumn;const isOptimizeMode=isHeaderRenderOptimize;if(
8686
8686
  if(isOptimizeMode){renderColumnList=fixedColumn||[];}}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isGroup){if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}else{if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}}if(currScrollElem){currScrollElem.style.height=`${tHeaderHeight}px`;}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';}}else if(layout==='body'){if(currScrollElem){currScrollElem.style.maxHeight=customMaxHeight?`${bodyMaxHeight}px`:'';currScrollElem.style.height=customHeight?`${tbHeight}px`:'';currScrollElem.style.minHeight=`${bodyMinHeight}px`;}// 如果是固定列
8687
8687
  if(fixedWrapperElem){if(wrapperElem){wrapperElem.style.top=`${tHeaderHeight}px`;}fixedWrapperElem.style.height=`${customHeight>0?customHeight:tableHeight+tHeaderHeight+tFooterHeight+osbHeight}px`;fixedWrapperElem.style.width=`${fixedColumn.reduce((previous,column)=>previous+column.renderWidth,0)}px`;}let renderColumnList=tableColumn;const isOptimizeMode=isBodyRenderOptimize;if(fixedType){renderColumnList=visibleColumn;if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';// 兼容性处理
8688
8688
  tableElem.style.paddingRight=osbWidth&&fixedType&&(browseObj.firefox||browseObj.safari)?`${osbWidth}px`:'';}const emptyBlockElem=getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);if(emptyBlockElem){emptyBlockElem.style.width=tWidth?`${tWidth}px`:'';}}else if(layout==='footer'){let renderColumnList=tableColumn;const isOptimizeMode=isFooterRenderOptimize;if(!isOptimizeMode||!isColLoading&&(fixedType||!overflowX)){renderColumnList=visibleColumn;}if(fixedType){if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}if(currScrollElem){currScrollElem.style.height=`${tFooterHeight}px`;// 如果是固定列
8689
- if(fixedWrapperElem){if(wrapperElem){wrapperElem.style.top=`${customHeight>0?customHeight-tFooterHeight-osbHeight:tableHeight+tHeaderHeight}px`;}}}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';}}});});if(currentRow){$xeTable.setCurrentRow(currentRow);}if(hasEnableConf(mouseConfig,mouseOpts)&&mouseOpts.selected&&editStore.selected.row&&editStore.selected.column){$xeTable.addCellSelectedClass();}if($xeGanttView&&$xeGanttView.handleUpdateStyle){$xeGanttView.handleUpdateStyle();}return $xeTable.$nextTick();}function checkValidate($xeTable,type){if($xeTable.triggerValidate){return $xeTable.triggerValidate(type);}return $xeTable.$nextTick();}/**
8689
+ if(fixedWrapperElem){if(wrapperElem){wrapperElem.style.top=`${customHeight>0?customHeight-tFooterHeight-osbHeight:tableHeight+tHeaderHeight}px`;}}}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';}}});});if(currentRow){$xeTable.setCurrentRow(currentRow);}if(hasEnableConf(mouseConfig,mouseOpts)&&mouseOpts.selected&&editStore.selected.row&&editStore.selected.column){$xeTable.addCellSelectedClass();}if($xeGanttView&&$xeGanttView.handleUpdateStyle){$xeGanttView.handleUpdateStyle();}return $xeTable.$nextTick();}/** 仅供显式开启的独立路径使用;不缓存尺寸或延迟写入。 */function setLayoutStyle(element,name,value){const style=element.style;if(style[name]===value){// 原 setter 会清除 !important;值相同但优先级不同时仍必须写入。
8690
+ const cssName=name.replace(/[A-Z]/g,word=>`-${word.toLowerCase()}`);if(!style.getPropertyPriority(cssName))return;}style[name]=value;}function updateStyleWithDedupe($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const $xeGantt=$xeTable.$xeGantt;const{mouseConfig}=props;const{isGroup,tableColumn,overflowX,scrollbarWidth,overflowY,scrollbarHeight,scrollXWidth,columnStore,editStore,isColLoading}=reactData;const{visibleColumn,tableHeight,elemStore,currentRow,customHeight,customMinHeight,customMaxHeight,tHeaderHeight,tFooterHeight}=internalData;const $xeGanttView=internalData.xeGanttView;const el=$xeTable.$refs.refElem;if(!el||internalData.tBodyHeight&&!el.clientHeight){return;}const browseObj=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();const containerList=['main','left','right'];const{leftList,rightList}=columnStore;let osbWidth=overflowY?scrollbarWidth:0;let osbHeight=overflowX?scrollbarHeight:0;const emptyPlaceholderElem=$xeTable.$refs.refEmptyPlaceholder;const isHeaderRenderOptimize=$xeTable.computeIsHeaderRenderOptimize;const isBodyRenderOptimize=$xeTable.computeIsBodyRenderOptimize;const isFooterRenderOptimize=$xeTable.computeIsFooterRenderOptimize;const mouseOpts=$xeTable.computeMouseOpts;const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const bodyTableElem=getRefElem(elemStore['main-body-table']);if(emptyPlaceholderElem){setLayoutStyle(emptyPlaceholderElem,'top',`${tHeaderHeight}px`);setLayoutStyle(emptyPlaceholderElem,'height',bodyWrapperElem?`${bodyWrapperElem.offsetHeight-osbHeight}px`:'');}const scrollXVisible=$xeTable.computeScrollXVisible;const scrollYVisible=$xeTable.computeScrollYVisible;const scrollbarYToLeft=$xeTable.computeScrollbarYToLeft;let xScrollbarVisible=overflowX?'visible':'hidden';const hideXScroll=scrollXVisible===false||scrollXVisible==='hidden';if(scrollXVisible==='visible'||$xeGanttView){osbHeight=scrollbarHeight;xScrollbarVisible='visible';}else if(hideXScroll){osbHeight=0;xScrollbarVisible='hidden';}let yScrollbarVisible=overflowY?'visible':'hidden';const hideYScroll=scrollYVisible===false||scrollYVisible==='hidden';if(hideYScroll||$xeGantt&&$xeGanttView&&$xeGantt.reactData.showRightView&&!scrollbarYToLeft){osbWidth=0;yScrollbarVisible='hidden';}else if(scrollYVisible==='visible'){osbWidth=scrollbarWidth;yScrollbarVisible='visible';}let tbHeight=0;let bodyMaxHeight=0;const bodyMinHeight=customMinHeight-tHeaderHeight-tFooterHeight-osbHeight;if(customMaxHeight){bodyMaxHeight=Math.max(bodyMinHeight,customMaxHeight-tHeaderHeight-tFooterHeight-osbHeight);}if(customHeight){tbHeight=customHeight-tHeaderHeight-tFooterHeight-osbHeight;}if(!tbHeight){if(bodyTableElem){tbHeight=bodyTableElem.clientHeight;}}if(tbHeight){if(bodyMaxHeight){tbHeight=Math.min(bodyMaxHeight,tbHeight);}tbHeight=Math.max(bodyMinHeight,tbHeight);}const xLeftCornerEl=$xeTable.$refs.refScrollXLeftCornerElem;const xRightCornerEl=$xeTable.$refs.refScrollXRightCornerElem;const scrollXVirtualEl=$xeTable.$refs.refScrollXVirtualElem;if(scrollXVirtualEl){setLayoutStyle(scrollXVirtualEl,'height',`${osbHeight}px`);setLayoutStyle(scrollXVirtualEl,'visibility',xScrollbarVisible);}const xWrapperEl=$xeTable.$refs.refScrollXWrapperElem;if(xWrapperEl){setLayoutStyle(xWrapperEl,'width',`${el.clientWidth-osbWidth}px`);if(scrollbarYToLeft){setLayoutStyle(xWrapperEl,'left',`${osbWidth}px`);}else{setLayoutStyle(xWrapperEl,'left','');}}if(xLeftCornerEl){if(scrollbarYToLeft){setLayoutStyle(xLeftCornerEl,'width',`${osbWidth}px`);setLayoutStyle(xLeftCornerEl,'display',overflowY&&osbWidth?'block':'');}else{setLayoutStyle(xLeftCornerEl,'display','');}}if(xRightCornerEl){if(scrollbarYToLeft){setLayoutStyle(xRightCornerEl,'display','');}else{setLayoutStyle(xRightCornerEl,'width',`${osbWidth}px`);setLayoutStyle(xRightCornerEl,'display',xScrollbarVisible==='visible'?'block':'');}}const scrollYVirtualEl=$xeTable.$refs.refScrollYVirtualElem;if(scrollYVirtualEl){setLayoutStyle(scrollYVirtualEl,'width',`${osbWidth}px`);setLayoutStyle(scrollYVirtualEl,'height',`${tbHeight+tHeaderHeight+tFooterHeight}px`);setLayoutStyle(scrollYVirtualEl,'visibility',yScrollbarVisible);}const yTopCornerEl=$xeTable.$refs.refScrollYTopCornerElem;if(yTopCornerEl){setLayoutStyle(yTopCornerEl,'height',`${tHeaderHeight}px`);setLayoutStyle(yTopCornerEl,'display',tHeaderHeight&&yScrollbarVisible==='visible'?'block':'');}const yWrapperEl=$xeTable.$refs.refScrollYWrapperElem;if(yWrapperEl){setLayoutStyle(yWrapperEl,'height',`${tbHeight}px`);setLayoutStyle(yWrapperEl,'top',`${tHeaderHeight}px`);}const yBottomCornerEl=$xeTable.$refs.refScrollYBottomCornerElem;if(yBottomCornerEl){setLayoutStyle(yBottomCornerEl,'height',`${tFooterHeight}px`);setLayoutStyle(yBottomCornerEl,'top',`${tHeaderHeight+tbHeight}px`);setLayoutStyle(yBottomCornerEl,'display',tFooterHeight&&yScrollbarVisible==='visible'?'block':'');}const rowExpandEl=$xeTable.$refs.refRowExpandElem;if(rowExpandEl){setLayoutStyle(rowExpandEl,'height',`${tbHeight}px`);setLayoutStyle(rowExpandEl,'top',`${tHeaderHeight}px`);}internalData.tBodyHeight=tbHeight;containerList.forEach((name,index)=>{const fixedType=index>0?name:'';const layoutList=['header','body','footer'];const isFixedLeft=fixedType==='left';let fixedColumn=[];let fixedWrapperElem;if(fixedType){fixedColumn=isFixedLeft?leftList:rightList;fixedWrapperElem=isFixedLeft?$xeTable.$refs.refLeftContainer:$xeTable.$refs.refRightContainer;}layoutList.forEach(layout=>{const wrapperElem=getRefElem(elemStore[`${name}-${layout}-wrapper`]);const currScrollElem=getRefElem(elemStore[`${name}-${layout}-scroll`]);const tableElem=getRefElem(elemStore[`${name}-${layout}-table`]);if(layout==='header'){// 表头体样式处理
8691
+ // 横向滚动渲染
8692
+ let renderColumnList=tableColumn;const isOptimizeMode=isHeaderRenderOptimize;if(isGroup){renderColumnList=visibleColumn;}else{if(!isOptimizeMode||!isColLoading&&(fixedType||!overflowX)){renderColumnList=visibleColumn;}if(fixedType){// 如果是使用优化模式
8693
+ if(isOptimizeMode){renderColumnList=fixedColumn||[];}}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isGroup){if(wrapperElem){setLayoutStyle(wrapperElem,'width',scrollXWidth?`${scrollXWidth}px`:'');}}else{if(isOptimizeMode){if(wrapperElem){setLayoutStyle(wrapperElem,'width',tWidth?`${tWidth}px`:'');}}else{if(wrapperElem){setLayoutStyle(wrapperElem,'width',scrollXWidth?`${scrollXWidth}px`:'');}}}}if(currScrollElem){setLayoutStyle(currScrollElem,'height',`${tHeaderHeight}px`);}if(tableElem){setLayoutStyle(tableElem,'width',tWidth?`${tWidth}px`:'');}}else if(layout==='body'){if(currScrollElem){setLayoutStyle(currScrollElem,'maxHeight',customMaxHeight?`${bodyMaxHeight}px`:'');setLayoutStyle(currScrollElem,'height',customHeight?`${tbHeight}px`:'');setLayoutStyle(currScrollElem,'minHeight',`${bodyMinHeight}px`);}// 如果是固定列
8694
+ if(fixedWrapperElem){if(wrapperElem){setLayoutStyle(wrapperElem,'top',`${tHeaderHeight}px`);}setLayoutStyle(fixedWrapperElem,'height',`${customHeight>0?customHeight:tableHeight+tHeaderHeight+tFooterHeight+osbHeight}px`);setLayoutStyle(fixedWrapperElem,'width',`${fixedColumn.reduce((previous,column)=>previous+column.renderWidth,0)}px`);}let renderColumnList=tableColumn;const isOptimizeMode=isBodyRenderOptimize;if(fixedType){renderColumnList=visibleColumn;if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){setLayoutStyle(wrapperElem,'width',tWidth?`${tWidth}px`:'');}}else{if(wrapperElem){setLayoutStyle(wrapperElem,'width',scrollXWidth?`${scrollXWidth}px`:'');}}}if(tableElem){setLayoutStyle(tableElem,'width',tWidth?`${tWidth}px`:'');// 兼容性处理
8695
+ setLayoutStyle(tableElem,'paddingRight',osbWidth&&fixedType&&(browseObj.firefox||browseObj.safari)?`${osbWidth}px`:'');}const emptyBlockElem=getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);if(emptyBlockElem){setLayoutStyle(emptyBlockElem,'width',tWidth?`${tWidth}px`:'');}}else if(layout==='footer'){let renderColumnList=tableColumn;const isOptimizeMode=isFooterRenderOptimize;if(!isOptimizeMode||!isColLoading&&(fixedType||!overflowX)){renderColumnList=visibleColumn;}if(fixedType){if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){setLayoutStyle(wrapperElem,'width',tWidth?`${tWidth}px`:'');}}else{if(wrapperElem){setLayoutStyle(wrapperElem,'width',scrollXWidth?`${scrollXWidth}px`:'');}}}if(currScrollElem){setLayoutStyle(currScrollElem,'height',`${tFooterHeight}px`);// 如果是固定列
8696
+ if(fixedWrapperElem){if(wrapperElem){setLayoutStyle(wrapperElem,'top',`${customHeight>0?customHeight-tFooterHeight-osbHeight:tableHeight+tHeaderHeight}px`);}}}if(tableElem){setLayoutStyle(tableElem,'width',tWidth?`${tWidth}px`:'');}}});});if(currentRow){$xeTable.setCurrentRow(currentRow);}if(hasEnableConf(mouseConfig,mouseOpts)&&mouseOpts.selected&&editStore.selected.row&&editStore.selected.column){$xeTable.addCellSelectedClass();}if($xeGanttView&&$xeGanttView.handleUpdateStyle){$xeGanttView.handleUpdateStyle();}return $xeTable.$nextTick();}function updateScrollXSpaceWithDedupe($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{scrollXLoad,overflowX,scrollXWidth}=reactData;const{visibleColumn,scrollXStore,elemStore,fullColumnIdData}=internalData;const $xeGanttView=internalData.xeGanttView;const mouseOpts=$xeTable.computeMouseOpts;const tableBody=$xeTable.$refs.refTableBody;const tableBodyElem=tableBody?tableBody.$el:null;if(tableBodyElem){const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const bodyTableElem=getRefElem(elemStore['main-body-table']);const headerTableElem=getRefElem(elemStore['main-header-table']);const footerTableElem=getRefElem(elemStore['main-footer-table']);let xSpaceLeft=0;const firstColumn=visibleColumn[scrollXStore.startIndex];if(firstColumn){const colRest=fullColumnIdData[firstColumn.id]||{};xSpaceLeft=colRest.oLeft;}let clientWidth=0;if(bodyScrollElem){clientWidth=bodyScrollElem.clientWidth;}// 虚拟渲染
8697
+ let isScrollXBig=false;let ySpaceWidth=scrollXWidth;if(scrollXWidth>maxXWidth){// 触右
8698
+ 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(methods_getConfig().scrollMarginStyle){// 已废弃方式
8699
+ if(headerTableElem){setLayoutStyle(headerTableElem,'marginLeft',headerTableElem.getAttribute('xvm')?`${xSpaceLeft}px`:'');}if(bodyTableElem){setLayoutStyle(bodyTableElem,'marginLeft',`${xSpaceLeft}px`);}if(footerTableElem){setLayoutStyle(footerTableElem,'marginLeft',footerTableElem.getAttribute('xvm')?`${xSpaceLeft}px`:'');}}else{if(headerTableElem){setLayoutStyle(headerTableElem,'transform',headerTableElem.getAttribute('xvm')?`translate(${xSpaceLeft}px, 0px)`:'');}if(bodyTableElem){setLayoutStyle(bodyTableElem,'transform',`translate(${xSpaceLeft}px, ${reactData.scrollYTop||0}px)`);}if(footerTableElem){setLayoutStyle(footerTableElem,'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){setLayoutStyle(xSpaceElem,'width',scrollXLoad?`${ySpaceWidth}px`:'');}});});reactData.scrollXLeft=xSpaceLeft;reactData.scrollXWidth=ySpaceWidth;reactData.isScrollXBig=isScrollXBig;const scrollXSpaceEl=$xeTable.$refs.refScrollXSpaceElem;if(scrollXSpaceEl){setLayoutStyle(scrollXSpaceEl,'width',`${ySpaceWidth}px`);}calcScrollbar($xeTable);if(isScrollXBig&&mouseOpts.area){methods_errLog('vxe.error.notProp',['mouse-config.area']);}if($xeGanttView&&$xeGanttView.handleUpdateSXSpace){$xeGanttView.handleUpdateSXSpace();}return $xeTable.$nextTick(()=>{updateStyleWithDedupe($xeTable);});}}function checkValidate($xeTable,type){if($xeTable.triggerValidate){return $xeTable.triggerValidate(type);}return $xeTable.$nextTick();}/**
8690
8700
  * 当单元格发生改变时
8691
8701
  * 如果存在规则,则校验
8692
8702
  */function handleChangeCell($xeTable,evnt,params){checkValidate($xeTable,'blur').catch(e=>e).then(()=>{$xeTable.handleEdit(params,evnt).then(()=>checkValidate($xeTable,'change')).catch(e=>e);});}function handleDefaultSort($xeTable){const props=$xeTable;const{sortConfig}=props;if(sortConfig){const sortOpts=$xeTable.computeSortOpts;let{defaultSort}=sortOpts;if(defaultSort){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(defaultSort)){defaultSort=[defaultSort];}if(defaultSort.length){(sortConfig.multiple?defaultSort:defaultSort.slice(0,1)).forEach((item,index)=>{const{field,order}=item;if(field&&order){const column=$xeTable.getColumnByField(field);if(column&&column.sortable){column.order=order;column.sortTime=Date.now()+index;}}});if(!sortOpts.remote){$xeTable.handleTableData(true).then(updateStyle);}}}}}/**
@@ -8858,7 +8868,8 @@ if(props.spanMethod){methods_warnLog('vxe.error.scrollErrProp',['span-method']);
8858
8868
  // 如果列被设置为固定,则清除合并状态
8859
8869
  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($xeTable);handleUpdateAggValues($xeTable);if(isReset){return $xeTable.updateFooter().then(()=>{return $xeTable.recalculate();}).then(()=>{$xeTable.updateCellAreas();return $xeTable.recalculate();});}return $xeTable.updateFooter();}function initColumnHierarchy($xeTable){const internalData=$xeTable;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]){methods_errLog('vxe.error.colRepet',['field',field]);}fullColFieldData[field]=rest;}fullColIdData[colid]=rest;});internalData.fullColumnIdData=fullColIdData;internalData.fullColumnFieldData=fullColFieldData;}function buildColumnInfo($xeTable){const props=$xeTable;const $xeToolbar=$xeTable.$refs.$xeToolbar;const reactData=$xeTable;const internalData=$xeTable;const{scrollXLoad,scrollYLoad,expandColumn}=reactData;const expandOpts=$xeTable.computeExpandOpts;cacheColumnMap($xeTable);parseColumns($xeTable,true).then(()=>{if(reactData.scrollXLoad){loadScrollXData($xeTable);}});$xeTable.clearHeaderFormatterCache();$xeTable.clearMergeCells();$xeTable.clearMergeFooterItems();$xeTable.handleTableData(true);$xeTable.handleAggregateSummaryData();if((scrollXLoad||scrollYLoad)&&expandColumn&&expandOpts.mode!=='fixed'){methods_warnLog('vxe.error.scrollErrProp',['column.type=expand']);}return $xeTable.$nextTick().then(()=>{if($xeToolbar){$xeToolbar.syncUpdate({collectColumn:internalData.collectColumn,$table:$xeTable});}if($xeTable.handleUpdateCustomColumn){$xeTable.handleUpdateCustomColumn();}const columnOpts=$xeTable.computeColumnOpts;if(props.showCustomHeader&&reactData.isGroup&&(columnOpts.resizable||props.resizable)){methods_warnLog('vxe.error.notConflictProp',['show-custom-header & colgroup','column-config.resizable=false']);}reactData.isColLoading=false;return handleLazyRecalculate($xeTable,false,true,true);});}function handleInitColumn($xeTable,collectColumn){const reactData=$xeTable;const internalData=$xeTable;internalData.collectColumn=collectColumn;const tFullColumn=getColumnList(collectColumn);internalData.tableFullColumn=tFullColumn;reactData.updateColFlag++;reactData.isColLoading=true;initColumnHierarchy($xeTable);return Promise.resolve(restoreCustomStorage($xeTable)).then(()=>{return buildColumnInfo($xeTable);});}/**
8860
8870
  * 纵向 Y 可视渲染处理
8861
- */function loadScrollYData($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{isAllOverflow,isScrollYBig}=reactData;const{mergeBodyList,mergeBodyRowMaps,scrollYStore}=internalData;const{preloadSize,startIndex,endIndex,offsetSize}=scrollYStore;const autoOffsetYSize=isAllOverflow?offsetSize:offsetSize+1;const{toVisibleIndex,visibleSize}=handleVirtualYVisible($xeTable);const offsetItem={startIndex:Math.max(0,isScrollYBig?toVisibleIndex-1:toVisibleIndex-1-offsetSize-preloadSize),endIndex:isScrollYBig?toVisibleIndex+visibleSize:toVisibleIndex+visibleSize+autoOffsetYSize+preloadSize};scrollYStore.visibleStartIndex=toVisibleIndex-1;scrollYStore.visibleEndIndex=toVisibleIndex+visibleSize+1;calculateMergerOffsetIndex(mergeBodyList,mergeBodyRowMaps,offsetItem,'row');const{startIndex:offsetStartIndex,endIndex:offsetEndIndex}=offsetItem;if(toVisibleIndex<=startIndex||toVisibleIndex>=endIndex-visibleSize-1){if(startIndex!==offsetStartIndex||endIndex!==offsetEndIndex){scrollYStore.startIndex=offsetStartIndex;scrollYStore.endIndex=offsetEndIndex;$xeTable.updateScrollYData();}}}const createGetRowCacheProp=prop=>{return function(row){const $xeTable=this;const internalData=$xeTable;const{fullAllDataRowIdData}=internalData;if(row){const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){return rowRest[prop];}}return-1;};};const createGetColumnCacheProp=prop=>{return function(column){const $xeTable=this;const internalData=$xeTable;const{fullColumnIdData}=internalData;if(column){const colRest=fullColumnIdData[column.id];if(colRest){return colRest[prop];}}return-1;};};function lazyScrollXData($xeTable){const internalData=$xeTable;const{lxTimeout,lxRunTime,scrollXStore}=internalData;const{visibleSize}=scrollXStore;const fpsTime=visibleSize>26?26:visibleSize>16?14:6;if(lxTimeout){clearTimeout(lxTimeout);}if(!lxRunTime||lxRunTime+fpsTime<Date.now()){internalData.lxRunTime=Date.now();loadScrollXData($xeTable);}internalData.lxTimeout=setTimeout(()=>{internalData.lxTimeout=undefined;internalData.lxRunTime=undefined;loadScrollXData($xeTable);},fpsTime);}function lazyScrollYData($xeTable){const internalData=$xeTable;const{lyTimeout,lyRunTime,scrollYStore}=internalData;const{visibleSize}=scrollYStore;const fpsTime=visibleSize>30?32:visibleSize>20?18:8;if(lyTimeout){clearTimeout(lyTimeout);}if(!lyRunTime||lyRunTime+fpsTime<Date.now()){internalData.lyRunTime=Date.now();loadScrollYData($xeTable);}internalData.lyTimeout=setTimeout(()=>{internalData.lyTimeout=undefined;internalData.lyRunTime=undefined;loadScrollYData($xeTable);},fpsTime);}function handleSyncScroll($xeTable,isRollX,isRollY,syncGuard){const reactData=$xeTable;const internalData=$xeTable;const{scrollXLoad,scrollYLoad,isAllOverflow}=reactData;const autoWidthColumnList=$xeTable.computeAutoWidthColumnList;internalData.lcsRunTime=Date.now();internalData.lcsTimeout=undefined;internalData.intoRunScroll=false;internalData.inVirtualScroll=false;internalData.inWheelScroll=false;internalData.inHeaderScroll=false;internalData.inBodyScroll=false;internalData.inFooterScroll=false;internalData.isSyncGanttScrollTop=false;reactData.lazScrollLoading=false;internalData.scrollRenderType='';const $xeGanttView=internalData.xeGanttView;if($xeGanttView){const ganttInternalData=$xeGanttView.internalData;ganttInternalData.isSyncTableScrollTop=false;}let xRest=null;let yRest=null;if(!isAllOverflow){calcCellHeight($xeTable);updateRowOffsetTop($xeTable);}if(syncGuard)syncGuard.markMeasured();if(isRollX&&scrollXLoad){xRest=$xeTable.updateScrollXData();}if(isRollY&&scrollYLoad){if(autoWidthColumnList.length){calcCellWidth($xeTable);}yRest=$xeTable.updateScrollYData().then(()=>{if(syncGuard&&isTableDestroyed($xeTable))return;if(autoWidthColumnList.length){calcCellWidth($xeTable);autoCellWidth($xeTable);}if(!isAllOverflow){calcCellHeight($xeTable);updateRowOffsetTop($xeTable);}if(syncGuard)syncGuard.markMeasured();return $xeTable.updateScrollYSpace();});}updateRowExpandStyle($xeTable);return Promise.all([xRest,yRest,scrollXLoad||scrollYLoad?$xeTable.updateCellAreas():null]);}/** 不读取单元格尺寸,只比较窗口、布局版本和当前滚动几何。 */function getScrollSyncState($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{scrollXStore,scrollYStore,elemStore,fullAllDataRowIdData}=internalData;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const state=[reactData.tableData,reactData.tableColumn,internalData.afterFullData,internalData.afterFullData.length,fullAllDataRowIdData,internalData.fullCellHeightMaps,$xeTable.computeRowOpts,$xeTable.computeCellOpts,$xeTable.computeExpandOpts,$xeTable.computeVirtualXOpts,$xeTable.computeVirtualYOpts,$xeTable.computeDefaultRowHeight,reactData.isAllOverflow,reactData.scrollXLoad,reactData.scrollYLoad,reactData.upDataFlag,reactData.updateColFlag,reactData.calcCellHeightFlag,reactData.rowExpandHeightFlag,reactData.resizeHeightFlag,reactData.resizeWidthFlag,reactData.rowExpandedFlag,reactData.treeExpandedFlag,reactData.mergeHeadFlag,reactData.mergeBodyFlag,reactData.mergeFootFlag,reactData.scrollYHeight,reactData.scrollYTop,reactData.isScrollYBig,reactData.scrollXWidth,reactData.scrollXLeft,reactData.isScrollXBig,scrollXStore.startIndex,scrollXStore.endIndex,scrollYStore.startIndex,scrollYStore.endIndex,internalData.lastSTime,pendingExpandOffsetUpdates.has($xeTable),bodyScrollElem,bodyScrollElem?bodyScrollElem.scrollLeft:0,bodyScrollElem?bodyScrollElem.scrollTop:0,bodyScrollElem?bodyScrollElem.clientWidth:0,bodyScrollElem?bodyScrollElem.clientHeight:0,bodyScrollElem?bodyScrollElem.scrollWidth:0,bodyScrollElem?bodyScrollElem.scrollHeight:0];reactData.tableColumn.forEach(column=>state.push(column,column.renderWidth));const{handleGetRowId}=createHandleGetRowId($xeTable);reactData.tableData.forEach(row=>{const rowid=handleGetRowId(row);const rest=fullAllDataRowIdData[rowid];state.push(row,rowid,rest,rest&&rest.height,rest&&rest.resizeHeight,rest&&rest.expandHeight,rest&&rest.oTop);});return state;}async function handleStableScrollSync($xeTable,isRollX,isRollY,syncGuard){const reactData=$xeTable;const internalData=$xeTable;try{// 第一轮以及原有的 DOM 提交等待不变,动态高度仍先完整测量。
8871
+ */function loadScrollYData($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{isAllOverflow,isScrollYBig}=reactData;const{mergeBodyList,mergeBodyRowMaps,scrollYStore}=internalData;const{preloadSize,startIndex,endIndex,offsetSize}=scrollYStore;const autoOffsetYSize=isAllOverflow?offsetSize:offsetSize+1;const{toVisibleIndex,visibleSize}=handleVirtualYVisible($xeTable);const offsetItem={startIndex:Math.max(0,isScrollYBig?toVisibleIndex-1:toVisibleIndex-1-offsetSize-preloadSize),endIndex:isScrollYBig?toVisibleIndex+visibleSize:toVisibleIndex+visibleSize+autoOffsetYSize+preloadSize};scrollYStore.visibleStartIndex=toVisibleIndex-1;scrollYStore.visibleEndIndex=toVisibleIndex+visibleSize+1;calculateMergerOffsetIndex(mergeBodyList,mergeBodyRowMaps,offsetItem,'row');const{startIndex:offsetStartIndex,endIndex:offsetEndIndex}=offsetItem;if(toVisibleIndex<=startIndex||toVisibleIndex>=endIndex-visibleSize-1){if(startIndex!==offsetStartIndex||endIndex!==offsetEndIndex){scrollYStore.startIndex=offsetStartIndex;scrollYStore.endIndex=offsetEndIndex;$xeTable.updateScrollYData();}}}const createGetRowCacheProp=prop=>{return function(row){const $xeTable=this;const internalData=$xeTable;const{fullAllDataRowIdData}=internalData;if(row){const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){return rowRest[prop];}}return-1;};};const createGetColumnCacheProp=prop=>{return function(column){const $xeTable=this;const internalData=$xeTable;const{fullColumnIdData}=internalData;if(column){const colRest=fullColumnIdData[column.id];if(colRest){return colRest[prop];}}return-1;};};function lazyScrollXData($xeTable){const internalData=$xeTable;const{lxTimeout,lxRunTime,scrollXStore}=internalData;const{visibleSize}=scrollXStore;const fpsTime=visibleSize>26?26:visibleSize>16?14:6;if(lxTimeout){clearTimeout(lxTimeout);}if(!lxRunTime||lxRunTime+fpsTime<Date.now()){internalData.lxRunTime=Date.now();loadScrollXData($xeTable);}internalData.lxTimeout=setTimeout(()=>{internalData.lxTimeout=undefined;internalData.lxRunTime=undefined;loadScrollXData($xeTable);},fpsTime);}function lazyScrollYData($xeTable){const internalData=$xeTable;const{lyTimeout,lyRunTime,scrollYStore}=internalData;const{visibleSize}=scrollYStore;const fpsTime=visibleSize>30?32:visibleSize>20?18:8;if(lyTimeout){clearTimeout(lyTimeout);}if(!lyRunTime||lyRunTime+fpsTime<Date.now()){internalData.lyRunTime=Date.now();loadScrollYData($xeTable);}internalData.lyTimeout=setTimeout(()=>{internalData.lyTimeout=undefined;internalData.lyRunTime=undefined;loadScrollYData($xeTable);},fpsTime);}function handleSyncScroll($xeTable,isRollX,isRollY,syncGuard){const reactData=$xeTable;const internalData=$xeTable;const{scrollXLoad,scrollYLoad,isAllOverflow}=reactData;const autoWidthColumnList=$xeTable.computeAutoWidthColumnList;internalData.lcsRunTime=Date.now();internalData.lcsTimeout=undefined;internalData.intoRunScroll=false;internalData.inVirtualScroll=false;internalData.inWheelScroll=false;internalData.inHeaderScroll=false;internalData.inBodyScroll=false;internalData.inFooterScroll=false;internalData.isSyncGanttScrollTop=false;reactData.lazScrollLoading=false;internalData.scrollRenderType='';const $xeGanttView=internalData.xeGanttView;if($xeGanttView){const ganttInternalData=$xeGanttView.internalData;ganttInternalData.isSyncTableScrollTop=false;}let xRest=null;let yRest=null;if(!isAllOverflow){calcCellHeight($xeTable);updateRowOffsetTop($xeTable);}if(syncGuard)syncGuard.markMeasured();if(isRollX&&scrollXLoad){xRest=$xeTable.updateScrollXData();}if(isRollY&&scrollYLoad){if(autoWidthColumnList.length){calcCellWidth($xeTable);}yRest=$xeTable.updateScrollYData().then(()=>{if(syncGuard&&isTableDestroyed($xeTable))return;if(autoWidthColumnList.length){calcCellWidth($xeTable);autoCellWidth($xeTable);}if(!isAllOverflow){calcCellHeight($xeTable);updateRowOffsetTop($xeTable);}if(syncGuard)syncGuard.markMeasured();return $xeTable.updateScrollYSpace();});}updateRowExpandStyle($xeTable);return Promise.all([xRest,yRest,scrollXLoad||scrollYLoad?$xeTable.updateCellAreas():null]);}/** 不读取单元格尺寸,只比较窗口、布局版本和当前滚动几何。 */function getScrollSyncState($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{scrollXStore,scrollYStore,elemStore,fullAllDataRowIdData}=internalData;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const state=[// 同一窗口可能被重新 slice;下方逐行快照仍校验对象、顺序、主键及高度。
8872
+ reactData.tableData.length,reactData.tableColumn,internalData.afterFullData,internalData.afterFullData.length,fullAllDataRowIdData,internalData.fullCellHeightMaps,$xeTable.computeRowOpts,$xeTable.computeCellOpts,$xeTable.computeExpandOpts,$xeTable.computeVirtualXOpts,$xeTable.computeVirtualYOpts,$xeTable.computeDefaultRowHeight,reactData.isAllOverflow,reactData.scrollXLoad,reactData.scrollYLoad,reactData.upDataFlag,reactData.updateColFlag,reactData.calcCellHeightFlag,reactData.rowExpandHeightFlag,reactData.resizeHeightFlag,reactData.resizeWidthFlag,reactData.rowExpandedFlag,reactData.treeExpandedFlag,reactData.mergeHeadFlag,reactData.mergeBodyFlag,reactData.mergeFootFlag,reactData.scrollYHeight,reactData.scrollYTop,reactData.isScrollYBig,reactData.scrollXWidth,reactData.scrollXLeft,reactData.isScrollXBig,scrollXStore.startIndex,scrollXStore.endIndex,scrollYStore.startIndex,scrollYStore.endIndex,internalData.lastSTime,pendingExpandOffsetUpdates.has($xeTable),bodyScrollElem,bodyScrollElem?bodyScrollElem.scrollLeft:0,bodyScrollElem?bodyScrollElem.scrollTop:0,bodyScrollElem?bodyScrollElem.clientWidth:0,bodyScrollElem?bodyScrollElem.clientHeight:0,bodyScrollElem?bodyScrollElem.scrollWidth:0,bodyScrollElem?bodyScrollElem.scrollHeight:0];reactData.tableColumn.forEach(column=>state.push(column,column.renderWidth));const{handleGetRowId}=createHandleGetRowId($xeTable);reactData.tableData.forEach(row=>{const rowid=handleGetRowId(row);const rest=fullAllDataRowIdData[rowid];state.push(row,rowid,rest,rest&&rest.height,rest&&rest.resizeHeight,rest&&rest.expandHeight,rest&&rest.oTop);});return state;}async function handleStableScrollSync($xeTable,isRollX,isRollY,syncGuard){const reactData=$xeTable;const internalData=$xeTable;try{// 第一轮以及原有的 DOM 提交等待不变,动态高度仍先完整测量。
8862
8873
  await handleSyncScroll($xeTable,isRollX,isRollY,syncGuard);if(isTableDestroyed($xeTable))return;if(reactData.scrollXLoad||reactData.scrollYLoad){await $xeTable.$nextTick();if(isTableDestroyed($xeTable))return;updateRowExpandStyle($xeTable);if(!internalData.lcsTimeout&&!syncGuard.isStable()){syncGuard.dispose();await handleSyncScroll($xeTable,isRollX,isRollY);}}}finally{syncGuard.dispose();}}function checkLastSyncScroll($xeTable,isRollX,isRollY){const reactData=$xeTable;const internalData=$xeTable;const{lcsTimeout}=internalData;reactData.lazScrollLoading=true;if(lcsTimeout){clearTimeout(lcsTimeout);}internalData.lcsTimeout=setTimeout(()=>{if($xeTable.computeVirtualYOpts.experimentalSkipStableScrollSync===true){if(isTableDestroyed($xeTable))return;const el=$xeTable.$refs.refElem;// 自动列宽、树和跨行合并仍完整保留原来的两轮修正。
8863
8874
  if(el&&!$xeTable.computeAutoWidthColumnList.length&&!$xeTable.treeConfig&&!$xeTable.spanMethod&&!internalData.mergeBodyList.length){const syncGuard=createScrollSyncGuard(el,()=>getScrollSyncState($xeTable));if(syncGuard){handleStableScrollSync($xeTable,isRollX,isRollY,syncGuard);return;}}}handleSyncScroll($xeTable,isRollX,isRollY).then(()=>{if(reactData.scrollXLoad||reactData.scrollYLoad){$xeTable.$nextTick(()=>{updateRowExpandStyle($xeTable);if(!internalData.lcsTimeout){handleSyncScroll($xeTable,isRollX,isRollY);}});}});},240);}const getWheelSpeed=lastScrollTime=>{let multiple=1;const currTime=Date.now();if(lastScrollTime+25>currTime){multiple=1.18;}else if(lastScrollTime+30>currTime){multiple=1.15;}else if(lastScrollTime+40>currTime){multiple=1.12;}else if(lastScrollTime+55>currTime){multiple=1.09;}else if(lastScrollTime+75>currTime){multiple=1.06;}else if(lastScrollTime+100>currTime){multiple=1.03;}return multiple;};const syncGanttScrollTop=($xeTable,scrollTop)=>{const internalData=$xeTable;const{isSyncGanttScrollTop}=internalData;if(isSyncGanttScrollTop){return;}const $xeGanttView=internalData.xeGanttView;if($xeGanttView){const ganttInternalData=$xeGanttView.internalData;ganttInternalData.isSyncTableScrollTop=true;$xeGanttView.handleSyncScrollTop({scrollTop});}};function updateHeight($xeTable){const reactData=$xeTable;const internalData=$xeTable;internalData.customHeight=calcTableHeight($xeTable,'height');internalData.customMinHeight=calcTableHeight($xeTable,'minHeight');internalData.customMaxHeight=calcTableHeight($xeTable,'maxHeight');// 如果启用虚拟滚动,纠正高度
8864
8875
  if(reactData.scrollYLoad&&!(internalData.customHeight||internalData.customMinHeight||internalData.customMaxHeight)){internalData.customHeight=300;}}/**
@@ -9460,7 +9471,8 @@ if(scrollYVisible===false||scrollYVisible==='hidden'){evnt.preventDefault();retu
9460
9471
  if($xeParentTable){if(isRollY){if(checkTargetElement(evnt.target,[leftScrollElem,bodyScrollElem,rightScrollElem],evnt.currentTarget)){evnt.stopPropagation();return;}}if(isRollX){if(checkTargetElement(evnt.target,[headerScrollElem,bodyScrollElem,footerScrollElem],evnt.currentTarget)){evnt.stopPropagation();return;}}}if(!(isRollX||leftFixedWidth||rightFixedWidth||expandColumn)){return;}if(rowOpts.isHover||highlightHoverRow){$xeTable.clearHoverRow();}// 用于鼠标纵向滚轮处理
9461
9472
  if(isRollX){evnt.preventDefault();internalData.inWheelScroll=true;wheelScrollLeftTo(scrollLeft,offsetLeft=>{setScrollLeft(bodyScrollElem,offsetLeft);// 等待动画帧期间范围可能变化,使用浏览器最终接受的位置同步。
9462
9473
  const currLeftNum=bodyScrollElem.scrollLeft;setScrollLeft(xHandleEl,currLeftNum);setScrollLeft(headerScrollElem,currLeftNum);setScrollLeft(footerScrollElem,currLeftNum);if(scrollXLoad){$xeTable.triggerScrollXEvent(evnt);}$xeTable.handleScrollEvent(evnt,isRollY,isRollX,bodyScrollElem.scrollTop,currLeftNum,{type:'table',fixed:''});},$xeTable);}if(isRollY){evnt.preventDefault();wheelScrollTopTo(scrollTop,offsetTop=>{internalData.inWheelScroll=true;setScrollTop(bodyScrollElem,offsetTop);const currTopNum=bodyScrollElem.scrollTop;setScrollTop(yHandleEl,currTopNum);setScrollTop(leftScrollElem,currTopNum);setScrollTop(rightScrollElem,currTopNum);setScrollTop(rowExpandEl,currTopNum);syncGanttScrollTop($xeTable,currTopNum);if(scrollYLoad){$xeTable.triggerScrollYEvent(evnt);}$xeTable.handleScrollEvent(evnt,isRollY,isRollX,currTopNum,bodyScrollElem.scrollLeft,{type:'table',fixed:''});},$xeTable);}},triggerVirtualScrollXEvent(evnt){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{scrollXLoad}=reactData;const{elemStore,inWheelScroll,lastScrollTop,inHeaderScroll,inBodyScroll,inFooterScroll}=internalData;if(inHeaderScroll||inBodyScroll||inFooterScroll){return;}if(inWheelScroll){return;}const headerScrollElem=getRefElem(elemStore['main-header-scroll']);const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const footerScrollElem=getRefElem(elemStore['main-footer-scroll']);const yHandleEl=$xeTable.$refs.refScrollYHandleElem;const wrapperEl=evnt.currentTarget;const{scrollLeft}=wrapperEl;const yBodyEl=yHandleEl||bodyScrollElem;let scrollTop=0;if(yBodyEl){scrollTop=yBodyEl.scrollTop;}const isRollX=true;const isRollY=scrollTop!==lastScrollTop;internalData.inVirtualScroll=true;setScrollLeft(bodyScrollElem,scrollLeft);setScrollLeft(headerScrollElem,scrollLeft);setScrollLeft(footerScrollElem,scrollLeft);if(scrollXLoad){$xeTable.triggerScrollXEvent(evnt);}$xeTable.handleScrollEvent(evnt,isRollY,isRollX,scrollTop,scrollLeft,{type:'table',fixed:''});},triggerVirtualScrollYEvent(evnt){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{scrollYLoad}=reactData;const{elemStore,inWheelScroll,lastScrollLeft,inHeaderScroll,inBodyScroll,inFooterScroll}=internalData;if(inHeaderScroll||inBodyScroll||inFooterScroll){return;}if(inWheelScroll){return;}const leftScrollElem=getRefElem(elemStore['left-body-scroll']);const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const rightScrollElem=getRefElem(elemStore['right-body-scroll']);const rowExpandEl=$xeTable.$refs.refRowExpandElem;const xHandleEl=$xeTable.$refs.refScrollXHandleElem;const wrapperEl=evnt.currentTarget;const{scrollTop}=wrapperEl;const xBodyEl=xHandleEl||bodyScrollElem;let scrollLeft=0;if(xBodyEl){scrollLeft=xBodyEl.scrollLeft;}const isRollX=scrollLeft!==lastScrollLeft;const isRollY=true;internalData.inVirtualScroll=true;setScrollTop(bodyScrollElem,scrollTop);setScrollTop(leftScrollElem,scrollTop);setScrollTop(rightScrollElem,scrollTop);setScrollTop(rowExpandEl,scrollTop);syncGanttScrollTop($xeTable,scrollTop);if(scrollYLoad){$xeTable.triggerScrollYEvent(evnt);}$xeTable.handleScrollEvent(evnt,isRollY,isRollX,scrollTop,scrollLeft,{type:'table',fixed:''});},updateScrollXData(){const $xeTable=this;const reactData=$xeTable;const{isAllOverflow}=reactData;handleTableColumn($xeTable);$xeTable.updateScrollXSpace();return $xeTable.$nextTick().then(()=>{handleTableColumn($xeTable,true);$xeTable.updateScrollXSpace();if(!isAllOverflow){$xeTable.updateScrollYSpace();}});},// 更新横向 X 可视渲染上下剩余空间大小
9463
- updateScrollXSpace(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{scrollXLoad,overflowX,scrollXWidth}=reactData;const{visibleColumn,scrollXStore,elemStore,fullColumnIdData}=internalData;const $xeGanttView=internalData.xeGanttView;const mouseOpts=$xeTable.computeMouseOpts;const tableBody=$xeTable.$refs.refTableBody;const tableBodyElem=tableBody?tableBody.$el:null;if(tableBodyElem){const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const bodyTableElem=getRefElem(elemStore['main-body-table']);const headerTableElem=getRefElem(elemStore['main-header-table']);const footerTableElem=getRefElem(elemStore['main-footer-table']);let xSpaceLeft=0;const firstColumn=visibleColumn[scrollXStore.startIndex];if(firstColumn){const colRest=fullColumnIdData[firstColumn.id]||{};xSpaceLeft=colRest.oLeft;}let clientWidth=0;if(bodyScrollElem){clientWidth=bodyScrollElem.clientWidth;}// 虚拟渲染
9474
+ updateScrollXSpace(){// 入口只分流一次;关闭时不经过去重函数或逐项样式比较。
9475
+ if(this.computeVirtualXOpts.experimentalSkipUnchangedStyle===true){return updateScrollXSpaceWithDedupe(this);}const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{scrollXLoad,overflowX,scrollXWidth}=reactData;const{visibleColumn,scrollXStore,elemStore,fullColumnIdData}=internalData;const $xeGanttView=internalData.xeGanttView;const mouseOpts=$xeTable.computeMouseOpts;const tableBody=$xeTable.$refs.refTableBody;const tableBodyElem=tableBody?tableBody.$el:null;if(tableBodyElem){const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const bodyTableElem=getRefElem(elemStore['main-body-table']);const headerTableElem=getRefElem(elemStore['main-header-table']);const footerTableElem=getRefElem(elemStore['main-footer-table']);let xSpaceLeft=0;const firstColumn=visibleColumn[scrollXStore.startIndex];if(firstColumn){const colRest=fullColumnIdData[firstColumn.id]||{};xSpaceLeft=colRest.oLeft;}let clientWidth=0;if(bodyScrollElem){clientWidth=bodyScrollElem.clientWidth;}// 虚拟渲染
9464
9476
  let isScrollXBig=false;let ySpaceWidth=scrollXWidth;if(scrollXWidth>maxXWidth){// 触右
9465
9477
  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(methods_getConfig().scrollMarginStyle){// 已废弃方式
9466
9478
  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=$xeTable.$refs.refScrollXSpaceElem;if(scrollXSpaceEl){scrollXSpaceEl.style.width=`${ySpaceWidth}px`;}calcScrollbar($xeTable);if(isScrollXBig&&mouseOpts.area){methods_errLog('vxe.error.notProp',['mouse-config.area']);}if($xeGanttView&&$xeGanttView.handleUpdateSXSpace){$xeGanttView.handleUpdateSXSpace();}return $xeTable.$nextTick(()=>{updateStyle($xeTable);});}},updateScrollYData(){const $xeTable=this;$xeTable.handleTableData();$xeTable.updateScrollYSpace();return $xeTable.$nextTick().then(()=>{$xeTable.handleTableData(false,true);$xeTable.updateScrollYSpace();});},handleSyncScrollTop(params){const $xeTable=this;const internalData=$xeTable;const{scrollTop}=params;const{elemStore}=internalData;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(bodyScrollElem){bodyScrollElem.scrollTop=scrollTop;}},// 更新纵向 Y 可视渲染上下剩余空间大小
@@ -21845,6 +21857,8 @@ function bindScrollbarResize($xeTable) {
21845
21857
  if (isVScrollbar) {
21846
21858
  const el = $xeTable.$refs.refElem;
21847
21859
  const viewInnerEl = getRefElem(elemStore['main-body-table']);
21860
+ const viewXSpaceEl = getRefElem(elemStore['main-body-xSpace']);
21861
+ const viewYSpaceEl = getRefElem(elemStore['main-body-ySpace']);
21848
21862
  const scrollObserver = table_globalResize.create(() => {
21849
21863
  $xeTable.reScrollFlag++;
21850
21864
  });
@@ -21854,6 +21868,12 @@ function bindScrollbarResize($xeTable) {
21854
21868
  if (viewInnerEl) {
21855
21869
  scrollObserver.observe(viewInnerEl);
21856
21870
  }
21871
+ if (viewXSpaceEl) {
21872
+ scrollObserver.observe(viewXSpaceEl);
21873
+ }
21874
+ if (viewYSpaceEl) {
21875
+ scrollObserver.observe(viewYSpaceEl);
21876
+ }
21857
21877
  internalData.scrollObserver = scrollObserver;
21858
21878
  }
21859
21879
  }
@@ -22650,11 +22670,12 @@ function renderVirtualBody(h, $xeTable) {
22650
22670
  yThumbHeight,
22651
22671
  xThumbWidth
22652
22672
  } = reactData;
22673
+ const scrollbarOpts = $xeTable.computeScrollbarOpts;
22653
22674
  const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
22654
22675
  const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
22655
22676
  const scrollXVisible = $xeTable.computeScrollXVisible;
22656
22677
  const scrollYVisible = $xeTable.computeScrollYVisible;
22657
- return domUtils.buildClass(['vxe-scrollbar is--virtual', `ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}`, `ov-y--${scrollYVisible === false ? 'hidden' : 'visible'}`, `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`], {
22678
+ return domUtils.buildClass(['vxe-scrollbar is--virtual', scrollbarOpts.fluentOverlay ? 'is--fluent-overlay' : 'is--default-mode', `ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}`, `ov-y--${scrollYVisible === false ? 'hidden' : 'visible'}`, `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`], {
22658
22679
  'overflow-y': yThumbHeight,
22659
22680
  'overflow-x': xThumbWidth
22660
22681
  });