vxe-table 3.19.25 → 3.19.27
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 +6 -2
- package/es/table/src/table.js +3 -3
- package/es/toolbar/src/toolbar.js +85 -103
- package/es/toolbar/style.css +10 -1
- 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 +10 -1
- 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 +126 -152
- 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 +6 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +3 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +121 -147
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +10 -1
- 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 +10 -1
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/src/methods.ts +6 -2
- package/packages/table/src/table.ts +3 -3
- package/packages/toolbar/src/toolbar.ts +91 -121
- package/styles/components/toolbar.scss +10 -1
- /package/es/{iconfont.1764811551687.ttf → iconfont.1765156950513.ttf} +0 -0
- /package/es/{iconfont.1764811551687.woff → iconfont.1765156950513.woff} +0 -0
- /package/es/{iconfont.1764811551687.woff2 → iconfont.1765156950513.woff2} +0 -0
- /package/lib/{iconfont.1764811551687.ttf → iconfont.1765156950513.ttf} +0 -0
- /package/lib/{iconfont.1764811551687.woff → iconfont.1765156950513.woff} +0 -0
- /package/lib/{iconfont.1764811551687.woff2 → iconfont.1765156950513.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.27";
|
|
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.27"}`;
|
|
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
|
|
@@ -6111,8 +6111,8 @@ if(reactData.scrollYLoad&&!(internalData.customHeight||internalData.customMinHei
|
|
|
6111
6111
|
* 计算自适应列宽
|
|
6112
6112
|
*/function calcColumnAutoWidth($xeTable,column,wrapperEl){const columnOpts=$xeTable.computeColumnOpts;const{autoOptions}=columnOpts;const{isCalcHeader,isCalcBody,isCalcFooter}=autoOptions||{};const querySelections=[];if(isCalcHeader){querySelections.push(`.vxe-header-cell--wrapper[colid="${column.id}"]`);}if(isCalcBody){querySelections.push(`.vxe-body-cell--wrapper[colid="${column.id}"]`);}if(isCalcFooter){querySelections.push(`.vxe-footer-cell--wrapper[colid="${column.id}"]`);}const cellElemList=querySelections.length?wrapperEl.querySelectorAll(querySelections.join(',')):[];let leftRightPadding=0;const firstCellEl=cellElemList[0];if(firstCellEl&&firstCellEl.parentElement){const cellStyle=getComputedStyle(firstCellEl.parentElement);leftRightPadding=Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingLeft)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingRight));}let colWidth=column.renderAutoWidth-leftRightPadding;for(let i=0;i<cellElemList.length;i++){const celEl=cellElemList[i];colWidth=Math.max(colWidth,celEl?Math.ceil(celEl.scrollWidth)+4:0);}return colWidth+leftRightPadding;}/**
|
|
6113
6113
|
* 自适应列宽
|
|
6114
|
-
*/function calcCellWidth($xeTable){const internalData=$xeTable;const autoWidthColumnList=$xeTable.computeAutoWidthColumnList;const{fullColumnIdData}=internalData;const el=$xeTable.$refs.refElem;if(el){el.setAttribute('data-calc-col','Y');autoWidthColumnList.forEach(column=>{const colid=column.id;const colRest=fullColumnIdData[colid];const colWidth=calcColumnAutoWidth($xeTable,column,el);if(colRest){colRest.width=Math.max(colWidth,colRest.width);}column.renderAutoWidth=colWidth;});$xeTable.analyColumnWidth();el.removeAttribute('data-calc-col');}}function handleUpdateColResize($xeTable,evnt,params){$xeTable.analyColumnWidth();$xeTable.recalculate().then(()=>{$xeTable.saveCustomStore('update:width');$xeTable.updateCellAreas();$xeTable.dispatchEvent('column-resizable-change',params,evnt);// 已废弃 resizable-change
|
|
6115
|
-
$xeTable.dispatchEvent('resizable-change',params,evnt);setTimeout(()=>$xeTable.recalculate(true),300);});}function handleUpdateRowResize($xeTable,evnt,params){const reactData=$xeTable;reactData.resizeHeightFlag++;$xeTable.recalculate().then(()=>{$xeTable.updateCellAreas();$xeTable.dispatchEvent('row-resizable-change',params,evnt);setTimeout(()=>$xeTable.recalculate(true),300);});}function updateColumnOffsetLeft($xeTable){const internalData=$xeTable;const{visibleColumn,fullColumnIdData}=internalData;let offsetLeft=0;for(let cIndex=0,rLen=visibleColumn.length;cIndex<rLen;cIndex++){const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid];if(colRest){colRest.oLeft=offsetLeft;}offsetLeft+=column.renderWidth;}}function updateRowOffsetTop($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{expandColumn}=reactData;const{afterFullData,fullAllDataRowIdData,rowExpandedMaps}=internalData;const expandOpts=$xeTable.computeExpandOpts;const rowOpts=$xeTable.computeRowOpts;const cellOpts=$xeTable.computeCellOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const{handleGetRowId}=createHandleGetRowId($xeTable);let offsetTop=0;for(let rIndex=0,rLen=afterFullData.length;rIndex<rLen;rIndex++){const row=afterFullData[rIndex];const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid]||{};rowRest.oTop=offsetTop;offsetTop+=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;// 是否展开行
|
|
6114
|
+
*/function calcCellWidth($xeTable){const internalData=$xeTable;const autoWidthColumnList=$xeTable.computeAutoWidthColumnList;const{fullColumnIdData}=internalData;const el=$xeTable.$refs.refElem;if(el){el.setAttribute('data-calc-col','Y');autoWidthColumnList.forEach(column=>{const colid=column.id;const colRest=fullColumnIdData[colid];const colWidth=calcColumnAutoWidth($xeTable,column,el);if(colRest){colRest.width=Math.max(colWidth,colRest.width);}column.renderAutoWidth=colWidth;});$xeTable.analyColumnWidth();el.removeAttribute('data-calc-col');}}function handleUpdateColResize($xeTable,evnt,params){$xeTable.analyColumnWidth();$xeTable.recalculate().then(()=>{$xeTable.saveCustomStore('update:width');$xeTable.refreshScroll().then(()=>{$xeTable.updateCellAreas();});$xeTable.dispatchEvent('column-resizable-change',params,evnt);// 已废弃 resizable-change
|
|
6115
|
+
$xeTable.dispatchEvent('resizable-change',params,evnt);setTimeout(()=>$xeTable.recalculate(true),300);});}function handleUpdateRowResize($xeTable,evnt,params){const reactData=$xeTable;reactData.resizeHeightFlag++;$xeTable.recalculate().then(()=>{$xeTable.refreshScroll().then(()=>{$xeTable.updateCellAreas();});$xeTable.dispatchEvent('row-resizable-change',params,evnt);setTimeout(()=>$xeTable.recalculate(true),300);});}function updateColumnOffsetLeft($xeTable){const internalData=$xeTable;const{visibleColumn,fullColumnIdData}=internalData;let offsetLeft=0;for(let cIndex=0,rLen=visibleColumn.length;cIndex<rLen;cIndex++){const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid];if(colRest){colRest.oLeft=offsetLeft;}offsetLeft+=column.renderWidth;}}function updateRowOffsetTop($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{expandColumn}=reactData;const{afterFullData,fullAllDataRowIdData,rowExpandedMaps}=internalData;const expandOpts=$xeTable.computeExpandOpts;const rowOpts=$xeTable.computeRowOpts;const cellOpts=$xeTable.computeCellOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const{handleGetRowId}=createHandleGetRowId($xeTable);let offsetTop=0;for(let rIndex=0,rLen=afterFullData.length;rIndex<rLen;rIndex++){const row=afterFullData[rIndex];const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid]||{};rowRest.oTop=offsetTop;offsetTop+=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;// 是否展开行
|
|
6116
6116
|
if(expandColumn&&rowExpandedMaps[rowid]){offsetTop+=rowRest.expandHeight||expandOpts.height||0;}}}/**
|
|
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);});}}}}/**
|
|
@@ -18148,9 +18148,9 @@ function renderBody(h, $xeTable) {
|
|
|
18148
18148
|
const cellOpts = $xeTable.computeCellOpts;
|
|
18149
18149
|
let headCellHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getCalcHeight(headerCellOpts.height || cellOpts.height));
|
|
18150
18150
|
if ($xeGantt) {
|
|
18151
|
-
const
|
|
18152
|
-
if (
|
|
18153
|
-
const ganttMinHeadCellHeight = defaultRowHeight / 2 *
|
|
18151
|
+
const taskViewScales = $xeGantt.computeTaskViewScales;
|
|
18152
|
+
if (taskViewScales && taskViewScales.length > 2) {
|
|
18153
|
+
const ganttMinHeadCellHeight = defaultRowHeight / 2 * taskViewScales.length;
|
|
18154
18154
|
headCellHeight = Math.max(ganttMinHeadCellHeight, headCellHeight);
|
|
18155
18155
|
}
|
|
18156
18156
|
}
|
|
@@ -20248,80 +20248,67 @@ function toolbar_createInternalData() {
|
|
|
20248
20248
|
const buttonsSlot = slots.buttons;
|
|
20249
20249
|
const buttonPrefixSlot = slots.buttonPrefix || slots['button-prefix'];
|
|
20250
20250
|
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix'];
|
|
20251
|
-
const
|
|
20252
|
-
if (
|
|
20253
|
-
|
|
20254
|
-
|
|
20255
|
-
|
|
20256
|
-
|
|
20257
|
-
|
|
20258
|
-
|
|
20259
|
-
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20266
|
-
|
|
20267
|
-
|
|
20268
|
-
|
|
20269
|
-
|
|
20270
|
-
|
|
20271
|
-
|
|
20272
|
-
|
|
20273
|
-
|
|
20274
|
-
|
|
20275
|
-
|
|
20276
|
-
|
|
20277
|
-
|
|
20278
|
-
|
|
20279
|
-
|
|
20280
|
-
|
|
20281
|
-
|
|
20282
|
-
|
|
20283
|
-
|
|
20284
|
-
|
|
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
|
-
}
|
|
20251
|
+
const btnVNs = [];
|
|
20252
|
+
if (buttons) {
|
|
20253
|
+
buttons.forEach(item => {
|
|
20254
|
+
const {
|
|
20255
|
+
dropdowns,
|
|
20256
|
+
buttonRender
|
|
20257
|
+
} = item;
|
|
20258
|
+
if (item.visible !== false) {
|
|
20259
|
+
const compConf = buttonRender ? toolbar_renderer.get(buttonRender.name) : null;
|
|
20260
|
+
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
20261
|
+
const toolbarButtonClassName = compConf.toolbarButtonClassName;
|
|
20262
|
+
const params = {
|
|
20263
|
+
$grid: $xeGrid,
|
|
20264
|
+
$gantt: $xeGantt,
|
|
20265
|
+
$table: $table,
|
|
20266
|
+
button: item
|
|
20267
|
+
};
|
|
20268
|
+
btnVNs.push(h('span', {
|
|
20269
|
+
class: ['vxe-button--item', toolbarButtonClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(toolbarButtonClassName) ? toolbarButtonClassName(params) : toolbarButtonClassName : '']
|
|
20270
|
+
}, getSlotVNs(compConf.renderToolbarButton(h, buttonRender, params))));
|
|
20271
|
+
} else {
|
|
20272
|
+
if (VxeUIButtonComponent) {
|
|
20273
|
+
btnVNs.push(h(VxeUIButtonComponent, {
|
|
20274
|
+
props: Object.assign({}, item, {
|
|
20275
|
+
content: item.content || item.name,
|
|
20276
|
+
options: undefined
|
|
20277
|
+
}),
|
|
20278
|
+
on: {
|
|
20279
|
+
click: eventParams => $xeToolbar.btnEvent(eventParams, item)
|
|
20280
|
+
},
|
|
20281
|
+
scopedSlots: dropdowns && dropdowns.length ? {
|
|
20282
|
+
dropdowns: () => $xeToolbar.renderDropdowns(h, item, true)
|
|
20283
|
+
} : {}
|
|
20284
|
+
}));
|
|
20299
20285
|
}
|
|
20300
20286
|
}
|
|
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));
|
|
20312
|
-
}
|
|
20313
|
-
if (buttonSuffixSlot) {
|
|
20314
|
-
lbVNs.push(h('span', {
|
|
20315
|
-
key: 'tbs',
|
|
20316
|
-
class: 'vxe-button--suffix-wrapper'
|
|
20317
|
-
}, getSlotVNs(buttonSuffixSlot.call($xeToolbar, {
|
|
20318
|
-
buttons: buttons || [],
|
|
20319
|
-
$grid: $xeGrid,
|
|
20320
|
-
$gantt: $xeGantt,
|
|
20321
|
-
$table: $table
|
|
20322
|
-
}))));
|
|
20287
|
+
}
|
|
20288
|
+
});
|
|
20323
20289
|
}
|
|
20324
|
-
return
|
|
20290
|
+
return [h('div', {
|
|
20291
|
+
class: 'vxe-button--prefix-wrapper'
|
|
20292
|
+
}, buttonPrefixSlot ? getSlotVNs(buttonPrefixSlot.call($xeToolbar, {
|
|
20293
|
+
buttons: buttons || [],
|
|
20294
|
+
$grid: $xeGrid,
|
|
20295
|
+
$gantt: $xeGantt,
|
|
20296
|
+
$table: $table
|
|
20297
|
+
})) : []), h('div', {
|
|
20298
|
+
class: 'vxe-button--item-wrapper'
|
|
20299
|
+
}, buttonsSlot ? getSlotVNs(buttonsSlot.call($xeToolbar, {
|
|
20300
|
+
buttons: buttons || [],
|
|
20301
|
+
$grid: $xeGrid,
|
|
20302
|
+
$gantt: $xeGantt,
|
|
20303
|
+
$table: $table
|
|
20304
|
+
})) : btnVNs), h('div', {
|
|
20305
|
+
class: 'vxe-button--suffix-wrapper'
|
|
20306
|
+
}, buttonSuffixSlot ? getSlotVNs(buttonSuffixSlot.call($xeToolbar, {
|
|
20307
|
+
buttons: buttons || [],
|
|
20308
|
+
$grid: $xeGrid,
|
|
20309
|
+
$gantt: $xeGantt,
|
|
20310
|
+
$table: $table
|
|
20311
|
+
})) : [])];
|
|
20325
20312
|
},
|
|
20326
20313
|
/**
|
|
20327
20314
|
* 渲染右侧工具
|
|
@@ -20345,83 +20332,70 @@ function toolbar_createInternalData() {
|
|
|
20345
20332
|
const toolsSlot = slots.tools;
|
|
20346
20333
|
const toolPrefixSlot = slots.toolPrefix || slots['tool-prefix'];
|
|
20347
20334
|
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix'];
|
|
20348
|
-
const
|
|
20349
|
-
if (
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20359
|
-
|
|
20360
|
-
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
if (
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
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
|
-
}
|
|
20335
|
+
const btnVNs = [];
|
|
20336
|
+
if (tools) {
|
|
20337
|
+
tools.forEach((item, tIndex) => {
|
|
20338
|
+
const {
|
|
20339
|
+
dropdowns,
|
|
20340
|
+
toolRender
|
|
20341
|
+
} = item;
|
|
20342
|
+
if (item.visible !== false) {
|
|
20343
|
+
const rdName = toolRender ? toolRender.name : null;
|
|
20344
|
+
const compConf = toolRender ? toolbar_renderer.get(rdName) : null;
|
|
20345
|
+
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
20346
|
+
const toolbarToolClassName = compConf.toolbarToolClassName;
|
|
20347
|
+
const params = {
|
|
20348
|
+
$grid: $xeGrid,
|
|
20349
|
+
$gantt: $xeGantt,
|
|
20350
|
+
$table: $table,
|
|
20351
|
+
tool: item
|
|
20352
|
+
};
|
|
20353
|
+
btnVNs.push(h('span', {
|
|
20354
|
+
key: rdName,
|
|
20355
|
+
class: ['vxe-tool--item', toolbarToolClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName : '']
|
|
20356
|
+
}, getSlotVNs(compConf.renderToolbarTool(h, toolRender, params))));
|
|
20357
|
+
} else {
|
|
20358
|
+
if (VxeUIButtonComponent) {
|
|
20359
|
+
btnVNs.push(h(VxeUIButtonComponent, {
|
|
20360
|
+
key: tIndex,
|
|
20361
|
+
props: Object.assign({}, item, {
|
|
20362
|
+
content: item.content || item.name,
|
|
20363
|
+
options: undefined
|
|
20364
|
+
}),
|
|
20365
|
+
on: {
|
|
20366
|
+
click: eventParams => $xeToolbar.tolEvent(eventParams, item)
|
|
20367
|
+
},
|
|
20368
|
+
scopedSlots: dropdowns && dropdowns.length ? {
|
|
20369
|
+
dropdowns: () => $xeToolbar.renderDropdowns(h, item, false)
|
|
20370
|
+
} : {}
|
|
20371
|
+
}));
|
|
20399
20372
|
}
|
|
20400
20373
|
}
|
|
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));
|
|
20412
|
-
}
|
|
20413
|
-
if (toolSuffixSlot) {
|
|
20414
|
-
rtVNs.push(h('span', {
|
|
20415
|
-
key: 'tts',
|
|
20416
|
-
class: 'vxe-tool--suffix-wrapper'
|
|
20417
|
-
}, getSlotVNs(toolSuffixSlot.call($xeToolbar, {
|
|
20418
|
-
tools: tools || [],
|
|
20419
|
-
$grid: $xeGrid,
|
|
20420
|
-
$gantt: $xeGantt,
|
|
20421
|
-
$table: $table
|
|
20422
|
-
}))));
|
|
20374
|
+
}
|
|
20375
|
+
});
|
|
20423
20376
|
}
|
|
20424
|
-
return
|
|
20377
|
+
return [h('div', {
|
|
20378
|
+
class: 'vxe-tool--prefix-wrapper'
|
|
20379
|
+
}, toolPrefixSlot ? getSlotVNs(toolPrefixSlot.call($xeToolbar, {
|
|
20380
|
+
tools: tools || [],
|
|
20381
|
+
$grid: $xeGrid,
|
|
20382
|
+
$gantt: $xeGantt,
|
|
20383
|
+
$table: $table
|
|
20384
|
+
})) : []), h('div', {
|
|
20385
|
+
class: 'vxe-tool--item-wrapper'
|
|
20386
|
+
}, toolsSlot ? getSlotVNs(toolsSlot.call($xeToolbar, {
|
|
20387
|
+
tools: tools || [],
|
|
20388
|
+
$grid: $xeGrid,
|
|
20389
|
+
$gantt: $xeGantt,
|
|
20390
|
+
$table: $table
|
|
20391
|
+
})) : btnVNs), h('div', {
|
|
20392
|
+
class: 'vxe-tool--suffix-wrapper'
|
|
20393
|
+
}, toolSuffixSlot ? getSlotVNs(toolSuffixSlot.call($xeToolbar, {
|
|
20394
|
+
tools: tools || [],
|
|
20395
|
+
$grid: $xeGrid,
|
|
20396
|
+
$gantt: $xeGantt,
|
|
20397
|
+
$table: $table
|
|
20398
|
+
})) : [])];
|
|
20425
20399
|
},
|
|
20426
20400
|
renderToolImport(h) {
|
|
20427
20401
|
// 使用已安装的组件,如果未安装则不渲染
|