vxe-table 3.19.22 → 3.19.25
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/methods.js +11 -4
- package/es/toolbar/src/toolbar.js +103 -81
- package/es/toolbar/style.css +11 -4
- package/es/toolbar/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-toolbar/style.css +11 -4
- package/es/vxe-toolbar/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +133 -111
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/methods.js +11 -4
- package/lib/table/src/methods.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +127 -105
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +11 -4
- package/lib/toolbar/style/style.min.css +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/lib/vxe-toolbar/style/style.css +11 -4
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/package.json +2 -3
- package/packages/table/src/methods.ts +20 -9
- package/packages/toolbar/src/toolbar.ts +117 -83
- package/styles/components/toolbar.scss +11 -4
- /package/es/{iconfont.1764380622607.ttf → iconfont.1764811551687.ttf} +0 -0
- /package/es/{iconfont.1764380622607.woff → iconfont.1764811551687.woff} +0 -0
- /package/es/{iconfont.1764380622607.woff2 → iconfont.1764811551687.woff2} +0 -0
- /package/lib/{iconfont.1764380622607.ttf → iconfont.1764811551687.ttf} +0 -0
- /package/lib/{iconfont.1764380622607.woff → iconfont.1764811551687.woff} +0 -0
- /package/lib/{iconfont.1764380622607.woff2 → iconfont.1764811551687.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
|
|
|
2005
2005
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2006
2006
|
|
|
2007
2007
|
|
|
2008
|
-
const version = "3.19.
|
|
2008
|
+
const version = "3.19.25";
|
|
2009
2009
|
core_.VxeUI.version = version;
|
|
2010
2010
|
core_.VxeUI.tableVersion = version;
|
|
2011
2011
|
core_.VxeUI.setConfig({
|
|
@@ -2715,7 +2715,7 @@ function isNodeElement(elem) {
|
|
|
2715
2715
|
const {
|
|
2716
2716
|
log: log_log
|
|
2717
2717
|
} = core_.VxeUI;
|
|
2718
|
-
const log_version = `table v${"3.19.
|
|
2718
|
+
const log_version = `table v${"3.19.25"}`;
|
|
2719
2719
|
const warnLog = log_log.create('warn', log_version);
|
|
2720
2720
|
const errLog = log_log.create('error', log_version);
|
|
2721
2721
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -6117,7 +6117,7 @@ if(expandColumn&&rowExpandedMaps[rowid]){offsetTop+=rowRest.expandHeight||expand
|
|
|
6117
6117
|
* 更新展开行样式
|
|
6118
6118
|
*/function updateRowExpandStyle($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{expandColumn,scrollYLoad,scrollYTop,isScrollYBig}=reactData;const expandOpts=$xeTable.computeExpandOpts;const rowOpts=$xeTable.computeRowOpts;const cellOpts=$xeTable.computeCellOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const{mode}=expandOpts;if(expandColumn&&mode==='fixed'){const{elemStore,fullAllDataRowIdData}=internalData;const rowExpandEl=$xeTable.$refs.refRowExpandElem;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(rowExpandEl&&bodyScrollElem){let isUpdateHeight=false;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(rowExpandEl.children,reEl=>{const expandEl=reEl;const rowid=expandEl.getAttribute('rowid')||'';const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const expandHeight=expandEl.offsetHeight+1;const trEl=bodyScrollElem.querySelector(`.vxe-body--row[rowid="${rowid}"]`);let offsetTop=0;if(scrollYLoad){if(isScrollYBig&&trEl){offsetTop=trEl.offsetTop+trEl.offsetHeight;}else{offsetTop=rowRest.oTop+(rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight);}}else{if(trEl){offsetTop=trEl.offsetTop+trEl.offsetHeight;}}if(isScrollYBig){offsetTop+=scrollYTop;}expandEl.style.top=toCssUnit(offsetTop);if(!isUpdateHeight){if(rowRest.expandHeight!==expandHeight){isUpdateHeight=true;}}rowRest.expandHeight=expandHeight;}});if(isUpdateHeight){reactData.rowExpandHeightFlag++;$xeTable.$nextTick(()=>{updateRowOffsetTop($xeTable);});}}}}/**
|
|
6119
6119
|
* 更新树连接线样式
|
|
6120
|
-
*/function updateTreeLineStyle($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;if(!treeConfig){return;}const{tableData}=reactData;const{fullAllDataRowIdData,treeExpandedMaps}=internalData;const cellOpts=$xeTable.computeCellOpts;const rowOpts=$xeTable.computeRowOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const treeOpts=$xeTable.computeTreeOpts;const{transform,mapChildrenField}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const{handleGetRowId}=createHandleGetRowId($xeTable);const expParentList=[];const handleNodeRow=(row,rIndex,rows)=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid]||{};const childList=row[transform?mapChildrenField:childrenField];const prevRow=rows[rIndex-1]||null;const nextRow=rows[rIndex+1]||null;if(childList&&childList.length&&treeExpandedMaps[rowid]){expParentList.push({row,prevRow,nextRow});childList.forEach((childRow,crIndex)=>{const childRowid=handleGetRowId(childRow);if(treeExpandedMaps[childRowid]){handleNodeRow(childRow,crIndex,childList);}});}else{if(nextRow){const nextRowid=handleGetRowId(nextRow);const nextRowRest=fullAllDataRowIdData[nextRowid]||{};const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);const nextCellHeight=getCellRestHeight(nextRowRest,cellOpts,rowOpts,defaultRowHeight);rowRest.oHeight=currCellHeight;rowRest.lineHeight=Math.floor(currCellHeight/2+nextCellHeight/2);}else{rowRest.oHeight=0;rowRest.lineHeight=0;}}};tableData.forEach((row,rIndex)=>{handleNodeRow(row,rIndex,tableData);});external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastArrayEach(expParentList,({row,nextRow})=>{const rowid=handleGetRowId(row);const childList=row[transform?mapChildrenField:childrenField];const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);let countOffsetHeight=currCellHeight;let countLineHeight=0;childList.forEach(childRow=>{const childRowid=handleGetRowId(childRow);const childRowRest=fullAllDataRowIdData[childRowid]||{};const childList=childRow[transform?mapChildrenField:childrenField];if(treeExpandedMaps[childRowid]&&childList&&childList.length){countOffsetHeight+=childRowRest.oHeight||0;countLineHeight+=childRowRest.oHeight||0;}else{const cellHeight=getCellRestHeight(childRowRest,cellOpts,rowOpts,defaultRowHeight);childRowRest.oHeight=cellHeight;childRowRest.lineHeight=cellHeight;countOffsetHeight+=cellHeight;countLineHeight+=cellHeight;}});if(nextRow){const nextRowid=handleGetRowId(nextRow);const nextRowRest=fullAllDataRowIdData[nextRowid]||{};const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);const nextCellHeight=getCellRestHeight(nextRowRest,cellOpts,rowOpts,defaultRowHeight);countOffsetHeight+=currCellHeight;countLineHeight+=Math.floor(currCellHeight/2+nextCellHeight/2);}rowRest.lineHeight=countLineHeight;rowRest.oHeight=countOffsetHeight;}});}function handleRowExpandScroll($xeTable){const internalData=$xeTable;const{elemStore}=internalData;const rowExpandEl=$xeTable.$refs.refRowExpandElem;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(rowExpandEl&&bodyScrollElem){rowExpandEl.scrollTop=bodyScrollElem.scrollTop;}}function handleColumnVisible(visible){const $xeTable=this;
|
|
6120
|
+
*/function updateTreeLineStyle($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;if(!treeConfig){return;}const{tableData}=reactData;const{fullAllDataRowIdData,treeExpandedMaps}=internalData;const cellOpts=$xeTable.computeCellOpts;const rowOpts=$xeTable.computeRowOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const treeOpts=$xeTable.computeTreeOpts;const{transform,mapChildrenField}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const{handleGetRowId}=createHandleGetRowId($xeTable);const expParentList=[];const handleNodeRow=(row,rIndex,rows)=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid]||{};const childList=row[transform?mapChildrenField:childrenField];const prevRow=rows[rIndex-1]||null;const nextRow=rows[rIndex+1]||null;if(childList&&childList.length&&treeExpandedMaps[rowid]){expParentList.push({row,prevRow,nextRow});childList.forEach((childRow,crIndex)=>{const childRowid=handleGetRowId(childRow);if(treeExpandedMaps[childRowid]){handleNodeRow(childRow,crIndex,childList);}});}else{if(nextRow){const nextRowid=handleGetRowId(nextRow);const nextRowRest=fullAllDataRowIdData[nextRowid]||{};const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);const nextCellHeight=getCellRestHeight(nextRowRest,cellOpts,rowOpts,defaultRowHeight);rowRest.oHeight=currCellHeight;rowRest.lineHeight=Math.floor(currCellHeight/2+nextCellHeight/2);}else{rowRest.oHeight=0;rowRest.lineHeight=0;}}};tableData.forEach((row,rIndex)=>{handleNodeRow(row,rIndex,tableData);});external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastArrayEach(expParentList,({row,nextRow})=>{const rowid=handleGetRowId(row);const childList=row[transform?mapChildrenField:childrenField];const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);let countOffsetHeight=currCellHeight;let countLineHeight=0;childList.forEach(childRow=>{const childRowid=handleGetRowId(childRow);const childRowRest=fullAllDataRowIdData[childRowid]||{};const childList=childRow[transform?mapChildrenField:childrenField];if(treeExpandedMaps[childRowid]&&childList&&childList.length){countOffsetHeight+=childRowRest.oHeight||0;countLineHeight+=childRowRest.oHeight||0;}else{const cellHeight=getCellRestHeight(childRowRest,cellOpts,rowOpts,defaultRowHeight);childRowRest.oHeight=cellHeight;childRowRest.lineHeight=cellHeight;countOffsetHeight+=cellHeight;countLineHeight+=cellHeight;}});if(nextRow){const nextRowid=handleGetRowId(nextRow);const nextRowRest=fullAllDataRowIdData[nextRowid]||{};const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);const nextCellHeight=getCellRestHeight(nextRowRest,cellOpts,rowOpts,defaultRowHeight);countOffsetHeight+=currCellHeight;countLineHeight+=Math.floor(currCellHeight/2+nextCellHeight/2);}rowRest.lineHeight=countLineHeight;rowRest.oHeight=countOffsetHeight;}});}function handleRowExpandScroll($xeTable){const internalData=$xeTable;const{elemStore}=internalData;const rowExpandEl=$xeTable.$refs.refRowExpandElem;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(rowExpandEl&&bodyScrollElem){rowExpandEl.scrollTop=bodyScrollElem.scrollTop;}}function handleColumnVisible(visible){return function(fieldOrColumn){const $xeTable=this;let status=false;const cols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrColumn)?fieldOrColumn:[fieldOrColumn];cols.forEach(item=>{const column=handleFieldOrColumn($xeTable,item);if(column){if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column],item=>{item.visible=visible;item.renderVisible=visible;});}else{column.visible=visible;column.renderVisible=visible;}if(!status){status=true;}}});if(status){return $xeTable.handleCustom();}return $xeTable.$nextTick();};}const tableMethods={callSlot(slotFunc,params,h,vNodes){const $xeTable=this;// const slots = $xeTable.$scopedSlots
|
|
6121
6121
|
const $xeGrid=$xeTable.$xeGrid;const $xeGantt=$xeTable.$xeGantt;const $xeGGWrapper=$xeGrid||$xeGantt;if(slotFunc){if($xeGGWrapper){return $xeGGWrapper.callSlot(slotFunc,params,h);}// if (XEUtils.isString(slotFunc)) {
|
|
6122
6122
|
// slotFunc = slots[slotFunc] || null
|
|
6123
6123
|
// }
|
|
@@ -6401,7 +6401,7 @@ const{parent:parentRow}=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_uti
|
|
|
6401
6401
|
// 如果是按下非功能键之外允许直接编辑
|
|
6402
6402
|
if(selected.column&&selected.row&&isEnableConf(selected.column.editRender)){const beforeEditMethod=editOpts.beforeEditMethod||editOpts.activeMethod;const params={row:selected.row,rowIndex:$xeTable.getRowIndex(selected.row),column:selected.column,columnIndex:$xeTable.getColumnIndex(selected.column),$table:$xeTable,$grid:$xeGrid,$gantt:$xeGantt};if(!beforeEditMethod||beforeEditMethod(params)){if(editMethod){editMethod(params);}else{setCellValue(selected.row,selected.column,null);$xeTable.handleEdit(selected.args,evnt);}}}}$xeTable.dispatchEvent('keydown',{},evnt);});}},handleGlobalPasteEvent(evnt){const $xeTable=this;const{isActivated,keyboardConfig,keyboardOpts,mouseConfig,mouseOpts,editStore,filterStore}=this;const{actived}=editStore;if(isActivated&&!filterStore.visible){if(!(actived.row||actived.column)){if(keyboardConfig&&keyboardOpts.isClip&&mouseConfig&&mouseOpts.area&&this.handlePasteCellAreaEvent){this.handlePasteCellAreaEvent(evnt);}}$xeTable.dispatchEvent('paste',{},evnt);}},handleGlobalCopyEvent(evnt){const $xeTable=this;const{isActivated,keyboardConfig,keyboardOpts,mouseConfig,mouseOpts,editStore,filterStore}=this;const{actived}=editStore;if(isActivated&&!filterStore.visible){if(!(actived.row||actived.column)){if(keyboardConfig&&keyboardOpts.isClip&&mouseConfig&&mouseOpts.area&&this.handleCopyCellAreaEvent){this.handleCopyCellAreaEvent(evnt);}}$xeTable.dispatchEvent('copy',{},evnt);}},handleGlobalCutEvent(evnt){const $xeTable=this;const{isActivated,keyboardConfig,keyboardOpts,mouseConfig,mouseOpts,editStore,filterStore}=this;const{actived}=editStore;if(isActivated&&!filterStore.visible){if(!(actived.row||actived.column)){if(keyboardConfig&&keyboardOpts.isClip&&mouseConfig&&mouseOpts.area&&this.handleCutCellAreaEvent){this.handleCutCellAreaEvent(evnt);}}$xeTable.dispatchEvent('cut',{},evnt);}},handleGlobalResizeEvent(){const $xeTable=this;$xeTable.closeMenu();$xeTable.updateCellAreas();handleResizeEvent($xeTable);$xeTable.updateCellAreas();},/**
|
|
6403
6403
|
* 处理合并
|
|
6404
|
-
*/handleUpdateBodyMerge(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{mergeBodyList}=internalData;internalData.mergeBodyCellMaps=buildMergeData(mergeBodyList);reactData.mergeBodyFlag++;},handleUpdateHeaderMerge(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{mergeHeaderList}=internalData;internalData.mergeHeaderCellMaps=buildMergeData(mergeHeaderList);reactData.mergeHeadFlag++;},handleUpdateFooterMerge(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{mergeFooterList}=internalData;internalData.mergeFooterCellMaps=buildMergeData(mergeFooterList);reactData.mergeFootFlag++;},handleAggregateSummaryData(){const $xeTable=this;return
|
|
6404
|
+
*/handleUpdateBodyMerge(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{mergeBodyList}=internalData;internalData.mergeBodyCellMaps=buildMergeData(mergeBodyList);reactData.mergeBodyFlag++;},handleUpdateHeaderMerge(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{mergeHeaderList}=internalData;internalData.mergeHeaderCellMaps=buildMergeData(mergeHeaderList);reactData.mergeHeadFlag++;},handleUpdateFooterMerge(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{mergeFooterList}=internalData;internalData.mergeFooterCellMaps=buildMergeData(mergeFooterList);reactData.mergeFootFlag++;},handleAggregateSummaryData(){const $xeTable=this;return $xeTable.refreshAggregateCalcValues();},handleTargetLeaveEvent(){const $xeTable=this;const internalData=$xeTable;const tooltipOpts=$xeTable.computeTooltipOpts;let $tooltip=$xeTable.$refs.refTooltip;if($tooltip&&$tooltip.setActived){$tooltip.setActived(false);}if(tooltipOpts.enterable){internalData.tooltipTimeout=setTimeout(()=>{$tooltip=$xeTable.$refs.refTooltip;if($tooltip&&$tooltip.isActived&&!$tooltip.isActived()){$xeTable.closeTooltip();}},tooltipOpts.leaveDelay);}else{$xeTable.closeTooltip();}},triggerHeaderTitleEvent(evnt,iconParams,params){const $xeTable=this;const reactData=$xeTable;const tipContent=iconParams.content||iconParams.message;if(tipContent){const{tooltipStore}=reactData;const{column}=params;const content=getFuncText(tipContent);handleTargetEnterEvent($xeTable,true);tooltipStore.row=null;tooltipStore.column=column;tooltipStore.visible=true;tooltipStore.currOpts=iconParams;$xeTable.$nextTick(()=>{const $tooltip=$xeTable.$refs.refTooltip;if($tooltip&&$tooltip.open){$tooltip.open(evnt.currentTarget,content);}});}},/**
|
|
6405
6405
|
* 触发表头 tooltip 事件
|
|
6406
6406
|
*/triggerHeaderTooltipEvent(evnt,params){const $xeTable=this;const reactData=$xeTable;const{tooltipStore}=reactData;const headerTooltipOpts=$xeTable.computeHeaderTooltipOpts;const{column}=params;handleTargetEnterEvent($xeTable,true);const titleElem=evnt.currentTarget;if(!titleElem){return;}const cWrapperEl=titleElem.parentElement;if(!cWrapperEl){return;}const cellEl=cWrapperEl.parentElement;if(!cellEl){return;}const thEl=cellEl.parentElement;if(!thEl){return;}if(tooltipStore.column!==column||!tooltipStore.visible){const ctEl=thEl.querySelector('.vxe-cell--title');handleTooltip($xeTable,evnt,headerTooltipOpts,'header',thEl,(hasClass(thEl,'col--ellipsis')?ctEl:cWrapperEl)||cWrapperEl,ctEl||cellEl,params);}},/**
|
|
6407
6407
|
* 触发单元格 tooltip 事件
|
|
@@ -6604,7 +6604,7 @@ rowExpandedMaps={};internalData.rowExpandedMaps=rowExpandedMaps;rows=rows.slice(
|
|
|
6604
6604
|
*/isRowExpandByRow(row){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{rowExpandedFlag}=reactData;const{rowExpandedMaps}=internalData;const rowid=getRowid(this,row);return!!rowExpandedFlag&&!!rowExpandedMaps[rowid];},isExpandByRow(row){warnLog('vxe.error.delFunc',['isExpandByRow','isRowExpandByRow']);// 即将废弃
|
|
6605
6605
|
return this.isRowExpandByRow(row);},/**
|
|
6606
6606
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
6607
|
-
*/clearRowExpand(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{tableFullData,scrollYStore}=internalData;const expandOpts=$xeTable.computeExpandOpts;const{reserve}=expandOpts;const expList=$xeTable.getRowExpandRecords();internalData.rowExpandedMaps={};if(reserve){tableFullData.forEach(row=>handleRowExpandReserve($xeTable,row,false));}reactData.rowExpandedFlag++;scrollYStore.startIndex=0;scrollYStore.endIndex=1;return $xeTable.$nextTick().then(()=>{if(expList.length){return handleLazyRecalculate($xeTable,true,true,true);}}).then(()=>{updateRowOffsetTop($xeTable);updateRowExpandStyle($xeTable);handleRowExpandScroll($xeTable);return $xeTable.updateCellAreas();});},clearRowExpandReserve(){this.rowExpandedReserveRowMap={};return this.$nextTick();},getRowExpandRecords(){const $xeTable=this;const internalData=$xeTable;const rest=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(internalData.rowExpandedMaps,item=>{if(item){rest.push(item);}});return rest;},setRowGroups(fieldOrColumns){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{aggregateConfig,rowGroupConfig}=props;const aggregateOpts=$xeTable.computeAggregateOpts;const{maxGroupSize}=aggregateOpts;if(!(aggregateConfig||rowGroupConfig)){errLog('vxe.error.reqProp',['aggregate-config']);return $xeTable.$nextTick();}const confList=fieldOrColumns?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrColumns)?fieldOrColumns:[fieldOrColumns]:[];if(maxGroupSize&&confList.length>maxGroupSize){if(core_.VxeUI.modal){core_.VxeUI.modal.message({status:'error',content:methods_getI18n('vxe.table.maxGroupCol',[maxGroupSize])});}return $xeTable.$nextTick();}if(confList.length){handleUpdateRowGroup($xeTable,confList.map(fieldOrColumn=>{return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(fieldOrColumn)?fieldOrColumn:fieldOrColumn.field;}));return loadTableData($xeTable,internalData.tableSynchData,true);}return $xeTable.$nextTick();},getRowGroups(){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{aggregateConfig,rowGroupConfig}=props;const{fullColumnFieldData}=internalData;if(aggregateConfig||rowGroupConfig){const{rowGroupList}=reactData;return rowGroupList.map(({field})=>{const colRet=fullColumnFieldData[field];if(colRet){return colRet.column;}return{field};});}return[];},getRowGroupFields(){const $xeTable=this;return $xeTable.getRowGroups().map(item=>item.field);},clearRowGroups(){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{aggregateConfig,rowGroupConfig}=props;if(!(aggregateConfig||rowGroupConfig)){errLog('vxe.error.reqProp',['aggregate-config']);return $xeTable.$nextTick();}handleUpdateRowGroup($xeTable,[]);return loadTableData($xeTable,internalData.tableSynchData,true);},isRowGroupRecord(row){const $xeTable=this;warnLog('vxe.error.delFunc',['isRowGroupRecord','isAggregateRecord']);return $xeTable.isAggregateRecord(row);},isRowGroupExpandByRow(row){const $xeTable=this;warnLog('vxe.error.delFunc',['isRowGroupExpandByRow','isAggregateExpandByRow']);return $xeTable.isAggregateExpandByRow(row);},isAggregateRecord(row){const $xeTable=this;const reactData=$xeTable;const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row.isAggregate;},getAggregateContentByRow(row){const $xeTable=this;const reactData=$xeTable;const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row&&row.isAggregate?row.groupContent:'';},getAggregateRowChildren(row){const $xeTable=this;const reactData=$xeTable;const aggregateOpts=$xeTable.computeAggregateOpts;const{childrenField,mapChildrenField}=aggregateOpts;const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row&&row.isAggregate&&childrenField&&mapChildrenField?row[mapChildrenField]||[]:[];},isAggregateExpandByRow(row){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{rowGroupExpandedFlag}=reactData;const{rowGroupExpandedMaps}=internalData;return!!rowGroupExpandedFlag&&!!rowGroupExpandedMaps[getRowid($xeTable,row)];},setRowGroupExpand(rows,expanded){const $xeTable=this;if(rows){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)){rows=[rows];}return handleRowGroupVirtualExpand($xeTable,rows,expanded);}return $xeTable.$nextTick();},setRowGroupExpandByField(groupFields,expanded){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{isRowGroupStatus}=reactData;const aggregateOpts=$xeTable.computeAggregateOpts;const{childrenField}=aggregateOpts;if(groupFields){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(groupFields)){groupFields=[groupFields];}if(isRowGroupStatus){const rows=[];const gfKeys={};groupFields.forEach(groupField=>{gfKeys[groupField]=true;});external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.afterGroupFullData,row=>{if(row.isAggregate&&gfKeys[row.groupField]){rows.push(row);}},{children:childrenField});if(rows.length){return handleRowGroupVirtualExpand($xeTable,rows,expanded);}}}return $xeTable.$nextTick();},setAllRowGroupExpand(expanded){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{tableFullGroupData}=internalData;const aggregateOpts=$xeTable.computeAggregateOpts;const{mapChildrenField}=aggregateOpts;const rgExpandedMaps={};if(expanded&&mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,row=>{if(row[mapChildrenField]&&row[mapChildrenField].length){rgExpandedMaps[getRowid($xeTable,row)]=row;}},{children:mapChildrenField});}internalData.rowGroupExpandedMaps=rgExpandedMaps;handleVirtualTreeToList($xeTable);$xeTable.handleTableData();updateAfterDataIndex($xeTable);reactData.rowGroupExpandedFlag++;return handleLazyRecalculate($xeTable,true,true,true);},clearRowGroupExpand(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;internalData.rowGroupExpandedMaps={};handleVirtualTreeToList($xeTable);$xeTable.handleTableData();updateAfterDataIndex($xeTable);reactData.rowGroupExpandedFlag++;return handleLazyRecalculate($xeTable,true,true,true);},getTreeExpandRecords(){const $xeTable=this;const internalData=$xeTable;const rest=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(internalData.treeExpandedMaps,item=>{if(item){rest.push(item);}});return rest;},/**
|
|
6607
|
+
*/clearRowExpand(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{tableFullData,scrollYStore}=internalData;const expandOpts=$xeTable.computeExpandOpts;const{reserve}=expandOpts;const expList=$xeTable.getRowExpandRecords();internalData.rowExpandedMaps={};if(reserve){tableFullData.forEach(row=>handleRowExpandReserve($xeTable,row,false));}reactData.rowExpandedFlag++;scrollYStore.startIndex=0;scrollYStore.endIndex=1;return $xeTable.$nextTick().then(()=>{if(expList.length){return handleLazyRecalculate($xeTable,true,true,true);}}).then(()=>{updateRowOffsetTop($xeTable);updateRowExpandStyle($xeTable);handleRowExpandScroll($xeTable);return $xeTable.updateCellAreas();});},clearRowExpandReserve(){this.rowExpandedReserveRowMap={};return this.$nextTick();},getRowExpandRecords(){const $xeTable=this;const internalData=$xeTable;const rest=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(internalData.rowExpandedMaps,item=>{if(item){rest.push(item);}});return rest;},setRowGroups(fieldOrColumns){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{aggregateConfig,rowGroupConfig}=props;const aggregateOpts=$xeTable.computeAggregateOpts;const{maxGroupSize}=aggregateOpts;if(!(aggregateConfig||rowGroupConfig)){errLog('vxe.error.reqProp',['aggregate-config']);return $xeTable.$nextTick();}const confList=fieldOrColumns?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrColumns)?fieldOrColumns:[fieldOrColumns]:[];if(maxGroupSize&&confList.length>maxGroupSize){if(core_.VxeUI.modal){core_.VxeUI.modal.message({status:'error',content:methods_getI18n('vxe.table.maxGroupCol',[maxGroupSize])});}return $xeTable.$nextTick();}if(confList.length){handleUpdateRowGroup($xeTable,confList.map(fieldOrColumn=>{return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(fieldOrColumn)?fieldOrColumn:fieldOrColumn.field;}));return loadTableData($xeTable,internalData.tableSynchData,true);}return $xeTable.$nextTick();},getRowGroups(){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{aggregateConfig,rowGroupConfig}=props;const{fullColumnFieldData}=internalData;if(aggregateConfig||rowGroupConfig){const{rowGroupList}=reactData;return rowGroupList.map(({field})=>{const colRet=fullColumnFieldData[field];if(colRet){return colRet.column;}return{field};});}return[];},getRowGroupFields(){const $xeTable=this;return $xeTable.getRowGroups().map(item=>item.field);},clearRowGroups(){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{aggregateConfig,rowGroupConfig}=props;if(!(aggregateConfig||rowGroupConfig)){errLog('vxe.error.reqProp',['aggregate-config']);return $xeTable.$nextTick();}handleUpdateRowGroup($xeTable,[]);return loadTableData($xeTable,internalData.tableSynchData,true);},isRowGroupRecord(row){const $xeTable=this;warnLog('vxe.error.delFunc',['isRowGroupRecord','isAggregateRecord']);return $xeTable.isAggregateRecord(row);},isRowGroupExpandByRow(row){const $xeTable=this;warnLog('vxe.error.delFunc',['isRowGroupExpandByRow','isAggregateExpandByRow']);return $xeTable.isAggregateExpandByRow(row);},isAggregateRecord(row){const $xeTable=this;const reactData=$xeTable;const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row.isAggregate;},getAggregateContentByRow(row){const $xeTable=this;const reactData=$xeTable;const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row&&row.isAggregate?row.groupContent:'';},getAggregateRowChildren(row){const $xeTable=this;const reactData=$xeTable;const aggregateOpts=$xeTable.computeAggregateOpts;const{childrenField,mapChildrenField}=aggregateOpts;const{isRowGroupStatus}=reactData;return isRowGroupStatus&&row&&row.isAggregate&&childrenField&&mapChildrenField?row[mapChildrenField]||[]:[];},refreshAggregateCalcValues(){const $xeTable=this;updateGroupData($xeTable);return $xeTable.$nextTick();},isAggregateExpandByRow(row){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{rowGroupExpandedFlag}=reactData;const{rowGroupExpandedMaps}=internalData;return!!rowGroupExpandedFlag&&!!rowGroupExpandedMaps[getRowid($xeTable,row)];},setRowGroupExpand(rows,expanded){const $xeTable=this;if(rows){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)){rows=[rows];}return handleRowGroupVirtualExpand($xeTable,rows,expanded);}return $xeTable.$nextTick();},setRowGroupExpandByField(groupFields,expanded){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{isRowGroupStatus}=reactData;const aggregateOpts=$xeTable.computeAggregateOpts;const{childrenField}=aggregateOpts;if(groupFields){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(groupFields)){groupFields=[groupFields];}if(isRowGroupStatus){const rows=[];const gfKeys={};groupFields.forEach(groupField=>{gfKeys[groupField]=true;});external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.afterGroupFullData,row=>{if(row.isAggregate&&gfKeys[row.groupField]){rows.push(row);}},{children:childrenField});if(rows.length){return handleRowGroupVirtualExpand($xeTable,rows,expanded);}}}return $xeTable.$nextTick();},setAllRowGroupExpand(expanded){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{tableFullGroupData}=internalData;const aggregateOpts=$xeTable.computeAggregateOpts;const{mapChildrenField}=aggregateOpts;const rgExpandedMaps={};if(expanded&&mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,row=>{if(row[mapChildrenField]&&row[mapChildrenField].length){rgExpandedMaps[getRowid($xeTable,row)]=row;}},{children:mapChildrenField});}internalData.rowGroupExpandedMaps=rgExpandedMaps;handleVirtualTreeToList($xeTable);$xeTable.handleTableData();updateAfterDataIndex($xeTable);reactData.rowGroupExpandedFlag++;return handleLazyRecalculate($xeTable,true,true,true);},clearRowGroupExpand(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;internalData.rowGroupExpandedMaps={};handleVirtualTreeToList($xeTable);$xeTable.handleTableData();updateAfterDataIndex($xeTable);reactData.rowGroupExpandedFlag++;return handleLazyRecalculate($xeTable,true,true,true);},getTreeExpandRecords(){const $xeTable=this;const internalData=$xeTable;const rest=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(internalData.treeExpandedMaps,item=>{if(item){rest.push(item);}});return rest;},/**
|
|
6608
6608
|
* 内部方法、获取树表格状态
|
|
6609
6609
|
* @deprecated
|
|
6610
6610
|
* @private
|
|
@@ -6716,8 +6716,8 @@ emitEvent(type,params,evnt){const $xeTable=this;$xeTable.dispatchEvent(type,para
|
|
|
6716
6716
|
* @deprecated
|
|
6717
6717
|
*/getCell(row,column){return this.getCellElement(row,column);},findRowIndexOf(list,row){return row?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(list,item=>this.eqRow(item,row)):-1;},eqRow(row1,row2){if(row1&&row2){if(row1===row2){return true;}return getRowid(this,row1)===getRowid(this,row2);}return false;},/*************************
|
|
6718
6718
|
* Publish methods
|
|
6719
|
-
*************************/getSetupOptions(){return methods_getConfig();}};// Module methods
|
|
6720
|
-
const funcs='setFilter,openFilter,clearFilter,saveFilter,saveFilterByEvent,resetFilter,resetFilterByEvent,saveFilterPanel,saveFilterPanelByEvent,resetFilterPanel,resetFilterPanelByEvent,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getEditCell,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,getCustomVisible,openCustom,closeCustom,toggleCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');funcs.forEach(name=>{
|
|
6719
|
+
*************************/getSetupOptions(){return methods_getConfig();}};const tablePrivateMethods={};const exportMethods=Object.assign({},tableMethods,tablePrivateMethods);// Module methods
|
|
6720
|
+
const funcs='setFilter,openFilter,clearFilter,saveFilter,saveFilterByEvent,resetFilter,resetFilterByEvent,saveFilterPanel,saveFilterPanelByEvent,resetFilterPanel,resetFilterPanelByEvent,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getEditCell,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,getCustomVisible,openCustom,closeCustom,toggleCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');funcs.forEach(name=>{exportMethods[name]=function(...args){// if (!this[`_${name}`]) {
|
|
6721
6721
|
// if ('openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').includes(name)) {
|
|
6722
6722
|
// errLog('vxe.error.reqModule', ['Export'])
|
|
6723
6723
|
// } else if ('fullValidate,validate'.split(',').includes(name)) {
|
|
@@ -6730,7 +6730,7 @@ const funcs='setFilter,openFilter,clearFilter,saveFilter,saveFilterByEvent,reset
|
|
|
6730
6730
|
// errLog('vxe.error.reqModule', ['Custom'])
|
|
6731
6731
|
// }
|
|
6732
6732
|
// }
|
|
6733
|
-
return this[`_${name}`]?this[`_${name}`](...args):null;};});/* harmony default export */ var methods = (
|
|
6733
|
+
return this[`_${name}`]?this[`_${name}`](...args):null;};});/* harmony default export */ var methods = (exportMethods);
|
|
6734
6734
|
;// CONCATENATED MODULE: ./packages/table/src/body.ts
|
|
6735
6735
|
|
|
6736
6736
|
|
|
@@ -20245,64 +20245,83 @@ function toolbar_createInternalData() {
|
|
|
20245
20245
|
connectTable
|
|
20246
20246
|
} = internalData;
|
|
20247
20247
|
const $table = connectTable;
|
|
20248
|
+
const buttonsSlot = slots.buttons;
|
|
20248
20249
|
const buttonPrefixSlot = slots.buttonPrefix || slots['button-prefix'];
|
|
20249
20250
|
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix'];
|
|
20250
|
-
const
|
|
20251
|
+
const lbVNs = [];
|
|
20251
20252
|
if (buttonPrefixSlot) {
|
|
20252
|
-
|
|
20253
|
+
lbVNs.push(h('span', {
|
|
20254
|
+
key: 'tbp',
|
|
20255
|
+
class: 'vxe-button--prefix-wrapper'
|
|
20256
|
+
}, getSlotVNs(buttonPrefixSlot.call($xeToolbar, {
|
|
20253
20257
|
buttons: buttons || [],
|
|
20254
20258
|
$grid: $xeGrid,
|
|
20255
20259
|
$gantt: $xeGantt,
|
|
20256
20260
|
$table: $table
|
|
20257
|
-
})));
|
|
20261
|
+
}))));
|
|
20258
20262
|
}
|
|
20259
|
-
if (buttons) {
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20266
|
-
|
|
20267
|
-
if (
|
|
20268
|
-
const
|
|
20269
|
-
|
|
20270
|
-
|
|
20271
|
-
|
|
20272
|
-
|
|
20273
|
-
|
|
20274
|
-
|
|
20275
|
-
|
|
20276
|
-
|
|
20277
|
-
|
|
20278
|
-
|
|
20279
|
-
|
|
20280
|
-
|
|
20281
|
-
|
|
20282
|
-
|
|
20283
|
-
|
|
20284
|
-
|
|
20285
|
-
|
|
20286
|
-
|
|
20287
|
-
|
|
20288
|
-
|
|
20289
|
-
|
|
20290
|
-
|
|
20291
|
-
|
|
20263
|
+
if (buttons || buttonsSlot) {
|
|
20264
|
+
const btnVNs = [];
|
|
20265
|
+
if (buttons) {
|
|
20266
|
+
buttons.forEach(item => {
|
|
20267
|
+
const {
|
|
20268
|
+
dropdowns,
|
|
20269
|
+
buttonRender
|
|
20270
|
+
} = item;
|
|
20271
|
+
if (item.visible !== false) {
|
|
20272
|
+
const compConf = buttonRender ? toolbar_renderer.get(buttonRender.name) : null;
|
|
20273
|
+
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
20274
|
+
const toolbarButtonClassName = compConf.toolbarButtonClassName;
|
|
20275
|
+
const params = {
|
|
20276
|
+
$grid: $xeGrid,
|
|
20277
|
+
$gantt: $xeGantt,
|
|
20278
|
+
$table: $table,
|
|
20279
|
+
button: item
|
|
20280
|
+
};
|
|
20281
|
+
btnVNs.push(h('span', {
|
|
20282
|
+
class: ['vxe-button--item', toolbarButtonClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(toolbarButtonClassName) ? toolbarButtonClassName(params) : toolbarButtonClassName : '']
|
|
20283
|
+
}, getSlotVNs(compConf.renderToolbarButton(h, buttonRender, params))));
|
|
20284
|
+
} else {
|
|
20285
|
+
if (VxeUIButtonComponent) {
|
|
20286
|
+
btnVNs.push(h(VxeUIButtonComponent, {
|
|
20287
|
+
props: Object.assign({}, item, {
|
|
20288
|
+
content: item.content || item.name,
|
|
20289
|
+
options: undefined
|
|
20290
|
+
}),
|
|
20291
|
+
on: {
|
|
20292
|
+
click: eventParams => $xeToolbar.btnEvent(eventParams, item)
|
|
20293
|
+
},
|
|
20294
|
+
scopedSlots: dropdowns && dropdowns.length ? {
|
|
20295
|
+
dropdowns: () => $xeToolbar.renderDropdowns(h, item, true)
|
|
20296
|
+
} : {}
|
|
20297
|
+
}));
|
|
20298
|
+
}
|
|
20292
20299
|
}
|
|
20293
20300
|
}
|
|
20294
|
-
}
|
|
20295
|
-
}
|
|
20301
|
+
});
|
|
20302
|
+
}
|
|
20303
|
+
lbVNs.push(h('span', {
|
|
20304
|
+
key: 'tti',
|
|
20305
|
+
class: 'vxe-button--item-wrapper'
|
|
20306
|
+
}, buttonsSlot ? getSlotVNs(buttonsSlot.call($xeToolbar, {
|
|
20307
|
+
buttons: buttons || [],
|
|
20308
|
+
$grid: $xeGrid,
|
|
20309
|
+
$gantt: $xeGantt,
|
|
20310
|
+
$table: $table
|
|
20311
|
+
})) : btnVNs));
|
|
20296
20312
|
}
|
|
20297
20313
|
if (buttonSuffixSlot) {
|
|
20298
|
-
|
|
20314
|
+
lbVNs.push(h('span', {
|
|
20315
|
+
key: 'tbs',
|
|
20316
|
+
class: 'vxe-button--suffix-wrapper'
|
|
20317
|
+
}, getSlotVNs(buttonSuffixSlot.call($xeToolbar, {
|
|
20299
20318
|
buttons: buttons || [],
|
|
20300
20319
|
$grid: $xeGrid,
|
|
20301
20320
|
$gantt: $xeGantt,
|
|
20302
20321
|
$table: $table
|
|
20303
|
-
})));
|
|
20322
|
+
}))));
|
|
20304
20323
|
}
|
|
20305
|
-
return
|
|
20324
|
+
return lbVNs;
|
|
20306
20325
|
},
|
|
20307
20326
|
/**
|
|
20308
20327
|
* 渲染右侧工具
|
|
@@ -20323,67 +20342,86 @@ function toolbar_createInternalData() {
|
|
|
20323
20342
|
connectTable
|
|
20324
20343
|
} = internalData;
|
|
20325
20344
|
const $table = connectTable;
|
|
20345
|
+
const toolsSlot = slots.tools;
|
|
20326
20346
|
const toolPrefixSlot = slots.toolPrefix || slots['tool-prefix'];
|
|
20327
20347
|
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix'];
|
|
20328
|
-
const
|
|
20348
|
+
const rtVNs = [];
|
|
20329
20349
|
if (toolPrefixSlot) {
|
|
20330
|
-
|
|
20350
|
+
rtVNs.push(h('span', {
|
|
20351
|
+
key: 'ttp',
|
|
20352
|
+
class: 'vxe-tool--prefix-wrapper'
|
|
20353
|
+
}, getSlotVNs(toolPrefixSlot.call($xeToolbar, {
|
|
20331
20354
|
tools: tools || [],
|
|
20332
20355
|
$grid: $xeGrid,
|
|
20333
20356
|
$gantt: $xeGantt,
|
|
20334
20357
|
$table: $table
|
|
20335
|
-
})));
|
|
20358
|
+
}))));
|
|
20336
20359
|
}
|
|
20337
|
-
if (tools) {
|
|
20338
|
-
|
|
20339
|
-
|
|
20340
|
-
|
|
20341
|
-
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
|
|
20345
|
-
|
|
20346
|
-
|
|
20347
|
-
const
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20359
|
-
|
|
20360
|
-
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20360
|
+
if (tools || toolsSlot) {
|
|
20361
|
+
const btnVNs = [];
|
|
20362
|
+
if (tools) {
|
|
20363
|
+
tools.forEach((item, tIndex) => {
|
|
20364
|
+
const {
|
|
20365
|
+
dropdowns,
|
|
20366
|
+
toolRender
|
|
20367
|
+
} = item;
|
|
20368
|
+
if (item.visible !== false) {
|
|
20369
|
+
const rdName = toolRender ? toolRender.name : null;
|
|
20370
|
+
const compConf = toolRender ? toolbar_renderer.get(rdName) : null;
|
|
20371
|
+
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
20372
|
+
const toolbarToolClassName = compConf.toolbarToolClassName;
|
|
20373
|
+
const params = {
|
|
20374
|
+
$grid: $xeGrid,
|
|
20375
|
+
$gantt: $xeGantt,
|
|
20376
|
+
$table: $table,
|
|
20377
|
+
tool: item
|
|
20378
|
+
};
|
|
20379
|
+
btnVNs.push(h('span', {
|
|
20380
|
+
key: rdName,
|
|
20381
|
+
class: ['vxe-tool--item', toolbarToolClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName : '']
|
|
20382
|
+
}, getSlotVNs(compConf.renderToolbarTool(h, toolRender, params))));
|
|
20383
|
+
} else {
|
|
20384
|
+
if (VxeUIButtonComponent) {
|
|
20385
|
+
btnVNs.push(h(VxeUIButtonComponent, {
|
|
20386
|
+
key: tIndex,
|
|
20387
|
+
props: Object.assign({}, item, {
|
|
20388
|
+
content: item.content || item.name,
|
|
20389
|
+
options: undefined
|
|
20390
|
+
}),
|
|
20391
|
+
on: {
|
|
20392
|
+
click: eventParams => $xeToolbar.tolEvent(eventParams, item)
|
|
20393
|
+
},
|
|
20394
|
+
scopedSlots: dropdowns && dropdowns.length ? {
|
|
20395
|
+
dropdowns: () => $xeToolbar.renderDropdowns(h, item, false)
|
|
20396
|
+
} : {}
|
|
20397
|
+
}));
|
|
20398
|
+
}
|
|
20373
20399
|
}
|
|
20374
20400
|
}
|
|
20375
|
-
}
|
|
20376
|
-
}
|
|
20401
|
+
});
|
|
20402
|
+
}
|
|
20403
|
+
rtVNs.push(h('span', {
|
|
20404
|
+
key: 'tti',
|
|
20405
|
+
class: 'vxe-tool--item-wrapper'
|
|
20406
|
+
}, toolsSlot ? getSlotVNs(toolsSlot.call($xeToolbar, {
|
|
20407
|
+
tools: tools || [],
|
|
20408
|
+
$grid: $xeGrid,
|
|
20409
|
+
$gantt: $xeGantt,
|
|
20410
|
+
$table: $table
|
|
20411
|
+
})) : btnVNs));
|
|
20377
20412
|
}
|
|
20378
20413
|
if (toolSuffixSlot) {
|
|
20379
|
-
|
|
20414
|
+
rtVNs.push(h('span', {
|
|
20415
|
+
key: 'tts',
|
|
20416
|
+
class: 'vxe-tool--suffix-wrapper'
|
|
20417
|
+
}, getSlotVNs(toolSuffixSlot.call($xeToolbar, {
|
|
20380
20418
|
tools: tools || [],
|
|
20381
20419
|
$grid: $xeGrid,
|
|
20382
20420
|
$gantt: $xeGantt,
|
|
20383
20421
|
$table: $table
|
|
20384
|
-
})));
|
|
20422
|
+
}))));
|
|
20385
20423
|
}
|
|
20386
|
-
return
|
|
20424
|
+
return rtVNs;
|
|
20387
20425
|
},
|
|
20388
20426
|
renderToolImport(h) {
|
|
20389
20427
|
// 使用已安装的组件,如果未安装则不渲染
|
|
@@ -20505,8 +20543,6 @@ function toolbar_createInternalData() {
|
|
|
20505
20543
|
renderVN(h) {
|
|
20506
20544
|
const $xeToolbar = this;
|
|
20507
20545
|
const props = $xeToolbar;
|
|
20508
|
-
const slots = $xeToolbar.$scopedSlots;
|
|
20509
|
-
const internalData = $xeToolbar.internalData;
|
|
20510
20546
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
20511
20547
|
const $xeGantt = $xeToolbar.$xeGantt;
|
|
20512
20548
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
@@ -20518,12 +20554,6 @@ function toolbar_createInternalData() {
|
|
|
20518
20554
|
custom,
|
|
20519
20555
|
className
|
|
20520
20556
|
} = props;
|
|
20521
|
-
const {
|
|
20522
|
-
connectTable
|
|
20523
|
-
} = internalData;
|
|
20524
|
-
const $table = connectTable;
|
|
20525
|
-
const toolsSlot = slots.tools;
|
|
20526
|
-
const buttonsSlot = slots.buttons;
|
|
20527
20557
|
const vSize = $xeToolbar.computeSize;
|
|
20528
20558
|
return h('div', {
|
|
20529
20559
|
ref: 'refElem',
|
|
@@ -20536,17 +20566,9 @@ function toolbar_createInternalData() {
|
|
|
20536
20566
|
}]
|
|
20537
20567
|
}, [h('div', {
|
|
20538
20568
|
class: 'vxe-buttons--wrapper'
|
|
20539
|
-
},
|
|
20540
|
-
$grid: $xeGrid,
|
|
20541
|
-
$gantt: $xeGantt,
|
|
20542
|
-
$table: $table
|
|
20543
|
-
}) : $xeToolbar.renderLeftBtns(h)), h('div', {
|
|
20569
|
+
}, $xeToolbar.renderLeftBtns(h)), h('div', {
|
|
20544
20570
|
class: 'vxe-tools--wrapper'
|
|
20545
|
-
},
|
|
20546
|
-
$grid: $xeGrid,
|
|
20547
|
-
$gantt: $xeGantt,
|
|
20548
|
-
$table: $table
|
|
20549
|
-
}) : $xeToolbar.renderRightTools(h)), h('div', {
|
|
20571
|
+
}, $xeToolbar.renderRightTools(h)), h('div', {
|
|
20550
20572
|
class: 'vxe-tools--operate'
|
|
20551
20573
|
}, [props.import ? $xeToolbar.renderToolImport(h) : toolbar_renderEmptyElement($xeToolbar), props.export ? $xeToolbar.renderToolExport(h) : toolbar_renderEmptyElement($xeToolbar), props.print ? $xeToolbar.renderToolPrint(h) : toolbar_renderEmptyElement($xeToolbar), refresh ? $xeToolbar.renderToolRefresh(h) : toolbar_renderEmptyElement($xeToolbar), zoom && $xeGGWrapper ? $xeToolbar.renderToolZoom(h) : toolbar_renderEmptyElement($xeToolbar), custom ? $xeToolbar.renderToolCustom(h) : toolbar_renderEmptyElement($xeToolbar)])]);
|
|
20552
20574
|
}
|