vxe-table 4.21.10 → 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/README.md +2 -0
- package/dist/all.esm.js +145 -58
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/grid/src/grid.js +26 -0
- package/es/iconfont.1789279229903.ttf +0 -0
- package/es/iconfont.1789279229903.woff +0 -0
- package/es/iconfont.1789279229903.woff2 +0 -0
- 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/module/edit/hook.js +4 -2
- package/es/table/module/export/hook.js +14 -7
- 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 +34 -14
- 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 +25 -10
- package/es/table/style.css +3 -3
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +7 -4
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +3 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +26 -0
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/iconfont.1789279229903.ttf +0 -0
- package/lib/iconfont.1789279229903.woff +0 -0
- package/lib/iconfont.1789279229903.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +155 -59
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.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 +18 -7
- 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 +45 -16
- 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/table/style/style.css +3 -3
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +3 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +26 -0
- package/packages/table/module/edit/hook.ts +4 -2
- package/packages/table/module/export/hook.ts +14 -7
- 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 +36 -14
- 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 +25 -10
- package/packages/toolbar/src/toolbar.ts +7 -4
- package/styles/components/icon.scss +2 -2
- package/styles/components/table.scss +1 -1
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/es/iconfont.1789035007778.ttf +0 -0
- package/es/iconfont.1789035007778.woff +0 -0
- package/es/iconfont.1789035007778.woff2 +0 -0
- package/lib/iconfont.1789035007778.ttf +0 -0
- package/lib/iconfont.1789035007778.woff +0 -0
- package/lib/iconfont.1789035007778.woff2 +0 -0
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
* [ ] v4.? 重构虚拟渲染v7,优化百万级渲染量
|
|
32
32
|
* [ ] v4.? 重构虚拟渲染v6,同时支持原生滚动条和虚拟滚动条
|
|
33
33
|
* [ ] v4.? 功能需求收集中...
|
|
34
|
+
* [x] v4.22 编辑表格的渲染器支持 edit-render 和 edit-render 组合使用
|
|
34
35
|
* [x] v4.21 重构全键盘操作,修复按键编辑为拼音输入法时首字母丢失问题;筛选支持自适应屏幕上下位置显示;优化虚拟渲染,解决滚动错位场景
|
|
35
36
|
* [x] v4.20 内部重构优化,内部结构调整
|
|
36
37
|
* [x] v4.19 增加对增删改操作撤销回退的支持;优化虚拟渲染,优化提升 Window/Mac 触摸板滚动流畅度
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
* [ ] v3.? 重构虚拟渲染v7,优化百万级渲染量
|
|
50
51
|
* [ ] v3.? 重构虚拟渲染v6,同时支持原生滚动条和虚拟滚动条
|
|
51
52
|
* [ ] v3.? 功能需求收集中...
|
|
53
|
+
* [x] v3.24 编辑表格的渲染器支持 edit-render 和 edit-render 组合使用
|
|
52
54
|
* [x] v3.23 重构全键盘操作,修复按键编辑为拼音输入法时首字母丢失问题;筛选支持自适应屏幕上下位置显示;优化虚拟渲染,解决滚动错位场景
|
|
53
55
|
* [x] v3.22 内部重构优化,内部结构调整
|
|
54
56
|
* [x] v3.21 增加对增删改操作撤销回退的支持;优化虚拟渲染,优化提升 Window/Mac 触摸板滚动流畅度
|
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.
|
|
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.
|
|
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,18 +2706,29 @@ const Cell = {
|
|
|
2701
2706
|
if (defaultSlot) {
|
|
2702
2707
|
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
|
|
2703
2708
|
}
|
|
2704
|
-
const
|
|
2705
|
-
|
|
2706
|
-
//
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2709
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
2710
|
+
const rendererOpts = computeRendererOpts.value;
|
|
2711
|
+
// 如果是编辑模式-查看:slot default > formatter > cellRender.renderTableDefault > editRender.renderTableCell > editRender.renderTableDefault > cellRender.tableCellFormatter > editRender.tableCellFormatter > field
|
|
2712
|
+
// 如果是查看表格:slot default > formatter > cellRender.renderTableDefault > cellRender.tableCellFormatter > field
|
|
2713
|
+
const cellCompConf = cellRenderOpts && cellRenderOpts.name ? (rendererOpts[cellRenderOpts.name] || renderer$a.get(cellRenderOpts.name)) : null;
|
|
2714
|
+
if (cellRenderOpts) {
|
|
2715
|
+
const cellDefaultRenderFn = cellCompConf ? (cellCompConf.renderTableDefault || cellCompConf.renderDefault) : null;
|
|
2716
|
+
if (cellDefaultRenderFn && cellRenderOpts) {
|
|
2717
|
+
return renderCellBaseVNs(params, getSlotVNs(cellDefaultRenderFn(cellRenderOpts, Object.assign({ $type: editRenderOpts ? 'edit' : 'cell' }, params))));
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
if (editRenderOpts) {
|
|
2721
|
+
const editCompConf = editRenderOpts && editRenderOpts.name ? (rendererOpts[editRenderOpts.name] || renderer$a.get(editRenderOpts.name)) : null;
|
|
2722
|
+
const editCellRenderFn = editCompConf
|
|
2723
|
+
? ((editCompConf.renderTableCell || editCompConf.renderCell) ||
|
|
2724
|
+
(editCompConf.renderTableDefault || editCompConf.renderDefault))
|
|
2725
|
+
: null;
|
|
2726
|
+
if (editCellRenderFn) {
|
|
2727
|
+
return renderCellBaseVNs(params, getSlotVNs(editCellRenderFn(editRenderOpts, Object.assign({ $type: editRenderOpts ? 'edit' : 'cell' }, params))));
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
// 如果是编辑模式-查看:cellRender.tableCellFormatter > editRender.tableCellFormatter > field
|
|
2731
|
+
// 如果是查看表格:cellRender.tableCellFormatter > field
|
|
2716
2732
|
cellValue = $table.getCellLabel(row, column);
|
|
2717
2733
|
}
|
|
2718
2734
|
const cellPlaceholder = editRenderOpts ? editRenderOpts.placeholder : '';
|
|
@@ -3240,7 +3256,9 @@ const Cell = {
|
|
|
3240
3256
|
return $table.callSlot(contentSlot, params);
|
|
3241
3257
|
}
|
|
3242
3258
|
if (contentRender) {
|
|
3243
|
-
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;
|
|
3244
3262
|
if (compConf) {
|
|
3245
3263
|
const rtExpand = compConf.renderTableExpand || compConf.renderExpand;
|
|
3246
3264
|
if (rtExpand) {
|
|
@@ -3456,7 +3474,9 @@ const Cell = {
|
|
|
3456
3474
|
if (editSlot) {
|
|
3457
3475
|
return $table.callSlot(editSlot, cellParams);
|
|
3458
3476
|
}
|
|
3459
|
-
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;
|
|
3460
3480
|
const rtEdit = compConf ? (compConf.renderTableEdit || compConf.renderEdit) : null;
|
|
3461
3481
|
if (rtEdit) {
|
|
3462
3482
|
return getSlotVNs(rtEdit(editRenderOpts, cellParams));
|
|
@@ -3481,6 +3501,7 @@ const Cell = {
|
|
|
3481
3501
|
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, cellParams));
|
|
3482
3502
|
}
|
|
3483
3503
|
}
|
|
3504
|
+
// slot default > formatter
|
|
3484
3505
|
if (formatter) {
|
|
3485
3506
|
return renderCellBaseVNs(params, [
|
|
3486
3507
|
h('span', {
|
|
@@ -4055,6 +4076,10 @@ const tableProps = {
|
|
|
4055
4076
|
type: Number,
|
|
4056
4077
|
default: () => getConfig$7().table.delayHover
|
|
4057
4078
|
},
|
|
4079
|
+
/**
|
|
4080
|
+
* 渲染器配置项
|
|
4081
|
+
*/
|
|
4082
|
+
rendererConfig: Object,
|
|
4058
4083
|
// 额外的参数
|
|
4059
4084
|
params: Object
|
|
4060
4085
|
};
|
|
@@ -4272,7 +4297,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4272
4297
|
setup(props) {
|
|
4273
4298
|
const $xeTable = inject('$xeTable', {});
|
|
4274
4299
|
const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
4275
|
-
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();
|
|
4276
4301
|
const refElem = ref();
|
|
4277
4302
|
const refBodyScroll = ref();
|
|
4278
4303
|
const refBodyTable = ref();
|
|
@@ -4357,6 +4382,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4357
4382
|
const resizableOpts = computeResizableOpts.value;
|
|
4358
4383
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
4359
4384
|
const virtualYOpts = computeVirtualYOpts.value;
|
|
4385
|
+
const rendererOpts = computeRendererOpts.value;
|
|
4360
4386
|
const { isAllColumnDrag, isAllRowDrag } = resizableOpts;
|
|
4361
4387
|
const rowOpts = computeRowOpts.value;
|
|
4362
4388
|
const rowDragOpts = computeRowDragOpts.value;
|
|
@@ -4375,7 +4401,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4375
4401
|
const colid = column.id;
|
|
4376
4402
|
const colRest = fullColumnIdData[colid] || {};
|
|
4377
4403
|
const renderOpts = editRender || cellRender;
|
|
4378
|
-
const compConf = renderOpts ? renderer$9.get(renderOpts.name) : null;
|
|
4404
|
+
const compConf = renderOpts && renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$9.get(renderOpts.name)) : null;
|
|
4379
4405
|
const compCellClassName = compConf ? (compConf.tableCellClassName || compConf.cellClassName) : null;
|
|
4380
4406
|
const compCellStyle = compConf ? (compConf.tableCellStyle || compConf.cellStyle) : '';
|
|
4381
4407
|
const showAllTip = tooltipOpts.showAll;
|
|
@@ -5012,7 +5038,8 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
5012
5038
|
emptyContent = $xeTable.callSlot(emptySlot, emptyParams);
|
|
5013
5039
|
}
|
|
5014
5040
|
else {
|
|
5015
|
-
const
|
|
5041
|
+
const rendererOpts = computeRendererOpts.value;
|
|
5042
|
+
const compConf = emptyOpts.name ? (rendererOpts[emptyOpts.name] || renderer$9.get(emptyOpts.name)) : null;
|
|
5016
5043
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null;
|
|
5017
5044
|
if (rtEmptyView) {
|
|
5018
5045
|
emptyContent = getSlotVNs(rtEmptyView(emptyOpts, emptyParams));
|
|
@@ -5147,7 +5174,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5147
5174
|
setup(props) {
|
|
5148
5175
|
const $xeTable = inject('$xeTable', {});
|
|
5149
5176
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
5150
|
-
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();
|
|
5151
5178
|
const headerColumn = ref([]);
|
|
5152
5179
|
const refElem = ref();
|
|
5153
5180
|
const refHeaderScroll = ref();
|
|
@@ -5186,6 +5213,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5186
5213
|
const cellOpts = computeCellOpts.value;
|
|
5187
5214
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5188
5215
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
5216
|
+
const rendererOpts = computeRendererOpts.value;
|
|
5189
5217
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
5190
5218
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
5191
5219
|
const isLastRow = _rowIndex === headerGroups.length - 1;
|
|
@@ -5194,7 +5222,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5194
5222
|
const colid = column.id;
|
|
5195
5223
|
const colRest = fullColumnIdData[colid] || {};
|
|
5196
5224
|
const renderOpts = editRender || cellRender;
|
|
5197
|
-
const compConf = renderOpts ? renderer$8.get(renderOpts.name) : null;
|
|
5225
|
+
const compConf = renderOpts && renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$8.get(renderOpts.name)) : null;
|
|
5198
5226
|
const isColGroup = column.children && column.children.length;
|
|
5199
5227
|
const fixedHiddenColumn = overflowX && !isColGroup && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
5200
5228
|
const cellPadding = getDefaultConfig(headerCellOpts.padding, cellOpts.padding);
|
|
@@ -5373,6 +5401,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5373
5401
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5374
5402
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
5375
5403
|
const floatingFilterOpts = computeFloatingFilterOpts.value;
|
|
5404
|
+
const rendererOpts = computeRendererOpts.value;
|
|
5376
5405
|
const { cellClassName } = floatingFilterOpts;
|
|
5377
5406
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
5378
5407
|
return cols.map((column, $columnIndex) => {
|
|
@@ -5381,8 +5410,8 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5381
5410
|
const colRest = fullColumnIdData[colid] || {};
|
|
5382
5411
|
const renderOpts = editRender || cellRender;
|
|
5383
5412
|
const flSlot = slots ? (slots.floatingFilter || slots['floating-filter']) : null;
|
|
5384
|
-
const compConf = renderOpts ? renderer$8.get(renderOpts.name) : null;
|
|
5385
|
-
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;
|
|
5386
5415
|
const rtFloatingFilter = flCompConf ? flCompConf.renderTableFloatingFilter : null;
|
|
5387
5416
|
const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
5388
5417
|
const isPadding = XEUtils.isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
|
|
@@ -5675,7 +5704,7 @@ var TableFooterComponent = defineVxeComponent({
|
|
|
5675
5704
|
setup(props) {
|
|
5676
5705
|
const $xeTable = inject('$xeTable', {});
|
|
5677
5706
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
5678
|
-
const { computeFooterTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts, computeIsFooterRenderOptimize } = $xeTable.getComputeMaps();
|
|
5707
|
+
const { computeFooterTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts, computeIsFooterRenderOptimize, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
5679
5708
|
const refElem = ref();
|
|
5680
5709
|
const refFooterScroll = ref();
|
|
5681
5710
|
const refFooterTable = ref();
|
|
@@ -5698,12 +5727,13 @@ var TableFooterComponent = defineVxeComponent({
|
|
|
5698
5727
|
const cellOpts = computeCellOpts.value;
|
|
5699
5728
|
const footerCellOpts = computeFooterCellOpts.value;
|
|
5700
5729
|
const currCellHeight = getCalcHeight(footerCellOpts.height) || defaultRowHeight;
|
|
5730
|
+
const rendererOpts = computeRendererOpts.value;
|
|
5701
5731
|
return tableColumn.map((column, $columnIndex) => {
|
|
5702
5732
|
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column;
|
|
5703
5733
|
const colid = column.id;
|
|
5704
5734
|
const colRest = fullColumnIdData[colid] || {};
|
|
5705
5735
|
const renderOpts = editRender || cellRender;
|
|
5706
|
-
const compConf = renderOpts ? renderer$7.get(renderOpts.name) : null;
|
|
5736
|
+
const compConf = renderOpts && renderOpts.name ? (rendererOpts[renderOpts.name] || renderer$7.get(renderOpts.name)) : null;
|
|
5707
5737
|
const showAllTip = footerTooltipOpts.showAll;
|
|
5708
5738
|
const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
5709
5739
|
const cellPadding = getDefaultConfig(footerCellOpts.padding, cellOpts.padding);
|
|
@@ -7599,7 +7629,7 @@ var TableFilterPanelComponent = defineVxeComponent({
|
|
|
7599
7629
|
const xID = XEUtils.uniqueId();
|
|
7600
7630
|
const $xeTable = inject('$xeTable', {});
|
|
7601
7631
|
const { reactData: tableReactData, internalData: tableInternalData, getComputeMaps } = $xeTable;
|
|
7602
|
-
const { computeFilterOpts } = getComputeMaps();
|
|
7632
|
+
const { computeFilterOpts, computeRendererOpts } = getComputeMaps();
|
|
7603
7633
|
const refElem = ref();
|
|
7604
7634
|
const refMaps = {
|
|
7605
7635
|
refElem
|
|
@@ -7782,10 +7812,11 @@ var TableFilterPanelComponent = defineVxeComponent({
|
|
|
7782
7812
|
return [];
|
|
7783
7813
|
}
|
|
7784
7814
|
const filterOpts = computeFilterOpts.value;
|
|
7815
|
+
const rendererOpts = computeRendererOpts.value;
|
|
7785
7816
|
const hasCheckOption = computeHasCheckOption.value;
|
|
7786
7817
|
const { filterRender, filterMultiple } = column;
|
|
7787
7818
|
const { confirmButtonText, resetButtonText, showFooter } = filterOpts;
|
|
7788
|
-
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;
|
|
7789
7820
|
const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate;
|
|
7790
7821
|
let showFlFoot = !!filterMultiple;
|
|
7791
7822
|
if (XEUtils.isBoolean(showFooter)) {
|
|
@@ -7820,8 +7851,9 @@ var TableFilterPanelComponent = defineVxeComponent({
|
|
|
7820
7851
|
if (!column) {
|
|
7821
7852
|
return renderEmptyElement$5($xeFilterPanel);
|
|
7822
7853
|
}
|
|
7854
|
+
const rendererOpts = computeRendererOpts.value;
|
|
7823
7855
|
const filterRender = column ? column.filterRender : null;
|
|
7824
|
-
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;
|
|
7825
7857
|
const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : '';
|
|
7826
7858
|
const params = Object.assign({}, tableInternalData._currFilterParams, { $panel: $xeFilterPanel, $table: $xeTable });
|
|
7827
7859
|
const tableProps = $xeTable.props;
|
|
@@ -8878,7 +8910,7 @@ hooks$7.add('tableFilterModule', {
|
|
|
8878
8910
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
8879
8911
|
const { props, reactData, internalData } = $xeTable;
|
|
8880
8912
|
const { refElem, refTableFilter } = $xeTable.getRefMaps();
|
|
8881
|
-
const { computeFilterOpts, computeMouseOpts } = $xeTable.getComputeMaps();
|
|
8913
|
+
const { computeFilterOpts, computeMouseOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
8882
8914
|
const updatePopupStyle = () => {
|
|
8883
8915
|
const { filterStore } = reactData;
|
|
8884
8916
|
const { elemStore } = internalData;
|
|
@@ -8888,9 +8920,10 @@ hooks$7.add('tableFilterModule', {
|
|
|
8888
8920
|
}
|
|
8889
8921
|
const tableEl = refElem.value;
|
|
8890
8922
|
const filterOpts = computeFilterOpts.value;
|
|
8923
|
+
const rendererOpts = computeRendererOpts.value;
|
|
8891
8924
|
const { maxHeight: customMaxHeight, transfer, zIndex } = filterOpts;
|
|
8892
8925
|
const filterRender = column ? column.filterRender : null;
|
|
8893
|
-
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;
|
|
8894
8927
|
const headerScrollElem = getRefElem(elemStore['main-header-scroll']);
|
|
8895
8928
|
if (!headerScrollElem) {
|
|
8896
8929
|
return nextTick();
|
|
@@ -9026,7 +9059,8 @@ hooks$7.add('tableFilterModule', {
|
|
|
9026
9059
|
if (column) {
|
|
9027
9060
|
const { filters, filterRender } = column;
|
|
9028
9061
|
if (filters) {
|
|
9029
|
-
const
|
|
9062
|
+
const rendererOpts = computeRendererOpts.value;
|
|
9063
|
+
const compConf = isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer$5.get(filterRender.name)) : null;
|
|
9030
9064
|
const frMethod = column.filterResetMethod || (compConf ? (compConf.tableFilterResetMethod || compConf.filterResetMethod) : null);
|
|
9031
9065
|
filters.forEach((item) => {
|
|
9032
9066
|
item._checked = false;
|
|
@@ -9686,7 +9720,7 @@ hooks$5.add('tableEditModule', {
|
|
|
9686
9720
|
setupTable($xeTable) {
|
|
9687
9721
|
const { props, reactData, internalData } = $xeTable;
|
|
9688
9722
|
const { refElem } = $xeTable.getRefMaps();
|
|
9689
|
-
const { computeMouseOpts, computeEditOpts, computeCheckboxOpts, computeTreeOpts, computeValidOpts } = $xeTable.getComputeMaps();
|
|
9723
|
+
const { computeMouseOpts, computeEditOpts, computeCheckboxOpts, computeTreeOpts, computeValidOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
9690
9724
|
const browseObj = XEUtils.browse();
|
|
9691
9725
|
let editMethods = {};
|
|
9692
9726
|
let editPrivateMethods = {};
|
|
@@ -10619,7 +10653,9 @@ hooks$5.add('tableEditModule', {
|
|
|
10619
10653
|
const { editRender } = column;
|
|
10620
10654
|
const editOpts = computeEditOpts.value;
|
|
10621
10655
|
if (editConfig && isEnableConf(editRender)) {
|
|
10622
|
-
const
|
|
10656
|
+
const rendererOpts = computeRendererOpts.value;
|
|
10657
|
+
const renderName = editRender.name;
|
|
10658
|
+
const compRender = renderName ? (rendererOpts[renderName] || renderer$4.get(renderName)) : null;
|
|
10623
10659
|
let autoFocus = editRender.autofocus || editRender.autoFocus;
|
|
10624
10660
|
let autoSelect = editRender.autoSelect || editRender.autoselect;
|
|
10625
10661
|
let inputElem = null;
|
|
@@ -11052,7 +11088,7 @@ const tableExportMethodKeys = ['exportData', 'importByFile', 'importData', 'save
|
|
|
11052
11088
|
hooks$4.add('tableExportModule', {
|
|
11053
11089
|
setupTable($xeTable) {
|
|
11054
11090
|
const { props, reactData, internalData } = $xeTable;
|
|
11055
|
-
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();
|
|
11056
11092
|
const getSeq = (cellValue, row, $rowIndex, column, $columnIndex) => {
|
|
11057
11093
|
const seqOpts = computeSeqOpts.value;
|
|
11058
11094
|
const seqMd = seqOpts.seqMethod || column.seqMethod;
|
|
@@ -11086,12 +11122,13 @@ hooks$4.add('tableExportModule', {
|
|
|
11086
11122
|
const { isTreeAllExpanded, isRowGroupAllExpanded, mode: expMode } = opts;
|
|
11087
11123
|
const { treeConfig } = props;
|
|
11088
11124
|
const { isRowGroupStatus } = reactData;
|
|
11089
|
-
const { fullColumnFieldData } = internalData;
|
|
11125
|
+
const { fullColumnFieldData, fullAllDataRowIdData } = internalData;
|
|
11090
11126
|
const radioOpts = computeRadioOpts.value;
|
|
11091
11127
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
11092
11128
|
const treeOpts = computeTreeOpts.value;
|
|
11093
11129
|
const columnOpts = computeColumnOpts.value;
|
|
11094
11130
|
const aggregateOpts = computeAggregateOpts.value;
|
|
11131
|
+
const rendererOpts = computeRendererOpts.value;
|
|
11095
11132
|
if (!htmlCellElem) {
|
|
11096
11133
|
htmlCellElem = document.createElement('div');
|
|
11097
11134
|
}
|
|
@@ -11124,7 +11161,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11124
11161
|
const renderOpts = editRender || cellRender;
|
|
11125
11162
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
11126
11163
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
11127
|
-
const compConf = renderer$3.get(renderOpts.name);
|
|
11164
|
+
const compConf = rendererOpts[renderOpts.name] || renderer$3.get(renderOpts.name);
|
|
11128
11165
|
if (compConf) {
|
|
11129
11166
|
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
|
|
11130
11167
|
}
|
|
@@ -11242,6 +11279,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11242
11279
|
}
|
|
11243
11280
|
if (treeConfig) {
|
|
11244
11281
|
// 如果是树结构
|
|
11282
|
+
const { seqMode } = treeOpts;
|
|
11245
11283
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
11246
11284
|
const rest = [];
|
|
11247
11285
|
const expandMaps = {};
|
|
@@ -11262,12 +11300,13 @@ hooks$4.add('tableExportModule', {
|
|
|
11262
11300
|
_hasChild: hasRowChild,
|
|
11263
11301
|
_expand: hasRowChild && $xeTable.isTreeExpandByRow(row)
|
|
11264
11302
|
};
|
|
11303
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
11265
11304
|
columns.forEach((column, $columnIndex) => {
|
|
11266
11305
|
let cellValue = '';
|
|
11267
11306
|
const renderOpts = column.editRender || column.cellRender;
|
|
11268
11307
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
11269
11308
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
11270
|
-
const compConf = renderer$3.get(renderOpts.name);
|
|
11309
|
+
const compConf = rendererOpts[renderOpts.name] || renderer$3.get(renderOpts.name);
|
|
11271
11310
|
if (compConf) {
|
|
11272
11311
|
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
|
|
11273
11312
|
}
|
|
@@ -11281,7 +11320,10 @@ hooks$4.add('tableExportModule', {
|
|
|
11281
11320
|
else {
|
|
11282
11321
|
switch (column.type) {
|
|
11283
11322
|
case 'seq': {
|
|
11284
|
-
|
|
11323
|
+
let seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
11324
|
+
if (seqMode === 'increasing') {
|
|
11325
|
+
seqVal = rowRest ? (rowRest._index + 1) : -1;
|
|
11326
|
+
}
|
|
11285
11327
|
cellValue = expMode === 'all' ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
|
|
11286
11328
|
break;
|
|
11287
11329
|
}
|
|
@@ -11334,7 +11376,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11334
11376
|
const renderOpts = column.editRender || column.cellRender;
|
|
11335
11377
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
11336
11378
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
11337
|
-
const compConf = renderer$3.get(renderOpts.name);
|
|
11379
|
+
const compConf = rendererOpts[renderOpts.name] || renderer$3.get(renderOpts.name);
|
|
11338
11380
|
if (compConf) {
|
|
11339
11381
|
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
|
|
11340
11382
|
}
|
|
@@ -11395,10 +11437,11 @@ hooks$4.add('tableExportModule', {
|
|
|
11395
11437
|
};
|
|
11396
11438
|
const getFooterCellValue = (opts, row, column) => {
|
|
11397
11439
|
const columnOpts = computeColumnOpts.value;
|
|
11440
|
+
const rendererOpts = computeRendererOpts.value;
|
|
11398
11441
|
const renderOpts = column.editRender || column.cellRender;
|
|
11399
11442
|
let footLabelMethod = column.footerExportMethod;
|
|
11400
11443
|
if (!footLabelMethod && renderOpts && renderOpts.name) {
|
|
11401
|
-
const compConf = renderer$3.get(renderOpts.name);
|
|
11444
|
+
const compConf = rendererOpts[renderOpts.name] || renderer$3.get(renderOpts.name);
|
|
11402
11445
|
if (compConf) {
|
|
11403
11446
|
footLabelMethod = compConf.tableFooterExportMethod || compConf.footerExportMethod;
|
|
11404
11447
|
}
|
|
@@ -16568,6 +16611,9 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
16568
16611
|
const combineSplitterResizeFlag = computed(() => {
|
|
16569
16612
|
return $xeSplitter ? $xeSplitter.reactData.resizeFlag : null;
|
|
16570
16613
|
});
|
|
16614
|
+
const computeRendererOpts = computed(() => {
|
|
16615
|
+
return Object.assign({}, getConfig$2().table.rendererConfig, props.rendererConfig);
|
|
16616
|
+
});
|
|
16571
16617
|
const refMaps = {
|
|
16572
16618
|
refElem,
|
|
16573
16619
|
refTooltip,
|
|
@@ -16674,6 +16720,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
16674
16720
|
computeRowGroupColumns,
|
|
16675
16721
|
computeAggFuncColumns,
|
|
16676
16722
|
computeUndoRedoHistoryOpts,
|
|
16723
|
+
computeRendererOpts,
|
|
16677
16724
|
computeFNROpts,
|
|
16678
16725
|
computeSXOpts,
|
|
16679
16726
|
computeSYOpts
|
|
@@ -18109,6 +18156,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18109
18156
|
const filterOpts = computeFilterOpts.value;
|
|
18110
18157
|
const sortOpts = computeSortOpts.value;
|
|
18111
18158
|
const aggregateOpts = computeAggregateOpts.value;
|
|
18159
|
+
const rendererOpts = computeRendererOpts.value;
|
|
18112
18160
|
const treeOpts = computeTreeOpts.value;
|
|
18113
18161
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
18114
18162
|
const { transform, rowField, parentField, mapChildrenField } = treeOpts;
|
|
@@ -18148,7 +18196,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18148
18196
|
const handleFilter = (row) => {
|
|
18149
18197
|
return filterColumns.every(({ column, valueList, itemList }) => {
|
|
18150
18198
|
const { filterMethod, filterRender } = column;
|
|
18151
|
-
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;
|
|
18152
18200
|
const compFilterMethod = compConf ? (compConf.tableFilterMethod || compConf.filterMethod) : null;
|
|
18153
18201
|
const tdFilterMethod = compConf ? (compConf.tableFilterDefaultMethod || compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null;
|
|
18154
18202
|
const cellValue = getCellValue(row, column);
|
|
@@ -21259,6 +21307,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
21259
21307
|
}
|
|
21260
21308
|
const { editConfig } = props;
|
|
21261
21309
|
const { formatter, editRender, cellRender } = column;
|
|
21310
|
+
const rendererOpts = computeRendererOpts.value;
|
|
21262
21311
|
let etOpSize = null;
|
|
21263
21312
|
let etOgSize = null;
|
|
21264
21313
|
let clOpSize = null;
|
|
@@ -21271,13 +21320,17 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
21271
21320
|
clOpSize = cellRender.options ? cellRender.options.length : 0;
|
|
21272
21321
|
clOgSize = cellRender.optionGroups ? cellRender.optionGroups.length : 0;
|
|
21273
21322
|
}
|
|
21274
|
-
|
|
21275
|
-
const
|
|
21276
|
-
const
|
|
21277
|
-
|
|
21323
|
+
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
21324
|
+
const editRenderOpts = formatter ? null : (isEnableEdit && isEnableConf(editRender) ? editRender : null);
|
|
21325
|
+
const cellRenderOpts = formatter ? null : (isEnableConf(cellRender) ? cellRender : null);
|
|
21326
|
+
// formatter > cellRender.tableCellFormatter > editRender.tableCellFormatter
|
|
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;
|
|
21329
|
+
const cellDfFormatter = cellCompConf ? cellCompConf.tableCellFormatter : null;
|
|
21330
|
+
const editDfFormatter = editCompConf ? editCompConf.tableCellFormatter : null;
|
|
21278
21331
|
const cellValue = getCellValue(row, column);
|
|
21279
21332
|
let cellLabel = cellValue;
|
|
21280
|
-
if (formatter ||
|
|
21333
|
+
if (formatter || cellDfFormatter || editDfFormatter) {
|
|
21281
21334
|
let formatData;
|
|
21282
21335
|
const { fullAllDataRowIdData } = internalData;
|
|
21283
21336
|
const rowid = getRowid($xeTable, row);
|
|
@@ -21318,8 +21371,11 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
21318
21371
|
cellLabel = formatter(formatParams);
|
|
21319
21372
|
}
|
|
21320
21373
|
}
|
|
21321
|
-
else if (
|
|
21322
|
-
cellLabel =
|
|
21374
|
+
else if (cellRenderOpts && cellDfFormatter) {
|
|
21375
|
+
cellLabel = cellDfFormatter(cellRenderOpts, formatParams);
|
|
21376
|
+
}
|
|
21377
|
+
else if (editRenderOpts && editDfFormatter) {
|
|
21378
|
+
cellLabel = editDfFormatter(editRenderOpts, formatParams);
|
|
21323
21379
|
}
|
|
21324
21380
|
if (formatData) {
|
|
21325
21381
|
const ftValue = [cellValue, etOpSize, etOgSize, clOpSize, clOgSize];
|
|
@@ -26041,8 +26097,9 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
26041
26097
|
if (column) {
|
|
26042
26098
|
const { filterStore } = reactData;
|
|
26043
26099
|
const { filterRender, filters } = column;
|
|
26100
|
+
const rendererOpts = computeRendererOpts.value;
|
|
26044
26101
|
const filterOptions = filters || [];
|
|
26045
|
-
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;
|
|
26046
26103
|
const frMethod = column.filterRecoverMethod || (compConf ? (compConf.tableFilterRecoverMethod || compConf.filterRecoverMethod) : null);
|
|
26047
26104
|
filterStore.column = column;
|
|
26048
26105
|
// 复原状态
|
|
@@ -29335,7 +29392,8 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29335
29392
|
return emptySlot(emptyParams);
|
|
29336
29393
|
}
|
|
29337
29394
|
else {
|
|
29338
|
-
const
|
|
29395
|
+
const rendererOpts = computeRendererOpts.value;
|
|
29396
|
+
const compConf = emptyOpts.name ? (rendererOpts[emptyOpts.name] || renderer$1.get(emptyOpts.name)) : null;
|
|
29339
29397
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null;
|
|
29340
29398
|
if (rtEmptyView) {
|
|
29341
29399
|
return getSlotVNs(rtEmptyView(emptyOpts, emptyParams));
|
|
@@ -31021,10 +31079,12 @@ var VxeToolbarComponent = defineVxeComponent({
|
|
|
31021
31079
|
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix'];
|
|
31022
31080
|
const btnVNs = [];
|
|
31023
31081
|
if (buttons) {
|
|
31082
|
+
const { computeRendererOpts } = $table ? $table.getComputeMaps() : {};
|
|
31083
|
+
const rendererOpts = (computeRendererOpts ? computeRendererOpts.value : null) || {};
|
|
31024
31084
|
buttons.forEach((item, index) => {
|
|
31025
31085
|
const { dropdowns, buttonRender } = item;
|
|
31026
31086
|
if (item.visible !== false) {
|
|
31027
|
-
const compConf = buttonRender ? renderer.get(buttonRender.name) : null;
|
|
31087
|
+
const compConf = buttonRender && buttonRender.name ? (rendererOpts[buttonRender.name] || renderer.get(buttonRender.name)) : null;
|
|
31028
31088
|
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
31029
31089
|
const toolbarButtonClassName = compConf.toolbarButtonClassName;
|
|
31030
31090
|
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table, button: item };
|
|
@@ -31072,16 +31132,17 @@ var VxeToolbarComponent = defineVxeComponent({
|
|
|
31072
31132
|
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix'];
|
|
31073
31133
|
const btnVNs = [];
|
|
31074
31134
|
if (tools) {
|
|
31135
|
+
const { computeRendererOpts } = $table ? $table.getComputeMaps() : {};
|
|
31136
|
+
const rendererOpts = (computeRendererOpts ? computeRendererOpts.value : null) || {};
|
|
31075
31137
|
tools.forEach((item, tIndex) => {
|
|
31076
31138
|
const { dropdowns, toolRender } = item;
|
|
31077
31139
|
if (item.visible !== false) {
|
|
31078
|
-
const
|
|
31079
|
-
const compConf = toolRender ? renderer.get(rdName) : null;
|
|
31140
|
+
const compConf = toolRender && toolRender.name ? (rendererOpts[toolRender.name] || renderer.get(toolRender.name)) : null;
|
|
31080
31141
|
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
31081
31142
|
const toolbarToolClassName = compConf.toolbarToolClassName;
|
|
31082
31143
|
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table, tool: item };
|
|
31083
31144
|
btnVNs.push(h('span', {
|
|
31084
|
-
key:
|
|
31145
|
+
key: tIndex,
|
|
31085
31146
|
class: ['vxe-tool--item', toolbarToolClassName ? (XEUtils.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName) : '']
|
|
31086
31147
|
}, getSlotVNs(compConf.renderToolbarTool(toolRender, params))));
|
|
31087
31148
|
}
|
|
@@ -32696,6 +32757,10 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32696
32757
|
return handleZoom();
|
|
32697
32758
|
},
|
|
32698
32759
|
getFormData,
|
|
32760
|
+
/**
|
|
32761
|
+
* 已废弃,被 getFormFlatItems 替换
|
|
32762
|
+
* @deprecated
|
|
32763
|
+
*/
|
|
32699
32764
|
getFormItems(itemIndex) {
|
|
32700
32765
|
const formOpts = computeFormOpts.value;
|
|
32701
32766
|
const { formConfig } = props;
|
|
@@ -32704,8 +32769,30 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32704
32769
|
XEUtils.eachTree(formConfig && isEnableConf(formOpts) && items ? items : [], item => {
|
|
32705
32770
|
itemList.push(item);
|
|
32706
32771
|
}, { children: 'children' });
|
|
32772
|
+
// errLog('vxe.error.delFunc', ['getFormItems', 'getFormFlatItems'])
|
|
32707
32773
|
return XEUtils.isUndefined(itemIndex) ? itemList : itemList[itemIndex];
|
|
32708
32774
|
},
|
|
32775
|
+
getFormFlatItems() {
|
|
32776
|
+
const $form = refForm.value;
|
|
32777
|
+
if ($form) {
|
|
32778
|
+
return $form.getFlatItems();
|
|
32779
|
+
}
|
|
32780
|
+
return [];
|
|
32781
|
+
},
|
|
32782
|
+
getFormNestedItems() {
|
|
32783
|
+
const $form = refForm.value;
|
|
32784
|
+
if ($form) {
|
|
32785
|
+
return $form.getNestedItems();
|
|
32786
|
+
}
|
|
32787
|
+
return [];
|
|
32788
|
+
},
|
|
32789
|
+
getFormItemByField(field) {
|
|
32790
|
+
const $form = refForm.value;
|
|
32791
|
+
if ($form) {
|
|
32792
|
+
return $form.getItemByField(field);
|
|
32793
|
+
}
|
|
32794
|
+
return null;
|
|
32795
|
+
},
|
|
32709
32796
|
resetForm() {
|
|
32710
32797
|
const $form = refForm.value;
|
|
32711
32798
|
if ($form) {
|