vxe-table 4.22.0-beta.0 → 4.22.0-beta.1
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/dist/all.esm.js +80 -41
- package/dist/style.css +1 -1
- package/es/style.css +1 -1
- package/es/table/module/edit/hook.js +4 -2
- package/es/table/module/export/hook.js +7 -5
- package/es/table/module/filter/hook.js +5 -3
- package/es/table/module/filter/panel.js +5 -3
- package/es/table/src/body.js +5 -3
- package/es/table/src/cell.js +16 -6
- package/es/table/src/columnInfo.js +3 -2
- package/es/table/src/footer.js +3 -2
- package/es/table/src/header.js +6 -4
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +13 -5
- package/es/toolbar/src/toolbar.js +7 -4
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +98 -45
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/hook.js +5 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +8 -5
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/filter/hook.js +6 -3
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/filter/panel.js +6 -3
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/src/body.js +6 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +26 -6
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -4
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +4 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +7 -4
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/props.js +4 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +7 -7
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +11 -4
- package/lib/toolbar/src/toolbar.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 +2 -2
- package/packages/table/module/edit/hook.ts +4 -2
- package/packages/table/module/export/hook.ts +7 -5
- package/packages/table/module/filter/hook.ts +6 -4
- package/packages/table/module/filter/panel.ts +5 -3
- package/packages/table/src/body.ts +5 -3
- package/packages/table/src/cell.ts +16 -6
- package/packages/table/src/columnInfo.ts +4 -2
- package/packages/table/src/footer.ts +3 -2
- package/packages/table/src/header.ts +6 -4
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +14 -5
- package/packages/toolbar/src/toolbar.ts +7 -4
- /package/es/{iconfont.1789131679524.ttf → iconfont.1789279229903.ttf} +0 -0
- /package/es/{iconfont.1789131679524.woff → iconfont.1789279229903.woff} +0 -0
- /package/es/{iconfont.1789131679524.woff2 → iconfont.1789279229903.woff2} +0 -0
- /package/lib/{iconfont.1789131679524.ttf → iconfont.1789279229903.ttf} +0 -0
- /package/lib/{iconfont.1789131679524.woff → iconfont.1789279229903.woff} +0 -0
- /package/lib/{iconfont.1789131679524.woff2 → iconfont.1789279229903.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -47,7 +47,7 @@ function getDefaultConfig(val1, def1) {
|
|
|
47
47
|
return XEUtils.eqNull(val1) ? def1 : val1;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
const version = "4.22.0-beta.
|
|
50
|
+
const version = "4.22.0-beta.1";
|
|
51
51
|
VxeUI.version = version;
|
|
52
52
|
VxeUI.tableVersion = version;
|
|
53
53
|
VxeUI.setConfig({
|
|
@@ -931,7 +931,7 @@ function getPopupWrapperElement(panelElem) {
|
|
|
931
931
|
}
|
|
932
932
|
|
|
933
933
|
const { log } = VxeUI;
|
|
934
|
-
const tableVersion = `table v${"4.22.0-beta.
|
|
934
|
+
const tableVersion = `table v${"4.22.0-beta.1"}`;
|
|
935
935
|
function createComponentLog(name) {
|
|
936
936
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
937
937
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -954,11 +954,13 @@ class ColumnInfo {
|
|
|
954
954
|
const $xeGrid = $xeTable.xeGrid;
|
|
955
955
|
const $xeGantt = $xeTable.xeGantt;
|
|
956
956
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
957
|
+
const { computeRendererOpts, computeTreeOpts } = $xeTable.getComputeMaps();
|
|
957
958
|
const { type, field, width, visible, fixed, align, headerAlign, footerAlign, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
|
|
958
959
|
const colId = colConfs.colId || XEUtils.uniqueId('col_');
|
|
959
960
|
const defaultVisible = XEUtils.isBoolean(visible) ? visible : true;
|
|
960
961
|
const defaultRenderWidth = width && isPx(width) && width !== 'auto' ? Math.max(0, XEUtils.toInteger(width)) : 0;
|
|
961
|
-
const
|
|
962
|
+
const rendererOpts = computeRendererOpts.value;
|
|
963
|
+
const flCompConf = filterRender && isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$b.get(filterRender.name)) : null;
|
|
962
964
|
const ctFilterOptions = flCompConf ? flCompConf.createTableFilterOptions : null;
|
|
963
965
|
const filters = toFilters(colConfs.filters, colId);
|
|
964
966
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
@@ -973,7 +975,6 @@ class ColumnInfo {
|
|
|
973
975
|
}
|
|
974
976
|
if (type === 'expand') {
|
|
975
977
|
const { treeConfig } = tableProps;
|
|
976
|
-
const { computeTreeOpts } = $xeTable.getComputeMaps();
|
|
977
978
|
const treeOpts = computeTreeOpts.value;
|
|
978
979
|
if (treeConfig && (treeOpts.showLine || treeOpts.line)) {
|
|
979
980
|
errLog$a('vxe.error.errConflicts', ['tree-config.showLine', 'column.type=expand']);
|
|
@@ -2469,7 +2470,9 @@ function getFooterContent(params) {
|
|
|
2469
2470
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
2470
2471
|
const itemValue = $table.getFooterCellLabel(row, column);
|
|
2471
2472
|
if (renderOpts) {
|
|
2472
|
-
const
|
|
2473
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
2474
|
+
const rendererOpts = computeRendererOpts.value;
|
|
2475
|
+
const compConf = renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$a.get(renderOpts.name)) : null;
|
|
2473
2476
|
if (compConf) {
|
|
2474
2477
|
const rtFooter = compConf.renderTableFooter || compConf.renderFooter;
|
|
2475
2478
|
if (rtFooter) {
|
|
@@ -2606,7 +2609,9 @@ const Cell = {
|
|
|
2606
2609
|
}
|
|
2607
2610
|
}
|
|
2608
2611
|
if (renderOpts) {
|
|
2609
|
-
const
|
|
2612
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
2613
|
+
const rendererOpts = computeRendererOpts.value;
|
|
2614
|
+
const compConf = renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$a.get(renderOpts.name)) : null;
|
|
2610
2615
|
if (compConf) {
|
|
2611
2616
|
const rtHeader = compConf.renderTableHeader || compConf.renderHeader;
|
|
2612
2617
|
if (rtHeader) {
|
|
@@ -2701,9 +2706,11 @@ const Cell = {
|
|
|
2701
2706
|
if (defaultSlot) {
|
|
2702
2707
|
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
|
|
2703
2708
|
}
|
|
2709
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
2710
|
+
const rendererOpts = computeRendererOpts.value;
|
|
2704
2711
|
// 如果是编辑模式-查看:slot default > formatter > cellRender.renderTableDefault > editRender.renderTableCell > editRender.renderTableDefault > cellRender.tableCellFormatter > editRender.tableCellFormatter > field
|
|
2705
2712
|
// 如果是查看表格:slot default > formatter > cellRender.renderTableDefault > cellRender.tableCellFormatter > field
|
|
2706
|
-
const cellCompConf = cellRenderOpts ? renderer$a.get(cellRenderOpts.name) : null;
|
|
2713
|
+
const cellCompConf = cellRenderOpts && cellRenderOpts.name ? (rendererOpts[cellRenderOpts.name] || renderer$a.get(cellRenderOpts.name)) : null;
|
|
2707
2714
|
if (cellRenderOpts) {
|
|
2708
2715
|
const cellDefaultRenderFn = cellCompConf ? (cellCompConf.renderTableDefault || cellCompConf.renderDefault) : null;
|
|
2709
2716
|
if (cellDefaultRenderFn && cellRenderOpts) {
|
|
@@ -2711,7 +2718,7 @@ const Cell = {
|
|
|
2711
2718
|
}
|
|
2712
2719
|
}
|
|
2713
2720
|
if (editRenderOpts) {
|
|
2714
|
-
const editCompConf = editRenderOpts ? renderer$a.get(editRenderOpts.name) : null;
|
|
2721
|
+
const editCompConf = editRenderOpts && editRenderOpts.name ? (rendererOpts[editRenderOpts.name] || renderer$a.get(editRenderOpts.name)) : null;
|
|
2715
2722
|
const editCellRenderFn = editCompConf
|
|
2716
2723
|
? ((editCompConf.renderTableCell || editCompConf.renderCell) ||
|
|
2717
2724
|
(editCompConf.renderTableDefault || editCompConf.renderDefault))
|
|
@@ -3249,7 +3256,9 @@ const Cell = {
|
|
|
3249
3256
|
return $table.callSlot(contentSlot, params);
|
|
3250
3257
|
}
|
|
3251
3258
|
if (contentRender) {
|
|
3252
|
-
const
|
|
3259
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
3260
|
+
const rendererOpts = computeRendererOpts.value;
|
|
3261
|
+
const compConf = contentRender.name ? (rendererOpts[contentRender.name] || renderer$a.get(contentRender.name)) : null;
|
|
3253
3262
|
if (compConf) {
|
|
3254
3263
|
const rtExpand = compConf.renderTableExpand || compConf.renderExpand;
|
|
3255
3264
|
if (rtExpand) {
|
|
@@ -3465,7 +3474,9 @@ const Cell = {
|
|
|
3465
3474
|
if (editSlot) {
|
|
3466
3475
|
return $table.callSlot(editSlot, cellParams);
|
|
3467
3476
|
}
|
|
3468
|
-
const
|
|
3477
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
3478
|
+
const rendererOpts = computeRendererOpts.value;
|
|
3479
|
+
const compConf = editRenderOpts.name ? (rendererOpts[editRenderOpts.name] || renderer$a.get(editRenderOpts.name)) : null;
|
|
3469
3480
|
const rtEdit = compConf ? (compConf.renderTableEdit || compConf.renderEdit) : null;
|
|
3470
3481
|
if (rtEdit) {
|
|
3471
3482
|
return getSlotVNs(rtEdit(editRenderOpts, cellParams));
|
|
@@ -4065,6 +4076,10 @@ const tableProps = {
|
|
|
4065
4076
|
type: Number,
|
|
4066
4077
|
default: () => getConfig$7().table.delayHover
|
|
4067
4078
|
},
|
|
4079
|
+
/**
|
|
4080
|
+
* 渲染器配置项
|
|
4081
|
+
*/
|
|
4082
|
+
rendererConfig: Object,
|
|
4068
4083
|
// 额外的参数
|
|
4069
4084
|
params: Object
|
|
4070
4085
|
};
|
|
@@ -4282,7 +4297,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4282
4297
|
setup(props) {
|
|
4283
4298
|
const $xeTable = inject('$xeTable', {});
|
|
4284
4299
|
const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
4285
|
-
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeResizableOpts, computeVirtualXOpts, computeVirtualYOpts, computeIsBodyRenderOptimize } = $xeTable.getComputeMaps();
|
|
4300
|
+
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeResizableOpts, computeVirtualXOpts, computeVirtualYOpts, computeIsBodyRenderOptimize, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
4286
4301
|
const refElem = ref();
|
|
4287
4302
|
const refBodyScroll = ref();
|
|
4288
4303
|
const refBodyTable = ref();
|
|
@@ -4367,6 +4382,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4367
4382
|
const resizableOpts = computeResizableOpts.value;
|
|
4368
4383
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
4369
4384
|
const virtualYOpts = computeVirtualYOpts.value;
|
|
4385
|
+
const rendererOpts = computeRendererOpts.value;
|
|
4370
4386
|
const { isAllColumnDrag, isAllRowDrag } = resizableOpts;
|
|
4371
4387
|
const rowOpts = computeRowOpts.value;
|
|
4372
4388
|
const rowDragOpts = computeRowDragOpts.value;
|
|
@@ -4385,7 +4401,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4385
4401
|
const colid = column.id;
|
|
4386
4402
|
const colRest = fullColumnIdData[colid] || {};
|
|
4387
4403
|
const renderOpts = editRender || cellRender;
|
|
4388
|
-
const compConf = renderOpts ? renderer$9.get(renderOpts.name) : null;
|
|
4404
|
+
const compConf = renderOpts && renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$9.get(renderOpts.name)) : null;
|
|
4389
4405
|
const compCellClassName = compConf ? (compConf.tableCellClassName || compConf.cellClassName) : null;
|
|
4390
4406
|
const compCellStyle = compConf ? (compConf.tableCellStyle || compConf.cellStyle) : '';
|
|
4391
4407
|
const showAllTip = tooltipOpts.showAll;
|
|
@@ -5022,7 +5038,8 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
5022
5038
|
emptyContent = $xeTable.callSlot(emptySlot, emptyParams);
|
|
5023
5039
|
}
|
|
5024
5040
|
else {
|
|
5025
|
-
const
|
|
5041
|
+
const rendererOpts = computeRendererOpts.value;
|
|
5042
|
+
const compConf = emptyOpts.name ? (rendererOpts[emptyOpts.name] || renderer$9.get(emptyOpts.name)) : null;
|
|
5026
5043
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null;
|
|
5027
5044
|
if (rtEmptyView) {
|
|
5028
5045
|
emptyContent = getSlotVNs(rtEmptyView(emptyOpts, emptyParams));
|
|
@@ -5157,7 +5174,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5157
5174
|
setup(props) {
|
|
5158
5175
|
const $xeTable = inject('$xeTable', {});
|
|
5159
5176
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
5160
|
-
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize, computeHeaderTooltipOpts } = $xeTable.getComputeMaps();
|
|
5177
|
+
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize, computeHeaderTooltipOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
5161
5178
|
const headerColumn = ref([]);
|
|
5162
5179
|
const refElem = ref();
|
|
5163
5180
|
const refHeaderScroll = ref();
|
|
@@ -5196,6 +5213,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5196
5213
|
const cellOpts = computeCellOpts.value;
|
|
5197
5214
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5198
5215
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
5216
|
+
const rendererOpts = computeRendererOpts.value;
|
|
5199
5217
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
5200
5218
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
5201
5219
|
const isLastRow = _rowIndex === headerGroups.length - 1;
|
|
@@ -5204,7 +5222,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5204
5222
|
const colid = column.id;
|
|
5205
5223
|
const colRest = fullColumnIdData[colid] || {};
|
|
5206
5224
|
const renderOpts = editRender || cellRender;
|
|
5207
|
-
const compConf = renderOpts ? renderer$8.get(renderOpts.name) : null;
|
|
5225
|
+
const compConf = renderOpts && renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$8.get(renderOpts.name)) : null;
|
|
5208
5226
|
const isColGroup = column.children && column.children.length;
|
|
5209
5227
|
const fixedHiddenColumn = overflowX && !isColGroup && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
5210
5228
|
const cellPadding = getDefaultConfig(headerCellOpts.padding, cellOpts.padding);
|
|
@@ -5383,6 +5401,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5383
5401
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5384
5402
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
5385
5403
|
const floatingFilterOpts = computeFloatingFilterOpts.value;
|
|
5404
|
+
const rendererOpts = computeRendererOpts.value;
|
|
5386
5405
|
const { cellClassName } = floatingFilterOpts;
|
|
5387
5406
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
5388
5407
|
return cols.map((column, $columnIndex) => {
|
|
@@ -5391,8 +5410,8 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5391
5410
|
const colRest = fullColumnIdData[colid] || {};
|
|
5392
5411
|
const renderOpts = editRender || cellRender;
|
|
5393
5412
|
const flSlot = slots ? (slots.floatingFilter || slots['floating-filter']) : null;
|
|
5394
|
-
const compConf = renderOpts ? renderer$8.get(renderOpts.name) : null;
|
|
5395
|
-
const flCompConf = isEnableConf(filterRender) ? renderer$8.get(filterRender.name) : null;
|
|
5413
|
+
const compConf = renderOpts && renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$8.get(renderOpts.name)) : null;
|
|
5414
|
+
const flCompConf = isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$8.get(filterRender.name)) : null;
|
|
5396
5415
|
const rtFloatingFilter = flCompConf ? flCompConf.renderTableFloatingFilter : null;
|
|
5397
5416
|
const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
5398
5417
|
const isPadding = XEUtils.isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
|
|
@@ -5685,7 +5704,7 @@ var TableFooterComponent = defineVxeComponent({
|
|
|
5685
5704
|
setup(props) {
|
|
5686
5705
|
const $xeTable = inject('$xeTable', {});
|
|
5687
5706
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
5688
|
-
const { computeFooterTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts, computeIsFooterRenderOptimize } = $xeTable.getComputeMaps();
|
|
5707
|
+
const { computeFooterTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts, computeIsFooterRenderOptimize, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
5689
5708
|
const refElem = ref();
|
|
5690
5709
|
const refFooterScroll = ref();
|
|
5691
5710
|
const refFooterTable = ref();
|
|
@@ -5708,12 +5727,13 @@ var TableFooterComponent = defineVxeComponent({
|
|
|
5708
5727
|
const cellOpts = computeCellOpts.value;
|
|
5709
5728
|
const footerCellOpts = computeFooterCellOpts.value;
|
|
5710
5729
|
const currCellHeight = getCalcHeight(footerCellOpts.height) || defaultRowHeight;
|
|
5730
|
+
const rendererOpts = computeRendererOpts.value;
|
|
5711
5731
|
return tableColumn.map((column, $columnIndex) => {
|
|
5712
5732
|
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column;
|
|
5713
5733
|
const colid = column.id;
|
|
5714
5734
|
const colRest = fullColumnIdData[colid] || {};
|
|
5715
5735
|
const renderOpts = editRender || cellRender;
|
|
5716
|
-
const compConf = renderOpts ? renderer$7.get(renderOpts.name) : null;
|
|
5736
|
+
const compConf = renderOpts && renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$7.get(renderOpts.name)) : null;
|
|
5717
5737
|
const showAllTip = footerTooltipOpts.showAll;
|
|
5718
5738
|
const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
5719
5739
|
const cellPadding = getDefaultConfig(footerCellOpts.padding, cellOpts.padding);
|
|
@@ -7609,7 +7629,7 @@ var TableFilterPanelComponent = defineVxeComponent({
|
|
|
7609
7629
|
const xID = XEUtils.uniqueId();
|
|
7610
7630
|
const $xeTable = inject('$xeTable', {});
|
|
7611
7631
|
const { reactData: tableReactData, internalData: tableInternalData, getComputeMaps } = $xeTable;
|
|
7612
|
-
const { computeFilterOpts } = getComputeMaps();
|
|
7632
|
+
const { computeFilterOpts, computeRendererOpts } = getComputeMaps();
|
|
7613
7633
|
const refElem = ref();
|
|
7614
7634
|
const refMaps = {
|
|
7615
7635
|
refElem
|
|
@@ -7792,10 +7812,11 @@ var TableFilterPanelComponent = defineVxeComponent({
|
|
|
7792
7812
|
return [];
|
|
7793
7813
|
}
|
|
7794
7814
|
const filterOpts = computeFilterOpts.value;
|
|
7815
|
+
const rendererOpts = computeRendererOpts.value;
|
|
7795
7816
|
const hasCheckOption = computeHasCheckOption.value;
|
|
7796
7817
|
const { filterRender, filterMultiple } = column;
|
|
7797
7818
|
const { confirmButtonText, resetButtonText, showFooter } = filterOpts;
|
|
7798
|
-
const compConf = isEnableConf(filterRender) ? renderer$6.get(filterRender.name) : null;
|
|
7819
|
+
const compConf = filterRender && isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$6.get(filterRender.name)) : null;
|
|
7799
7820
|
const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate;
|
|
7800
7821
|
let showFlFoot = !!filterMultiple;
|
|
7801
7822
|
if (XEUtils.isBoolean(showFooter)) {
|
|
@@ -7830,8 +7851,9 @@ var TableFilterPanelComponent = defineVxeComponent({
|
|
|
7830
7851
|
if (!column) {
|
|
7831
7852
|
return renderEmptyElement$5($xeFilterPanel);
|
|
7832
7853
|
}
|
|
7854
|
+
const rendererOpts = computeRendererOpts.value;
|
|
7833
7855
|
const filterRender = column ? column.filterRender : null;
|
|
7834
|
-
const compConf = filterRender && isEnableConf(filterRender) ? renderer$6.get(filterRender.name) : null;
|
|
7856
|
+
const compConf = filterRender && isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$6.get(filterRender.name)) : null;
|
|
7835
7857
|
const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : '';
|
|
7836
7858
|
const params = Object.assign({}, tableInternalData._currFilterParams, { $panel: $xeFilterPanel, $table: $xeTable });
|
|
7837
7859
|
const tableProps = $xeTable.props;
|
|
@@ -8888,7 +8910,7 @@ hooks$7.add('tableFilterModule', {
|
|
|
8888
8910
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
8889
8911
|
const { props, reactData, internalData } = $xeTable;
|
|
8890
8912
|
const { refElem, refTableFilter } = $xeTable.getRefMaps();
|
|
8891
|
-
const { computeFilterOpts, computeMouseOpts } = $xeTable.getComputeMaps();
|
|
8913
|
+
const { computeFilterOpts, computeMouseOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
8892
8914
|
const updatePopupStyle = () => {
|
|
8893
8915
|
const { filterStore } = reactData;
|
|
8894
8916
|
const { elemStore } = internalData;
|
|
@@ -8898,9 +8920,10 @@ hooks$7.add('tableFilterModule', {
|
|
|
8898
8920
|
}
|
|
8899
8921
|
const tableEl = refElem.value;
|
|
8900
8922
|
const filterOpts = computeFilterOpts.value;
|
|
8923
|
+
const rendererOpts = computeRendererOpts.value;
|
|
8901
8924
|
const { maxHeight: customMaxHeight, transfer, zIndex } = filterOpts;
|
|
8902
8925
|
const filterRender = column ? column.filterRender : null;
|
|
8903
|
-
const compConf = filterRender && isEnableConf(filterRender) ? renderer$5.get(filterRender.name) : null;
|
|
8926
|
+
const compConf = filterRender && isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$5.get(filterRender.name)) : null;
|
|
8904
8927
|
const headerScrollElem = getRefElem(elemStore['main-header-scroll']);
|
|
8905
8928
|
if (!headerScrollElem) {
|
|
8906
8929
|
return nextTick();
|
|
@@ -9036,7 +9059,8 @@ hooks$7.add('tableFilterModule', {
|
|
|
9036
9059
|
if (column) {
|
|
9037
9060
|
const { filters, filterRender } = column;
|
|
9038
9061
|
if (filters) {
|
|
9039
|
-
const
|
|
9062
|
+
const rendererOpts = computeRendererOpts.value;
|
|
9063
|
+
const compConf = isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$5.get(filterRender.name)) : null;
|
|
9040
9064
|
const frMethod = column.filterResetMethod || (compConf ? (compConf.tableFilterResetMethod || compConf.filterResetMethod) : null);
|
|
9041
9065
|
filters.forEach((item) => {
|
|
9042
9066
|
item._checked = false;
|
|
@@ -9696,7 +9720,7 @@ hooks$5.add('tableEditModule', {
|
|
|
9696
9720
|
setupTable($xeTable) {
|
|
9697
9721
|
const { props, reactData, internalData } = $xeTable;
|
|
9698
9722
|
const { refElem } = $xeTable.getRefMaps();
|
|
9699
|
-
const { computeMouseOpts, computeEditOpts, computeCheckboxOpts, computeTreeOpts, computeValidOpts } = $xeTable.getComputeMaps();
|
|
9723
|
+
const { computeMouseOpts, computeEditOpts, computeCheckboxOpts, computeTreeOpts, computeValidOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
9700
9724
|
const browseObj = XEUtils.browse();
|
|
9701
9725
|
let editMethods = {};
|
|
9702
9726
|
let editPrivateMethods = {};
|
|
@@ -10629,7 +10653,9 @@ hooks$5.add('tableEditModule', {
|
|
|
10629
10653
|
const { editRender } = column;
|
|
10630
10654
|
const editOpts = computeEditOpts.value;
|
|
10631
10655
|
if (editConfig && isEnableConf(editRender)) {
|
|
10632
|
-
const
|
|
10656
|
+
const rendererOpts = computeRendererOpts.value;
|
|
10657
|
+
const renderName = editRender.name;
|
|
10658
|
+
const compRender = renderName ? (rendererOpts[renderName] || renderer$4.get(renderName)) : null;
|
|
10633
10659
|
let autoFocus = editRender.autofocus || editRender.autoFocus;
|
|
10634
10660
|
let autoSelect = editRender.autoSelect || editRender.autoselect;
|
|
10635
10661
|
let inputElem = null;
|
|
@@ -11062,7 +11088,7 @@ const tableExportMethodKeys = ['exportData', 'importByFile', 'importData', 'save
|
|
|
11062
11088
|
hooks$4.add('tableExportModule', {
|
|
11063
11089
|
setupTable($xeTable) {
|
|
11064
11090
|
const { props, reactData, internalData } = $xeTable;
|
|
11065
|
-
const { computeTreeOpts, computePrintOpts, computeExportOpts, computeImportOpts, computeSeqOpts, computeRadioOpts, computeCheckboxOpts, computeColumnOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
|
|
11091
|
+
const { computeTreeOpts, computePrintOpts, computeExportOpts, computeImportOpts, computeSeqOpts, computeRadioOpts, computeCheckboxOpts, computeColumnOpts, computeAggregateOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
11066
11092
|
const getSeq = (cellValue, row, $rowIndex, column, $columnIndex) => {
|
|
11067
11093
|
const seqOpts = computeSeqOpts.value;
|
|
11068
11094
|
const seqMd = seqOpts.seqMethod || column.seqMethod;
|
|
@@ -11102,6 +11128,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11102
11128
|
const treeOpts = computeTreeOpts.value;
|
|
11103
11129
|
const columnOpts = computeColumnOpts.value;
|
|
11104
11130
|
const aggregateOpts = computeAggregateOpts.value;
|
|
11131
|
+
const rendererOpts = computeRendererOpts.value;
|
|
11105
11132
|
if (!htmlCellElem) {
|
|
11106
11133
|
htmlCellElem = document.createElement('div');
|
|
11107
11134
|
}
|
|
@@ -11134,7 +11161,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11134
11161
|
const renderOpts = editRender || cellRender;
|
|
11135
11162
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
11136
11163
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
11137
|
-
const compConf = renderer$3.get(renderOpts.name);
|
|
11164
|
+
const compConf = rendererOpts[renderOpts.name] || renderer$3.get(renderOpts.name);
|
|
11138
11165
|
if (compConf) {
|
|
11139
11166
|
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
|
|
11140
11167
|
}
|
|
@@ -11279,7 +11306,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11279
11306
|
const renderOpts = column.editRender || column.cellRender;
|
|
11280
11307
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
11281
11308
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
11282
|
-
const compConf = renderer$3.get(renderOpts.name);
|
|
11309
|
+
const compConf = rendererOpts[renderOpts.name] || renderer$3.get(renderOpts.name);
|
|
11283
11310
|
if (compConf) {
|
|
11284
11311
|
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
|
|
11285
11312
|
}
|
|
@@ -11349,7 +11376,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11349
11376
|
const renderOpts = column.editRender || column.cellRender;
|
|
11350
11377
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
11351
11378
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
11352
|
-
const compConf = renderer$3.get(renderOpts.name);
|
|
11379
|
+
const compConf = rendererOpts[renderOpts.name] || renderer$3.get(renderOpts.name);
|
|
11353
11380
|
if (compConf) {
|
|
11354
11381
|
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
|
|
11355
11382
|
}
|
|
@@ -11410,10 +11437,11 @@ hooks$4.add('tableExportModule', {
|
|
|
11410
11437
|
};
|
|
11411
11438
|
const getFooterCellValue = (opts, row, column) => {
|
|
11412
11439
|
const columnOpts = computeColumnOpts.value;
|
|
11440
|
+
const rendererOpts = computeRendererOpts.value;
|
|
11413
11441
|
const renderOpts = column.editRender || column.cellRender;
|
|
11414
11442
|
let footLabelMethod = column.footerExportMethod;
|
|
11415
11443
|
if (!footLabelMethod && renderOpts && renderOpts.name) {
|
|
11416
|
-
const compConf = renderer$3.get(renderOpts.name);
|
|
11444
|
+
const compConf = rendererOpts[renderOpts.name] || renderer$3.get(renderOpts.name);
|
|
11417
11445
|
if (compConf) {
|
|
11418
11446
|
footLabelMethod = compConf.tableFooterExportMethod || compConf.footerExportMethod;
|
|
11419
11447
|
}
|
|
@@ -16583,6 +16611,9 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
16583
16611
|
const combineSplitterResizeFlag = computed(() => {
|
|
16584
16612
|
return $xeSplitter ? $xeSplitter.reactData.resizeFlag : null;
|
|
16585
16613
|
});
|
|
16614
|
+
const computeRendererOpts = computed(() => {
|
|
16615
|
+
return Object.assign({}, getConfig$2().table.rendererConfig, props.rendererConfig);
|
|
16616
|
+
});
|
|
16586
16617
|
const refMaps = {
|
|
16587
16618
|
refElem,
|
|
16588
16619
|
refTooltip,
|
|
@@ -16689,6 +16720,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
16689
16720
|
computeRowGroupColumns,
|
|
16690
16721
|
computeAggFuncColumns,
|
|
16691
16722
|
computeUndoRedoHistoryOpts,
|
|
16723
|
+
computeRendererOpts,
|
|
16692
16724
|
computeFNROpts,
|
|
16693
16725
|
computeSXOpts,
|
|
16694
16726
|
computeSYOpts
|
|
@@ -18124,6 +18156,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18124
18156
|
const filterOpts = computeFilterOpts.value;
|
|
18125
18157
|
const sortOpts = computeSortOpts.value;
|
|
18126
18158
|
const aggregateOpts = computeAggregateOpts.value;
|
|
18159
|
+
const rendererOpts = computeRendererOpts.value;
|
|
18127
18160
|
const treeOpts = computeTreeOpts.value;
|
|
18128
18161
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
18129
18162
|
const { transform, rowField, parentField, mapChildrenField } = treeOpts;
|
|
@@ -18163,7 +18196,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18163
18196
|
const handleFilter = (row) => {
|
|
18164
18197
|
return filterColumns.every(({ column, valueList, itemList }) => {
|
|
18165
18198
|
const { filterMethod, filterRender } = column;
|
|
18166
|
-
const compConf = isEnableConf(filterRender) ? renderer$1.get(filterRender.name) : null;
|
|
18199
|
+
const compConf = isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$1.get(filterRender.name)) : null;
|
|
18167
18200
|
const compFilterMethod = compConf ? (compConf.tableFilterMethod || compConf.filterMethod) : null;
|
|
18168
18201
|
const tdFilterMethod = compConf ? (compConf.tableFilterDefaultMethod || compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null;
|
|
18169
18202
|
const cellValue = getCellValue(row, column);
|
|
@@ -21274,6 +21307,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
21274
21307
|
}
|
|
21275
21308
|
const { editConfig } = props;
|
|
21276
21309
|
const { formatter, editRender, cellRender } = column;
|
|
21310
|
+
const rendererOpts = computeRendererOpts.value;
|
|
21277
21311
|
let etOpSize = null;
|
|
21278
21312
|
let etOgSize = null;
|
|
21279
21313
|
let clOpSize = null;
|
|
@@ -21290,8 +21324,8 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
21290
21324
|
const editRenderOpts = formatter ? null : (isEnableEdit && isEnableConf(editRender) ? editRender : null);
|
|
21291
21325
|
const cellRenderOpts = formatter ? null : (isEnableConf(cellRender) ? cellRender : null);
|
|
21292
21326
|
// formatter > cellRender.tableCellFormatter > editRender.tableCellFormatter
|
|
21293
|
-
const cellCompConf = cellRenderOpts ? renderer$1.get(cellRenderOpts.name) : null;
|
|
21294
|
-
const editCompConf = editRenderOpts ? renderer$1.get(editRenderOpts.name) : null;
|
|
21327
|
+
const cellCompConf = cellRenderOpts && cellRenderOpts.name ? (rendererOpts[cellRenderOpts.name] || renderer$1.get(cellRenderOpts.name)) : null;
|
|
21328
|
+
const editCompConf = editRenderOpts && editRenderOpts.name ? (rendererOpts[editRenderOpts.name] || renderer$1.get(editRenderOpts.name)) : null;
|
|
21295
21329
|
const cellDfFormatter = cellCompConf ? cellCompConf.tableCellFormatter : null;
|
|
21296
21330
|
const editDfFormatter = editCompConf ? editCompConf.tableCellFormatter : null;
|
|
21297
21331
|
const cellValue = getCellValue(row, column);
|
|
@@ -26063,8 +26097,9 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
26063
26097
|
if (column) {
|
|
26064
26098
|
const { filterStore } = reactData;
|
|
26065
26099
|
const { filterRender, filters } = column;
|
|
26100
|
+
const rendererOpts = computeRendererOpts.value;
|
|
26066
26101
|
const filterOptions = filters || [];
|
|
26067
|
-
const compConf = isEnableConf(filterRender) ? renderer$1.get(filterRender.name) : null;
|
|
26102
|
+
const compConf = isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$1.get(filterRender.name)) : null;
|
|
26068
26103
|
const frMethod = column.filterRecoverMethod || (compConf ? (compConf.tableFilterRecoverMethod || compConf.filterRecoverMethod) : null);
|
|
26069
26104
|
filterStore.column = column;
|
|
26070
26105
|
// 复原状态
|
|
@@ -29357,7 +29392,8 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29357
29392
|
return emptySlot(emptyParams);
|
|
29358
29393
|
}
|
|
29359
29394
|
else {
|
|
29360
|
-
const
|
|
29395
|
+
const rendererOpts = computeRendererOpts.value;
|
|
29396
|
+
const compConf = emptyOpts.name ? (rendererOpts[emptyOpts.name] || renderer$1.get(emptyOpts.name)) : null;
|
|
29361
29397
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null;
|
|
29362
29398
|
if (rtEmptyView) {
|
|
29363
29399
|
return getSlotVNs(rtEmptyView(emptyOpts, emptyParams));
|
|
@@ -31043,10 +31079,12 @@ var VxeToolbarComponent = defineVxeComponent({
|
|
|
31043
31079
|
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix'];
|
|
31044
31080
|
const btnVNs = [];
|
|
31045
31081
|
if (buttons) {
|
|
31082
|
+
const { computeRendererOpts } = $table ? $table.getComputeMaps() : {};
|
|
31083
|
+
const rendererOpts = (computeRendererOpts ? computeRendererOpts.value : null) || {};
|
|
31046
31084
|
buttons.forEach((item, index) => {
|
|
31047
31085
|
const { dropdowns, buttonRender } = item;
|
|
31048
31086
|
if (item.visible !== false) {
|
|
31049
|
-
const compConf = buttonRender ? renderer.get(buttonRender.name) : null;
|
|
31087
|
+
const compConf = buttonRender && buttonRender.name ? (rendererOpts[buttonRender.name] || renderer.get(buttonRender.name)) : null;
|
|
31050
31088
|
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
31051
31089
|
const toolbarButtonClassName = compConf.toolbarButtonClassName;
|
|
31052
31090
|
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table, button: item };
|
|
@@ -31094,16 +31132,17 @@ var VxeToolbarComponent = defineVxeComponent({
|
|
|
31094
31132
|
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix'];
|
|
31095
31133
|
const btnVNs = [];
|
|
31096
31134
|
if (tools) {
|
|
31135
|
+
const { computeRendererOpts } = $table ? $table.getComputeMaps() : {};
|
|
31136
|
+
const rendererOpts = (computeRendererOpts ? computeRendererOpts.value : null) || {};
|
|
31097
31137
|
tools.forEach((item, tIndex) => {
|
|
31098
31138
|
const { dropdowns, toolRender } = item;
|
|
31099
31139
|
if (item.visible !== false) {
|
|
31100
|
-
const
|
|
31101
|
-
const compConf = toolRender ? renderer.get(rdName) : null;
|
|
31140
|
+
const compConf = toolRender && toolRender.name ? (rendererOpts[toolRender.name] || renderer.get(toolRender.name)) : null;
|
|
31102
31141
|
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
31103
31142
|
const toolbarToolClassName = compConf.toolbarToolClassName;
|
|
31104
31143
|
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table, tool: item };
|
|
31105
31144
|
btnVNs.push(h('span', {
|
|
31106
|
-
key:
|
|
31145
|
+
key: tIndex,
|
|
31107
31146
|
class: ['vxe-tool--item', toolbarToolClassName ? (XEUtils.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName) : '']
|
|
31108
31147
|
}, getSlotVNs(compConf.renderToolbarTool(toolRender, params))));
|
|
31109
31148
|
}
|