vxe-table 4.22.0-beta.0 → 4.22.0
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 +82 -43
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +2 -2
- 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/grid/src/grid.js +2 -2
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +100 -47
- 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/grid/src/grid.ts +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.1789914604819.ttf} +0 -0
- /package/es/{iconfont.1789131679524.woff → iconfont.1789914604819.woff} +0 -0
- /package/es/{iconfont.1789131679524.woff2 → iconfont.1789914604819.woff2} +0 -0
- /package/lib/{iconfont.1789131679524.ttf → iconfont.1789914604819.ttf} +0 -0
- /package/lib/{iconfont.1789131679524.woff → iconfont.1789914604819.woff} +0 -0
- /package/lib/{iconfont.1789131679524.woff2 → iconfont.1789914604819.woff2} +0 -0
|
@@ -811,6 +811,10 @@ export default defineVxeComponent({
|
|
|
811
811
|
return $xeSplitter ? $xeSplitter.reactData.resizeFlag : null
|
|
812
812
|
})
|
|
813
813
|
|
|
814
|
+
const computeRendererOpts = computed(() => {
|
|
815
|
+
return Object.assign({}, getConfig().table.rendererConfig, props.rendererConfig)
|
|
816
|
+
})
|
|
817
|
+
|
|
814
818
|
const refMaps: VxeTablePrivateRef = {
|
|
815
819
|
refElem,
|
|
816
820
|
refTooltip,
|
|
@@ -918,6 +922,7 @@ export default defineVxeComponent({
|
|
|
918
922
|
computeRowGroupColumns,
|
|
919
923
|
computeAggFuncColumns,
|
|
920
924
|
computeUndoRedoHistoryOpts,
|
|
925
|
+
computeRendererOpts,
|
|
921
926
|
|
|
922
927
|
computeFNROpts,
|
|
923
928
|
computeSXOpts,
|
|
@@ -2384,6 +2389,7 @@ export default defineVxeComponent({
|
|
|
2384
2389
|
const filterOpts = computeFilterOpts.value
|
|
2385
2390
|
const sortOpts = computeSortOpts.value
|
|
2386
2391
|
const aggregateOpts = computeAggregateOpts.value
|
|
2392
|
+
const rendererOpts = computeRendererOpts.value
|
|
2387
2393
|
const treeOpts = computeTreeOpts.value
|
|
2388
2394
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
2389
2395
|
const { transform, rowField, parentField, mapChildrenField } = treeOpts
|
|
@@ -2428,7 +2434,7 @@ export default defineVxeComponent({
|
|
|
2428
2434
|
const handleFilter = (row: any) => {
|
|
2429
2435
|
return filterColumns.every(({ column, valueList, itemList }) => {
|
|
2430
2436
|
const { filterMethod, filterRender } = column
|
|
2431
|
-
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
|
|
2437
|
+
const compConf = isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer.get(filterRender.name)) : null
|
|
2432
2438
|
const compFilterMethod = compConf ? (compConf.tableFilterMethod || compConf.filterMethod) : null
|
|
2433
2439
|
const tdFilterMethod = compConf ? (compConf.tableFilterDefaultMethod || compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null
|
|
2434
2440
|
const cellValue = getCellValue(row, column)
|
|
@@ -5595,6 +5601,7 @@ export default defineVxeComponent({
|
|
|
5595
5601
|
}
|
|
5596
5602
|
const { editConfig } = props
|
|
5597
5603
|
const { formatter, editRender, cellRender } = column
|
|
5604
|
+
const rendererOpts = computeRendererOpts.value
|
|
5598
5605
|
let etOpSize = null
|
|
5599
5606
|
let etOgSize = null
|
|
5600
5607
|
let clOpSize = null
|
|
@@ -5611,8 +5618,8 @@ export default defineVxeComponent({
|
|
|
5611
5618
|
const editRenderOpts = formatter ? null : (isEnableEdit && isEnableConf(editRender) ? editRender : null)
|
|
5612
5619
|
const cellRenderOpts = formatter ? null : (isEnableConf(cellRender) ? cellRender : null)
|
|
5613
5620
|
// formatter > cellRender.tableCellFormatter > editRender.tableCellFormatter
|
|
5614
|
-
const cellCompConf = cellRenderOpts ? renderer.get(cellRenderOpts.name) : null
|
|
5615
|
-
const editCompConf = editRenderOpts ? renderer.get(editRenderOpts.name) : null
|
|
5621
|
+
const cellCompConf = cellRenderOpts && cellRenderOpts.name ? (rendererOpts[cellRenderOpts.name] || renderer.get(cellRenderOpts.name)) : null
|
|
5622
|
+
const editCompConf = editRenderOpts && editRenderOpts.name ? (rendererOpts[editRenderOpts.name] || renderer.get(editRenderOpts.name)) : null
|
|
5616
5623
|
const cellDfFormatter = cellCompConf ? cellCompConf.tableCellFormatter : null
|
|
5617
5624
|
const editDfFormatter = editCompConf ? editCompConf.tableCellFormatter : null
|
|
5618
5625
|
const cellValue = getCellValue(row, column)
|
|
@@ -10372,8 +10379,9 @@ export default defineVxeComponent({
|
|
|
10372
10379
|
if (column) {
|
|
10373
10380
|
const { filterStore } = reactData
|
|
10374
10381
|
const { filterRender, filters } = column
|
|
10382
|
+
const rendererOpts = computeRendererOpts.value
|
|
10375
10383
|
const filterOptions = filters || []
|
|
10376
|
-
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
|
|
10384
|
+
const compConf = isEnableConf(filterRender) && filterRender.name ? (rendererOpts[filterRender.name] || renderer.get(filterRender.name)) : null
|
|
10377
10385
|
const frMethod = column.filterRecoverMethod || (compConf ? (compConf.tableFilterRecoverMethod || compConf.filterRecoverMethod) : null)
|
|
10378
10386
|
filterStore.column = column
|
|
10379
10387
|
// 复原状态
|
|
@@ -13684,7 +13692,8 @@ export default defineVxeComponent({
|
|
|
13684
13692
|
if (emptySlot) {
|
|
13685
13693
|
return emptySlot(emptyParams)
|
|
13686
13694
|
} else {
|
|
13687
|
-
const
|
|
13695
|
+
const rendererOpts = computeRendererOpts.value
|
|
13696
|
+
const compConf = emptyOpts.name ? (rendererOpts[emptyOpts.name] || renderer.get(emptyOpts.name)) : null
|
|
13688
13697
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null
|
|
13689
13698
|
if (rtEmptyView) {
|
|
13690
13699
|
return getSlotVNs(rtEmptyView(emptyOpts, emptyParams))
|
|
@@ -409,10 +409,12 @@ export default defineVxeComponent({
|
|
|
409
409
|
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix']
|
|
410
410
|
const btnVNs: VxeComponentSlotType[] = []
|
|
411
411
|
if (buttons) {
|
|
412
|
+
const { computeRendererOpts } = $table ? $table.getComputeMaps() : {}
|
|
413
|
+
const rendererOpts = (computeRendererOpts ? computeRendererOpts.value : null) || {}
|
|
412
414
|
buttons.forEach((item, index) => {
|
|
413
415
|
const { dropdowns, buttonRender } = item
|
|
414
416
|
if (item.visible !== false) {
|
|
415
|
-
const compConf = buttonRender ? renderer.get(buttonRender.name) : null
|
|
417
|
+
const compConf = buttonRender && buttonRender.name ? (rendererOpts[buttonRender.name] || renderer.get(buttonRender.name)) : null
|
|
416
418
|
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
417
419
|
const toolbarButtonClassName = compConf.toolbarButtonClassName
|
|
418
420
|
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, button: item }
|
|
@@ -468,17 +470,18 @@ export default defineVxeComponent({
|
|
|
468
470
|
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix']
|
|
469
471
|
const btnVNs: VxeComponentSlotType[] = []
|
|
470
472
|
if (tools) {
|
|
473
|
+
const { computeRendererOpts } = $table ? $table.getComputeMaps() : {}
|
|
474
|
+
const rendererOpts = (computeRendererOpts ? computeRendererOpts.value : null) || {}
|
|
471
475
|
tools.forEach((item, tIndex) => {
|
|
472
476
|
const { dropdowns, toolRender } = item
|
|
473
477
|
if (item.visible !== false) {
|
|
474
|
-
const
|
|
475
|
-
const compConf = toolRender ? renderer.get(rdName) : null
|
|
478
|
+
const compConf = toolRender && toolRender.name ? (rendererOpts[toolRender.name] || renderer.get(toolRender.name)) : null
|
|
476
479
|
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
477
480
|
const toolbarToolClassName = compConf.toolbarToolClassName
|
|
478
481
|
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, tool: item }
|
|
479
482
|
btnVNs.push(
|
|
480
483
|
h('span', {
|
|
481
|
-
key:
|
|
484
|
+
key: tIndex,
|
|
482
485
|
class: ['vxe-tool--item', toolbarToolClassName ? (XEUtils.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName) : '']
|
|
483
486
|
}, getSlotVNs(compConf.renderToolbarTool(toolRender, params)))
|
|
484
487
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|