vxe-table 4.15.4 → 4.15.5
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/README.en.md +2 -6
- package/README.ja-JP.md +2 -6
- package/README.md +2 -6
- package/README.zh-TW.md +2 -6
- package/es/grid/src/grid.js +1 -1
- package/es/style.css +1 -1
- package/es/table/src/header.js +2 -2
- package/es/table/src/table.js +42 -20
- package/es/table/src/util.js +1 -10
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +1 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +10 -19
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/header.js +2 -2
- package/lib/table/src/table.js +4 -4
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -10
- package/lib/table/src/util.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/grid/src/grid.ts +1 -1
- package/packages/table/src/header.ts +5 -5
- package/packages/table/src/table.ts +42 -21
- package/packages/table/src/util.ts +1 -10
- package/styles/cssvar.scss +0 -2
- /package/es/{iconfont.1754457119712.ttf → iconfont.1754615009926.ttf} +0 -0
- /package/es/{iconfont.1754457119712.woff → iconfont.1754615009926.woff} +0 -0
- /package/es/{iconfont.1754457119712.woff2 → iconfont.1754615009926.woff2} +0 -0
- /package/lib/{iconfont.1754457119712.ttf → iconfont.1754615009926.ttf} +0 -0
- /package/lib/{iconfont.1754457119712.woff → iconfont.1754615009926.woff} +0 -0
- /package/lib/{iconfont.1754457119712.woff2 → iconfont.1754615009926.woff2} +0 -0
package/lib/table/src/table.js
CHANGED
|
@@ -78,7 +78,7 @@ resizeList.forEach(column=>{const reWidth=_xeUtils.default.toInteger(column.resi
|
|
|
78
78
|
remainList.forEach(column=>{const width=Math.max(meanWidth,minCellWidth);column.renderWidth=width;tWidth+=width;});if(fit){/**
|
|
79
79
|
* 偏移量算法
|
|
80
80
|
* 如果所有列足够放的情况下,从最后动态列开始分配
|
|
81
|
-
*/const dynamicList=scaleList.concat(scaleMinList).concat(pxMinList).concat(autoMinList).concat(remainList);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();};const calcCellAutoHeight=(rowRest,wrapperEl)=>{const cellElemList=wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);let colHeight=rowRest.height;for(let i=0;i<cellElemList.length;i++){const
|
|
81
|
+
*/const dynamicList=scaleList.concat(scaleMinList).concat(pxMinList).concat(autoMinList).concat(remainList);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();};const calcCellAutoHeight=(rowRest,wrapperEl)=>{const cellElemList=wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);let colHeight=rowRest.height;let firstCellStyle=null;let topBottomPadding=0;for(let i=0;i<cellElemList.length;i++){const wrapperElem=cellElemList[i];const cellElem=wrapperElem.parentElement;if(!firstCellStyle){firstCellStyle=getComputedStyle(cellElem);topBottomPadding=firstCellStyle?Math.ceil(_xeUtils.default.toNumber(firstCellStyle.paddingTop)+_xeUtils.default.toNumber(firstCellStyle.paddingBottom)):0;}const cellHeight=wrapperElem?wrapperElem.clientHeight:0;colHeight=Math.max(colHeight,Math.ceil(cellHeight+topBottomPadding));}return colHeight;};const calcCellHeight=()=>{const{tableData,isAllOverflow,scrollYLoad,scrollXLoad}=reactData;const{fullAllDataRowIdData}=internalData;const defaultRowHeight=computeDefaultRowHeight.value;const el=refElem.value;if(!isAllOverflow&&(scrollYLoad||scrollXLoad)&&el){const{handleGetRowId}=(0,_util.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,scrollXLoad?Math.max(rowRest.height,reHeight):reHeight);}el.removeAttribute('data-calc-row');});reactData.calcCellHeightFlag++;}};const getOrderField=column=>{const{sortBy,sortType}=column;return row=>{let cellValue;if(sortBy){cellValue=_xeUtils.default.isFunction(sortBy)?sortBy({row,column}):_xeUtils.default.get(row,sortBy);}else{cellValue=tableMethods.getCellLabel(row,column);}if(!sortType||sortType==='auto'){return isNaN(cellValue)?cellValue:_xeUtils.default.toNumber(cellValue);}else if(sortType==='number'){return _xeUtils.default.toNumber(cellValue);}else if(sortType==='string'){return _xeUtils.default.toValueString(cellValue);}return cellValue;};};const updateAfterListIndex=()=>{const{treeConfig}=props;const{afterFullData,fullDataRowIdData,fullAllDataRowIdData}=internalData;const{handleGetRowId}=(0,_util.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;};/**
|
|
82
82
|
* 预编译
|
|
83
83
|
* 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
|
|
84
84
|
*/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}=(0,_util.createHandleGetRowId)($xeTable);_xeUtils.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();}};/**
|
|
@@ -414,7 +414,7 @@ if(!targetColumn.fixed&&isMaxFixedColumn){if(_ui.VxeUI.modal){_ui.VxeUI.modal.me
|
|
|
414
414
|
* 刷新列信息
|
|
415
415
|
* 将固定的列左边、右边分别靠边
|
|
416
416
|
* 如果传 true 则会检查列顺序并排序
|
|
417
|
-
*/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){_xeUtils.default.each(heightConf,(height,rowid)=>{const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const rHeight=_xeUtils.default.toInteger(height);if(rHeight){rowRest.resizeHeight=rHeight;if(!status){status=true;}}}});if(status){internalData.isResizeCellHeight=true;reactData.resizeHeightFlag++;}}return(0,_vue.nextTick)().then(()=>{updateRowOffsetTop();return{status};});},getRowHeightConf(isFull){const{fullAllDataRowIdData,afterFullData}=internalData;const{handleGetRowId}=(0,_util.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;},setRowHeight(rowOrId,height){const{fullAllDataRowIdData}=internalData;let status=false;const rows=_xeUtils.default.isArray(rowOrId)?rowOrId:[rowOrId];let rHeight=_xeUtils.default.toInteger(height);if((0,_dom.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}=(0,_util.createHandleGetRowId)($xeTable);rows.forEach(row=>{const rowid=_xeUtils.default.isString(row)||_xeUtils.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,_vue.nextTick)().then(()=>{return{status};});},getRowHeight(rowOrId){const{fullAllDataRowIdData}=internalData;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const rowid=_xeUtils.default.isString(rowOrId)||_xeUtils.default.isNumber(rowOrId)?rowOrId:(0,_util.getRowid)($xeTable,rowOrId);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){return rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;}return 0;},/**
|
|
417
|
+
*/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){_xeUtils.default.each(heightConf,(height,rowid)=>{const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const rHeight=_xeUtils.default.toInteger(height);if(rHeight){rowRest.resizeHeight=rHeight;if(!status){status=true;}}}});if(status){internalData.isResizeCellHeight=true;reactData.resizeHeightFlag++;}}return(0,_vue.nextTick)().then(()=>{updateRowOffsetTop();return{status};});},getRowHeightConf(isFull){const{fullAllDataRowIdData,afterFullData}=internalData;const{handleGetRowId}=(0,_util.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=_xeUtils.default.isArray(rowOrId)?rowOrId:[rowOrId];const el=refElem.value;if(el){const{handleGetRowId}=(0,_util.createHandleGetRowId)($xeTable);el.setAttribute('data-calc-row','Y');rows.forEach(row=>{const rowid=_xeUtils.default.isString(row)||_xeUtils.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,_vue.nextTick)();},setRowHeight(rowOrId,height){const{fullAllDataRowIdData}=internalData;let status=false;const rows=_xeUtils.default.isArray(rowOrId)?rowOrId:[rowOrId];let rHeight=_xeUtils.default.toInteger(height);if((0,_dom.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}=(0,_util.createHandleGetRowId)($xeTable);rows.forEach(row=>{const rowid=_xeUtils.default.isString(row)||_xeUtils.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,_vue.nextTick)().then(()=>{return{status};});},getRowHeight(rowOrId){const{fullAllDataRowIdData}=internalData;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const rowid=_xeUtils.default.isString(rowOrId)||_xeUtils.default.isNumber(rowOrId)?rowOrId:(0,_util.getRowid)($xeTable,rowOrId);const rowRest=fullAllDataRowIdData[rowid];if(rowRest){return rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;}return 0;},/**
|
|
418
418
|
* 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
|
|
419
419
|
*/refreshScroll(){const{elemStore,lastScrollLeft,lastScrollTop}=internalData;const headerScrollElem=(0,_util.getRefElem)(elemStore['main-header-scroll']);const bodyScrollElem=(0,_util.getRefElem)(elemStore['main-body-scroll']);const footerScrollElem=(0,_util.getRefElem)(elemStore['main-footer-scroll']);const leftScrollElem=(0,_util.getRefElem)(elemStore['left-body-scroll']);const rightScrollElem=(0,_util.getRefElem)(elemStore['right-body-scroll']);const xHandleEl=refScrollXHandleElem.value;const yHandleEl=refScrollYHandleElem.value;return new Promise(resolve=>{// 还原滚动条位置
|
|
420
420
|
if(lastScrollLeft||lastScrollTop){return(0,_util.restoreScrollLocation)($xeTable,lastScrollLeft,lastScrollTop).then(()=>{// 存在滚动行为未结束情况
|
|
@@ -663,7 +663,7 @@ if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;_xe
|
|
|
663
663
|
* 指定列宽的列进行拆分
|
|
664
664
|
*/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((0,_dom.isPx)(column.width)){pxList.push(column);}else if((0,_dom.isScale)(column.width)){scaleList.push(column);}else if((0,_dom.isPx)(column.minWidth)){pxMinList.push(column);}else if(column.minWidth==='auto'){autoMinList.push(column);}else if((0,_dom.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 resizeColumn=column;const isDragGroupCol=column.children&&column.children.length;if(isDragGroupCol){_xeUtils.default.eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}let cell=dragBtnElem.parentElement;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=_xeUtils.default.assign(params,{cell});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=_xeUtils.default.floor(dragBtnWidth/2);const dragPosLeft=dragBtnRect.x-tableRect.x+dragBtnOffsetWidth;const minInterval=(0,_util.getColReMinWidth)(cellParams)-dragBtnOffsetWidth;// 列之间的最小间距
|
|
665
665
|
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;}}}}// 处理拖动事件
|
|
666
|
-
const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const tableHeight=tableEl.clientHeight;const offsetX=evnt.clientX-dragClientX;let left=dragPosLeft+offsetX;if(isLeftFixed){if(rightContainerRect){left=Math.min(left,rightContainerRect.x-tableRect.x-fixedLeftRemainWidth-minInterval);}}else if(isRightFixed){if(leftContainerElem){left=Math.max(left,leftContainerElem.clientWidth+fixedRightRemainWidth+minInterval);}left=Math.min(left,dragMaxLeft);}dragLeft=Math.max(left,dragMinLeft);const resizeBarLeft=Math.max(1,dragLeft);resizeBarElem.style.left=`${resizeBarLeft}px`;resizeBarElem.style.top=`${scrollbarXToTop?osbHeight:0}px`;resizeBarElem.style.height=`${scrollbarXToTop?tableHeight-osbHeight:tableHeight}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=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;(0,_dom.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=Object.assign(Object.assign({},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);}(0,_dom.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){_xeUtils.default.eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const colid=resizeColumn.id;const colRest=fullColumnIdData[colid];const dragBtnElem=evnt.target;const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});const colMinWidth=(0,_util.getColReMinWidth)(cellParams);el.setAttribute('data-calc-col','Y');let resizeWidth=calcColumnAutoWidth(resizeColumn,el);el.removeAttribute('data-calc-col');if(colRest){resizeWidth=Math.max(resizeWidth,colRest.width);}resizeWidth=Math.max(colMinWidth,resizeWidth);const resizeParams=Object.assign(Object.assign({},params),{resizeWidth,resizeColumn});reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleColResizeDblclickCellAreaEvent){$xeTable.handleColResizeDblclickCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}}},handleRowResizeMousedownEvent(evnt,params){evnt.stopPropagation();evnt.preventDefault();const{row}=params;const{overflowX,scrollbarWidth,overflowY,scrollbarHeight}=reactData;const{elemStore,fullAllDataRowIdData}=internalData;const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const scrollbarYToLeft=computeScrollbarYToLeft.value;const resizableOpts=computeResizableOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const tableEl=refElem.value;const resizeBarElem=refRowResizeBar.value;if(!resizeBarElem){return;}const{clientY:dragClientY}=evnt;const resizeTipElem=resizeBarElem.firstElementChild;const dragBtnElem=evnt.currentTarget;const tdEl=dragBtnElem.parentNode;const trEl=tdEl.parentNode;const bodyScrollElem=(0,_util.getRefElem)(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const rowid=(0,_util.getRowid)($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const defaultRowHeight=computeDefaultRowHeight.value;
|
|
666
|
+
const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const tableHeight=tableEl.clientHeight;const offsetX=evnt.clientX-dragClientX;let left=dragPosLeft+offsetX;if(isLeftFixed){if(rightContainerRect){left=Math.min(left,rightContainerRect.x-tableRect.x-fixedLeftRemainWidth-minInterval);}}else if(isRightFixed){if(leftContainerElem){left=Math.max(left,leftContainerElem.clientWidth+fixedRightRemainWidth+minInterval);}left=Math.min(left,dragMaxLeft);}dragLeft=Math.max(left,dragMinLeft);const resizeBarLeft=Math.max(1,dragLeft);resizeBarElem.style.left=`${resizeBarLeft}px`;resizeBarElem.style.top=`${scrollbarXToTop?osbHeight:0}px`;resizeBarElem.style.height=`${scrollbarXToTop?tableHeight-osbHeight:tableHeight}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=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;(0,_dom.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=Object.assign(Object.assign({},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);}(0,_dom.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){_xeUtils.default.eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const colid=resizeColumn.id;const colRest=fullColumnIdData[colid];const dragBtnElem=evnt.target;const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});const colMinWidth=(0,_util.getColReMinWidth)(cellParams);el.setAttribute('data-calc-col','Y');let resizeWidth=calcColumnAutoWidth(resizeColumn,el);el.removeAttribute('data-calc-col');if(colRest){resizeWidth=Math.max(resizeWidth,colRest.width);}resizeWidth=Math.max(colMinWidth,resizeWidth);const resizeParams=Object.assign(Object.assign({},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;const tableEl=refElem.value;const resizeBarElem=refRowResizeBar.value;if(!resizeBarElem){return;}const{clientY:dragClientY}=evnt;const resizeTipElem=resizeBarElem.firstElementChild;const dragBtnElem=evnt.currentTarget;const tdEl=dragBtnElem.parentNode;const trEl=tdEl.parentNode;const bodyScrollElem=(0,_util.getRefElem)(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const rowid=(0,_util.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(_xeUtils.default.toNumber(cellStyle.paddingTop)+_xeUtils.default.toNumber(cellStyle.paddingBottom)));}const minTop=trRect.y-tableRect.y+cellMinHeight;// 处理拖动事件
|
|
667
667
|
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=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;(0,_dom.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=Object.assign(Object.assign({},params),{resizeHeight,resizeRow:row});internalData.isResizeCellHeight=true;if($xeTable.handleRowResizeCellAreaEvent){$xeTable.handleRowResizeCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);updateRowOffsetTop();}}(0,_dom.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=(0,_util.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=Object.assign(Object.assign({},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=isAllCustom?{}:Object.assign({},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:修复拖动列宽,重置按钮无法点击的问题
|
|
668
668
|
reactData.isCustomStatus=true;}if(storage&&(customConfig?(0,_utils.isEnableConf)(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){if(!tableId){(0,_log.errLog)('vxe.error.reqProp',['id']);return(0,_vue.nextTick)();}const storeData=type==='reset'?{resizableData:{},sortData:[],visibleData:{},fixedData:{},aggGroupData:{},aggFuncData:{}}:tableMethods.getCustomStoreData();if(updateStore){return updateStore({$table:$xeTable,id:tableId,type,storeData});}else{setCustomStorageMap(tableId,type==='reset'?null:storeData);}}return(0,_vue.nextTick)();},handleCustom(){const{mouseConfig}=props;if(mouseConfig){if($xeTable.clearSelected){$xeTable.clearSelected();}if($xeTable.clearCellAreas){$xeTable.clearCellAreas();$xeTable.clearCopyCellArea();}}tablePrivateMethods.analyColumnWidth();return tableMethods.refreshColumn(true);},handleUpdateDataQueue(){reactData.upDataFlag++;},handleRefreshColumnQueue(){reactData.reColumnFlag++;},handleFilterOptions(column){const{filterStore}=reactData;const{filters,filterMultiple,filterRender}=column;const compConf=(0,_utils.isEnableConf)(filterRender)?renderer.get(filterRender.name):null;const frMethod=column.filterRecoverMethod||(compConf?compConf.tableFilterRecoverMethod||compConf.filterRecoverMethod:null);filterStore.multiple=filterMultiple;filterStore.options=filters;filterStore.column=column;// 复原状态
|
|
669
669
|
filterStore.options.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=interceptor.get(type);// 兼容老版本
|
|
@@ -850,7 +850,7 @@ if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollTop+clientHeight>=maxYHei
|
|
|
850
850
|
// if (checkboxColumn && internalData.tableFullData.length > 300 && !checkboxOpts.checkField) {
|
|
851
851
|
// warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
|
|
852
852
|
// }
|
|
853
|
-
if((scrollXLoad||scrollYLoad)&&expandColumn&&expandOpts.mode!=='fixed'){(0,_log.warnLog)('vxe.error.scrollErrProp',['column.type=expand']);}return tableMethods.recalculate();});});const staticColumnFlag=(0,_vue.ref)(0);(0,_vue.watch)(()=>reactData.staticColumns.length,()=>{staticColumnFlag.value++;});(0,_vue.watch)(()=>reactData.staticColumns,()=>{staticColumnFlag.value++;});(0,_vue.watch)(staticColumnFlag,()=>{(0,_vue.nextTick)(()=>handleInitColumn(_xeUtils.default.clone(reactData.staticColumns)));});const tableColumnFlag=(0,_vue.ref)(0);(0,_vue.watch)(()=>reactData.tableColumn.length,()=>{tableColumnFlag.value++;});(0,_vue.watch)(()=>reactData.tableColumn,()=>{tableColumnFlag.value++;});(0,_vue.watch)(tableColumnFlag,()=>{tablePrivateMethods.analyColumnWidth();});(0,_vue.watch)(()=>reactData.upDataFlag,()=>{(0,_vue.nextTick)(()=>{tableMethods.updateData();});});(0,_vue.watch)(()=>reactData.reColumnFlag,()=>{(0,_vue.nextTick)(()=>{tableMethods.refreshColumn();});});const
|
|
853
|
+
if((scrollXLoad||scrollYLoad)&&expandColumn&&expandOpts.mode!=='fixed'){(0,_log.warnLog)('vxe.error.scrollErrProp',['column.type=expand']);}return tableMethods.recalculate();});});const staticColumnFlag=(0,_vue.ref)(0);(0,_vue.watch)(()=>reactData.staticColumns.length,()=>{staticColumnFlag.value++;});(0,_vue.watch)(()=>reactData.staticColumns,()=>{staticColumnFlag.value++;});(0,_vue.watch)(staticColumnFlag,()=>{(0,_vue.nextTick)(()=>handleInitColumn(_xeUtils.default.clone(reactData.staticColumns)));});const tableColumnFlag=(0,_vue.ref)(0);(0,_vue.watch)(()=>reactData.tableColumn.length,()=>{tableColumnFlag.value++;});(0,_vue.watch)(()=>reactData.tableColumn,()=>{tableColumnFlag.value++;});(0,_vue.watch)(tableColumnFlag,()=>{tablePrivateMethods.analyColumnWidth();});(0,_vue.watch)(()=>reactData.upDataFlag,()=>{(0,_vue.nextTick)(()=>{tableMethods.updateData();});});(0,_vue.watch)(()=>reactData.reColumnFlag,()=>{(0,_vue.nextTick)(()=>{tableMethods.refreshColumn();});});const reLayoutFlag=(0,_vue.ref)(0);(0,_vue.watch)(computeSize,()=>{reLayoutFlag.value++;});(0,_vue.watch)(()=>props.showHeader,()=>{reLayoutFlag.value++;});(0,_vue.watch)(()=>props.showFooter,()=>{reLayoutFlag.value++;});(0,_vue.watch)(()=>reactData.overflowX,()=>{reLayoutFlag.value++;});(0,_vue.watch)(()=>reactData.overflowY,()=>{reLayoutFlag.value++;});(0,_vue.watch)(()=>props.height,()=>{reLayoutFlag.value++;});(0,_vue.watch)(()=>props.maxHeight,()=>{reLayoutFlag.value++;});(0,_vue.watch)(computeScrollbarXToTop,()=>{reLayoutFlag.value++;});(0,_vue.watch)(computeScrollbarYToLeft,()=>{reLayoutFlag.value++;});(0,_vue.watch)(()=>_ui.VxeUI.getLanguage(),()=>{reLayoutFlag.value++;});(0,_vue.watch)(reLayoutFlag,()=>{$xeTable.recalculate(true);});const footFlag=(0,_vue.ref)(0);(0,_vue.watch)(()=>props.footerData?props.footerData.length:-1,()=>{footFlag.value++;});(0,_vue.watch)(()=>props.footerData,()=>{footFlag.value++;});(0,_vue.watch)(footFlag,()=>{$xeTable.updateFooter();});(0,_vue.watch)(()=>props.syncResize,value=>{if(value){handleUpdateResize();(0,_vue.nextTick)(()=>{handleUpdateResize();setTimeout(()=>handleUpdateResize());});}});const mergeCellFlag=(0,_vue.ref)(0);(0,_vue.watch)(()=>props.mergeCells?props.mergeCells.length:-1,()=>{mergeCellFlag.value++;});(0,_vue.watch)(()=>props.mergeCells,()=>{mergeCellFlag.value++;});(0,_vue.watch)(mergeCellFlag,()=>{handleUpdateMergeBodyCells(props.mergeCells||[]);});const mergeFooterItemFlag=(0,_vue.ref)(0);(0,_vue.watch)(()=>props.mergeFooterItems?props.mergeFooterItems.length:-1,()=>{mergeFooterItemFlag.value++;});(0,_vue.watch)(()=>props.mergeFooterItems,()=>{mergeFooterItemFlag.value++;});(0,_vue.watch)(mergeFooterItemFlag,()=>{handleUpdateMergeFooterCells(props.mergeFooterItems||[]);});(0,_vue.watch)(computeRowGroupFields,val=>{handleUpdateRowGroup(val);});(0,_vue.watch)(computeRowField,()=>{const{inited,tableFullData}=internalData;// 行主键被改变,重载表格
|
|
854
854
|
if(inited){handleKeyField();reactData.tableData=[];(0,_vue.nextTick)(()=>{$xeTable.reloadData(tableFullData);});}});if($xeTabs){(0,_vue.watch)(()=>$xeTabs?$xeTabs.reactData.resizeFlag:null,()=>{handleGlobalResizeEvent();});}handleKeyField();hooks.forEach(options=>{const{setupTable}=options;if(setupTable){const hookRest=setupTable($xeTable);if(hookRest&&_xeUtils.default.isObject(hookRest)){Object.assign($xeTable,hookRest);}}});tablePrivateMethods.preventEvent(null,'created',{$table:$xeTable});let resizeObserver;(0,_vue.onActivated)(()=>{tableMethods.recalculate().then(()=>tableMethods.refreshScroll());tablePrivateMethods.preventEvent(null,'activated',{$table:$xeTable});});(0,_vue.onDeactivated)(()=>{internalData.isActivated=false;tablePrivateMethods.preventEvent(null,'deactivated',{$table:$xeTable});});(0,_vue.onMounted)(()=>{const columnOpts=computeColumnOpts.value;const rowOpts=computeRowOpts.value;const customOpts=computeCustomOpts.value;const aggregateOpts=computeAggregateOpts.value;const virtualYOpts=computeVirtualYOpts.value;const{groupFields}=aggregateOpts;if(columnOpts.drag||rowOpts.drag||customOpts.allowSort){(0,_dom.initTpImg)();}handleUpdateRowGroup(groupFields);(0,_vue.nextTick)(()=>{const{data,exportConfig,importConfig,treeConfig,showOverflow,highlightCurrentRow,highlightCurrentColumn}=props;const{scrollXStore,scrollYStore}=internalData;const editOpts=computeEditOpts.value;const treeOpts=computeTreeOpts.value;const radioOpts=computeRadioOpts.value;const checkboxOpts=computeCheckboxOpts.value;const expandOpts=computeExpandOpts.value;const rowOpts=computeRowOpts.value;const customOpts=computeCustomOpts.value;const mouseOpts=computeMouseOpts.value;const exportOpts=computeExportOpts.value;const importOpts=computeImportOpts.value;const currentRowOpts=computeCurrentRowOpts.value;const currentColumnOpts=computeCurrentColumnOpts.value;const keyboardOpts=computeKeyboardOpts.value;const aggregateOpts=computeAggregateOpts.value;if(props.rowId){(0,_log.warnLog)('vxe.error.delProp',['row-id','row-config.keyField']);}if(props.rowKey){(0,_log.warnLog)('vxe.error.delProp',['row-key','row-config.useKey']);}if(props.columnKey){(0,_log.warnLog)('vxe.error.delProp',['column-id','column-config.useKey']);}if(!(props.rowId||rowOpts.keyField)&&(checkboxOpts.reserve||checkboxOpts.checkRowKeys||radioOpts.reserve||radioOpts.checkRowKey||expandOpts.expandRowKeys||treeOpts.expandRowKeys)){(0,_log.warnLog)('vxe.error.reqProp',['row-config.keyField']);}if(props.editConfig&&(editOpts.showStatus||editOpts.showUpdateStatus||editOpts.showInsertStatus)&&!props.keepSource){(0,_log.warnLog)('vxe.error.reqProp',['keep-source']);}if(treeConfig&&(treeOpts.showLine||treeOpts.line)&&!showOverflow){(0,_log.warnLog)('vxe.error.reqProp',['show-overflow']);}if(treeConfig&&!treeOpts.transform&&props.stripe){(0,_log.warnLog)('vxe.error.noTree',['stripe']);}if(props.showFooter&&!(props.footerMethod||props.footerData)){(0,_log.warnLog)('vxe.error.reqProp',['footer-data | footer-method']);}if(rowOpts.height){(0,_log.warnLog)('vxe.error.delProp',['row-config.height','cell-config.height']);}if(props.highlightCurrentRow){(0,_log.warnLog)('vxe.error.delProp',['highlight-current-row','row-config.isCurrent']);}if(props.highlightHoverRow){(0,_log.warnLog)('vxe.error.delProp',['highlight-hover-row','row-config.isHover']);}if(props.highlightCurrentColumn){(0,_log.warnLog)('vxe.error.delProp',['highlight-current-column','column-config.isCurrent']);}if(props.highlightHoverColumn){(0,_log.warnLog)('vxe.error.delProp',['highlight-hover-column','column-config.isHover']);}if(props.resizable){(0,_log.warnLog)('vxe.error.delProp',['resizable','column-config.resizable']);}// if (props.scrollY) {
|
|
855
855
|
// warnLog('vxe.error.delProp', ['scroll-y', 'virtual-y-config'])
|
|
856
856
|
// }
|