vxe-table 3.24.5 → 3.24.6
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/es/style.css +1 -1
- package/es/table/src/methods.js +10 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +6 -6
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/methods.js +1 -1
- package/lib/table/src/methods.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/table/src/methods.ts +13 -0
- /package/es/{iconfont.1792211397379.ttf → iconfont.1792229546384.ttf} +0 -0
- /package/es/{iconfont.1792211397379.woff → iconfont.1792229546384.woff} +0 -0
- /package/es/{iconfont.1792211397379.woff2 → iconfont.1792229546384.woff2} +0 -0
- /package/lib/{iconfont.1792211397379.ttf → iconfont.1792229546384.ttf} +0 -0
- /package/lib/{iconfont.1792211397379.woff → iconfont.1792229546384.woff} +0 -0
- /package/lib/{iconfont.1792211397379.woff2 → iconfont.1792229546384.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -823,7 +823,7 @@ if(isRollX){evnt.preventDefault();internalData.inWheelScroll=true;(0,_dom.wheelS
|
|
|
823
823
|
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=(0,_util.getRefElem)(elemStore['main-body-scroll']);const bodyTableElem=(0,_util.getRefElem)(elemStore['main-body-table']);const headerTableElem=(0,_util.getRefElem)(elemStore['main-header-table']);const footerTableElem=(0,_util.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;}// 虚拟渲染
|
|
824
824
|
let isScrollXBig=false;let ySpaceWidth=scrollXWidth;if(scrollXWidth>maxXWidth){// 触右
|
|
825
825
|
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(getConfig().scrollMarginStyle){// 已废弃方式
|
|
826
|
-
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=(0,_util.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){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();$xeTable.updateScrollYSpace();});},// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
826
|
+
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=(0,_util.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){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();$xeTable.updateScrollYSpace();});},handleSyncScrollTop(params){const $xeTable=this;const internalData=$xeTable;const{scrollTop}=params;const{elemStore}=internalData;const bodyScrollElem=(0,_util.getRefElem)(elemStore['main-body-scroll']);if(bodyScrollElem){bodyScrollElem.scrollTop=scrollTop;}},// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
827
827
|
updateScrollYSpace(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{isAllOverflow,overflowY,scrollYLoad,scrollYHeight,expandColumn}=reactData;const{scrollYStore,elemStore,isResizeCellHeight,afterFullData,fullAllDataRowIdData,rowExpandedMaps}=internalData;const $xeGanttView=internalData.xeGanttView;const{startIndex}=scrollYStore;const mouseOpts=$xeTable.computeMouseOpts;const expandOpts=$xeTable.computeExpandOpts;const rowOpts=$xeTable.computeRowOpts;const cellOpts=$xeTable.computeCellOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const bodyScrollElem=(0,_util.getRefElem)(elemStore['main-body-scroll']);const bodyTableElem=(0,_util.getRefElem)(elemStore['main-body-table']);const leftBodyTableElem=(0,_util.getRefElem)(elemStore['left-body-table']);const rightbodyTableElem=(0,_util.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=(0,_util.getRowid)($xeTable,firstRow);let rowRest=fullAllDataRowIdData[rowid]||{};ySpaceTop=rowRest.oTop||0;const lastRow=afterFullData[afterFullData.length-1];rowid=(0,_util.getRowid)($xeTable,lastRow);rowRest=fullAllDataRowIdData[rowid]||{};if(rowRest){const rHeight=(0,_util.getCellRestHeight)(rowRest,cellOpts,rowOpts,defaultRowHeight);// 如果为空时还没计算完数据,保持原高度不变
|
|
828
828
|
if(rHeight){sYHeight=(rowRest.oTop||0)+rHeight;// 是否展开行
|
|
829
829
|
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;}// 虚拟渲染
|