vxe-table 4.7.83 → 4.7.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/grid/src/grid.js +5 -5
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/render/index.js +10 -0
- package/es/table/src/table.js +255 -261
- package/es/table/style.css +1 -1
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +6 -6
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +1 -1
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/grid/src/grid.js +5 -5
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +294 -282
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/render/index.js +15 -0
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +260 -266
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +6 -6
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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 +1 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +5 -5
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/render/index.ts +14 -0
- package/packages/table/src/table.ts +261 -267
- package/packages/toolbar/src/toolbar.ts +6 -6
- package/styles/components/table.scss +5 -1
- /package/es/{iconfont.1727355554097.ttf → iconfont.1727599604340.ttf} +0 -0
- /package/es/{iconfont.1727355554097.woff → iconfont.1727599604340.woff} +0 -0
- /package/es/{iconfont.1727355554097.woff2 → iconfont.1727599604340.woff2} +0 -0
- /package/lib/{iconfont.1727355554097.ttf → iconfont.1727599604340.ttf} +0 -0
- /package/lib/{iconfont.1727355554097.woff → iconfont.1727599604340.woff} +0 -0
- /package/lib/{iconfont.1727355554097.woff2 → iconfont.1727599604340.woff2} +0 -0
|
@@ -382,15 +382,15 @@ export default defineComponent({
|
|
|
382
382
|
})
|
|
383
383
|
|
|
384
384
|
const computeValidOpts = computed(() => {
|
|
385
|
-
return Object.assign({}, getConfig().table.validConfig, props.validConfig) as VxeTablePropTypes.ValidOpts
|
|
385
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.validConfig, true), props.validConfig) as VxeTablePropTypes.ValidOpts
|
|
386
386
|
})
|
|
387
387
|
|
|
388
388
|
const computeSXOpts = computed(() => {
|
|
389
|
-
return Object.assign({}, getConfig().table.scrollX, props.scrollX) as VxeTablePropTypes.SXOpts
|
|
389
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), props.scrollX) as VxeTablePropTypes.SXOpts
|
|
390
390
|
})
|
|
391
391
|
|
|
392
392
|
const computeSYOpts = computed(() => {
|
|
393
|
-
return Object.assign({}, getConfig().table.scrollY, props.scrollY) as VxeTablePropTypes.SYOpts
|
|
393
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), props.scrollY) as VxeTablePropTypes.SYOpts
|
|
394
394
|
})
|
|
395
395
|
|
|
396
396
|
const computeRowHeightMaps = computed(() => {
|
|
@@ -403,37 +403,37 @@ export default defineComponent({
|
|
|
403
403
|
})
|
|
404
404
|
|
|
405
405
|
const computeColumnOpts = computed(() => {
|
|
406
|
-
return Object.assign({}, getConfig().table.columnConfig, props.columnConfig) as VxeTablePropTypes.ColumnOpts
|
|
406
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), props.columnConfig) as VxeTablePropTypes.ColumnOpts
|
|
407
407
|
})
|
|
408
408
|
|
|
409
409
|
const computeRowOpts = computed(() => {
|
|
410
|
-
return Object.assign({}, getConfig().table.rowConfig, props.rowConfig) as VxeTablePropTypes.RowOpts
|
|
410
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), props.rowConfig) as VxeTablePropTypes.RowOpts
|
|
411
411
|
})
|
|
412
412
|
|
|
413
413
|
const computeResizeOpts = computed(() => {
|
|
414
|
-
return Object.assign({}, getConfig().table.resizeConfig, props.resizeConfig) as VxeTablePropTypes.ResizeOpts
|
|
414
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), props.resizeConfig) as VxeTablePropTypes.ResizeOpts
|
|
415
415
|
})
|
|
416
416
|
|
|
417
417
|
const computeResizableOpts = computed(() => {
|
|
418
|
-
return Object.assign({}, getConfig().table.resizableConfig, props.resizableConfig) as VxeTablePropTypes.ResizableOpts
|
|
418
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), props.resizableConfig) as VxeTablePropTypes.ResizableOpts
|
|
419
419
|
})
|
|
420
420
|
|
|
421
421
|
const computeSeqOpts = computed(() => {
|
|
422
|
-
return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, props.seqConfig) as VxeTablePropTypes.SeqOpts
|
|
422
|
+
return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), props.seqConfig) as VxeTablePropTypes.SeqOpts
|
|
423
423
|
})
|
|
424
424
|
|
|
425
425
|
const computeRadioOpts = computed(() => {
|
|
426
|
-
return Object.assign({}, getConfig().table.radioConfig, props.radioConfig) as VxeTablePropTypes.RadioOpts
|
|
426
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), props.radioConfig) as VxeTablePropTypes.RadioOpts
|
|
427
427
|
})
|
|
428
428
|
|
|
429
429
|
const computeCheckboxOpts = computed(() => {
|
|
430
|
-
return Object.assign({}, getConfig().table.checkboxConfig, props.checkboxConfig) as VxeTablePropTypes.CheckboxOpts
|
|
430
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), props.checkboxConfig) as VxeTablePropTypes.CheckboxOpts
|
|
431
431
|
})
|
|
432
432
|
|
|
433
433
|
let computeTooltipOpts = ref() as ComputedRef<VxeTablePropTypes.TooltipOpts>
|
|
434
434
|
|
|
435
435
|
computeTooltipOpts = computed(() => {
|
|
436
|
-
return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, props.tooltipConfig)
|
|
436
|
+
return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), props.tooltipConfig)
|
|
437
437
|
})
|
|
438
438
|
|
|
439
439
|
const computeTipConfig = computed(() => {
|
|
@@ -449,39 +449,39 @@ export default defineComponent({
|
|
|
449
449
|
})
|
|
450
450
|
|
|
451
451
|
const computeEditOpts = computed(() => {
|
|
452
|
-
return Object.assign({}, getConfig().table.editConfig, props.editConfig) as VxeTablePropTypes.EditOpts
|
|
452
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), props.editConfig) as VxeTablePropTypes.EditOpts
|
|
453
453
|
})
|
|
454
454
|
|
|
455
455
|
const computeSortOpts = computed(() => {
|
|
456
|
-
return Object.assign({ orders: ['asc', 'desc', null] }, getConfig().table.sortConfig, props.sortConfig) as VxeTablePropTypes.SortOpts
|
|
456
|
+
return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), props.sortConfig) as VxeTablePropTypes.SortOpts
|
|
457
457
|
})
|
|
458
458
|
|
|
459
459
|
const computeFilterOpts = computed(() => {
|
|
460
|
-
return Object.assign({}, getConfig().table.filterConfig, props.filterConfig) as VxeTablePropTypes.FilterOpts
|
|
460
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), props.filterConfig) as VxeTablePropTypes.FilterOpts
|
|
461
461
|
})
|
|
462
462
|
|
|
463
463
|
const computeMouseOpts = computed(() => {
|
|
464
|
-
return Object.assign({}, getConfig().table.mouseConfig, props.mouseConfig) as VxeTablePropTypes.MouseOpts
|
|
464
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), props.mouseConfig) as VxeTablePropTypes.MouseOpts
|
|
465
465
|
})
|
|
466
466
|
|
|
467
467
|
const computeAreaOpts = computed(() => {
|
|
468
|
-
return Object.assign({}, getConfig().table.areaConfig, props.areaConfig) as VxeTablePropTypes.AreaOpts
|
|
468
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), props.areaConfig) as VxeTablePropTypes.AreaOpts
|
|
469
469
|
})
|
|
470
470
|
|
|
471
471
|
const computeKeyboardOpts = computed(() => {
|
|
472
|
-
return Object.assign({}, getConfig().table.keyboardConfig, props.keyboardConfig) as VxeTablePropTypes.KeyboardOpts
|
|
472
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), props.keyboardConfig) as VxeTablePropTypes.KeyboardOpts
|
|
473
473
|
})
|
|
474
474
|
|
|
475
475
|
const computeClipOpts = computed(() => {
|
|
476
|
-
return Object.assign({}, getConfig().table.clipConfig, props.clipConfig)
|
|
476
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), props.clipConfig)
|
|
477
477
|
})
|
|
478
478
|
|
|
479
479
|
const computeFNROpts = computed(() => {
|
|
480
|
-
return Object.assign({}, getConfig().table.fnrConfig, props.fnrConfig) as VxeTablePropTypes.FNROpts
|
|
480
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), props.fnrConfig) as VxeTablePropTypes.FNROpts
|
|
481
481
|
})
|
|
482
482
|
|
|
483
483
|
const computeMenuOpts = computed(() => {
|
|
484
|
-
return Object.assign({}, getConfig().table.menuConfig, props.menuConfig) as VxeTablePropTypes.MenuOpts
|
|
484
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), props.menuConfig) as VxeTablePropTypes.MenuOpts
|
|
485
485
|
})
|
|
486
486
|
|
|
487
487
|
const computeHeaderMenu = computed(() => {
|
|
@@ -522,31 +522,31 @@ export default defineComponent({
|
|
|
522
522
|
})
|
|
523
523
|
|
|
524
524
|
const computeExportOpts = computed(() => {
|
|
525
|
-
return Object.assign({}, getConfig().table.exportConfig, props.exportConfig) as VxeTablePropTypes.ExportOpts
|
|
525
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), props.exportConfig) as VxeTablePropTypes.ExportOpts
|
|
526
526
|
})
|
|
527
527
|
|
|
528
528
|
const computeImportOpts = computed(() => {
|
|
529
|
-
return Object.assign({}, getConfig().table.importConfig, props.importConfig) as VxeTablePropTypes.ImportOpts
|
|
529
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), props.importConfig) as VxeTablePropTypes.ImportOpts
|
|
530
530
|
})
|
|
531
531
|
|
|
532
532
|
const computePrintOpts = computed(() => {
|
|
533
|
-
return Object.assign({}, getConfig().table.printConfig, props.printConfig) as VxeTablePropTypes.PrintOpts
|
|
533
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), props.printConfig) as VxeTablePropTypes.PrintOpts
|
|
534
534
|
})
|
|
535
535
|
|
|
536
536
|
const computeExpandOpts = computed(() => {
|
|
537
|
-
return Object.assign({}, getConfig().table.expandConfig, props.expandConfig) as VxeTablePropTypes.ExpandOpts
|
|
537
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), props.expandConfig) as VxeTablePropTypes.ExpandOpts
|
|
538
538
|
})
|
|
539
539
|
|
|
540
540
|
const computeTreeOpts = computed(() => {
|
|
541
|
-
return Object.assign({}, getConfig().table.treeConfig, props.treeConfig) as VxeTablePropTypes.TreeOpts
|
|
541
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), props.treeConfig) as VxeTablePropTypes.TreeOpts
|
|
542
542
|
})
|
|
543
543
|
|
|
544
544
|
const computeEmptyOpts = computed(() => {
|
|
545
|
-
return Object.assign({}, getConfig().table.emptyRender, props.emptyRender) as VxeTablePropTypes.EmptyOpts
|
|
545
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), props.emptyRender) as VxeTablePropTypes.EmptyOpts
|
|
546
546
|
})
|
|
547
547
|
|
|
548
548
|
const computeLoadingOpts = computed(() => {
|
|
549
|
-
return Object.assign({}, getConfig().table.loadingConfig, props.loadingConfig) as VxeTablePropTypes.LoadingOpts
|
|
549
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), props.loadingConfig) as VxeTablePropTypes.LoadingOpts
|
|
550
550
|
})
|
|
551
551
|
|
|
552
552
|
const computeCellOffsetWidth = computed(() => {
|
|
@@ -554,7 +554,7 @@ export default defineComponent({
|
|
|
554
554
|
})
|
|
555
555
|
|
|
556
556
|
const computeCustomOpts = computed(() => {
|
|
557
|
-
return Object.assign({}, getConfig().table.customConfig, props.customConfig)
|
|
557
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), props.customConfig)
|
|
558
558
|
})
|
|
559
559
|
|
|
560
560
|
const computeAutoWidthColumnList = computed(() => {
|
|
@@ -5204,12 +5204,6 @@ export default defineComponent({
|
|
|
5204
5204
|
setCellValue(selected.row, selected.column, null)
|
|
5205
5205
|
$xeTable.handleEdit(selected.args, evnt)
|
|
5206
5206
|
}
|
|
5207
|
-
const afterEditMethod = editOpts.afterEditMethod
|
|
5208
|
-
if (afterEditMethod) {
|
|
5209
|
-
nextTick(() => {
|
|
5210
|
-
afterEditMethod(params)
|
|
5211
|
-
})
|
|
5212
|
-
}
|
|
5213
5207
|
}
|
|
5214
5208
|
}
|
|
5215
5209
|
}
|
|
@@ -6625,6 +6619,237 @@ export default defineComponent({
|
|
|
6625
6619
|
}
|
|
6626
6620
|
}
|
|
6627
6621
|
|
|
6622
|
+
const renderVN = () => {
|
|
6623
|
+
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props
|
|
6624
|
+
const { isCalcColumn, isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, scrollbarHeight, tableData, tableColumn, tableGroupColumn, footerTableData, initStore, columnStore, filterStore, customStore, tooltipStore } = reactData
|
|
6625
|
+
const { leftList, rightList } = columnStore
|
|
6626
|
+
const loadingSlot = slots.loading
|
|
6627
|
+
const tipConfig = computeTipConfig.value
|
|
6628
|
+
const validOpts = computeValidOpts.value
|
|
6629
|
+
const checkboxOpts = computeCheckboxOpts.value
|
|
6630
|
+
const treeOpts = computeTreeOpts.value
|
|
6631
|
+
const rowOpts = computeRowOpts.value
|
|
6632
|
+
const columnOpts = computeColumnOpts.value
|
|
6633
|
+
const vSize = computeSize.value
|
|
6634
|
+
const tableBorder = computeTableBorder.value
|
|
6635
|
+
const mouseOpts = computeMouseOpts.value
|
|
6636
|
+
const validTipOpts = computeValidTipOpts.value
|
|
6637
|
+
const loadingOpts = computeLoadingOpts.value
|
|
6638
|
+
const isMenu = computeIsMenu.value
|
|
6639
|
+
const currLoading = reactData._isLoading || loading
|
|
6640
|
+
return h('div', {
|
|
6641
|
+
ref: refElem,
|
|
6642
|
+
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, {
|
|
6643
|
+
[`size--${vSize}`]: vSize,
|
|
6644
|
+
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
6645
|
+
'vxe-editable': !!editConfig,
|
|
6646
|
+
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete',
|
|
6647
|
+
'cell--highlight': highlightCell,
|
|
6648
|
+
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
6649
|
+
'cell--area': mouseConfig && mouseOpts.area,
|
|
6650
|
+
'row--highlight': rowOpts.isHover || highlightHoverRow,
|
|
6651
|
+
'column--highlight': columnOpts.isHover || highlightHoverColumn,
|
|
6652
|
+
'checkbox--range': checkboxOpts.range,
|
|
6653
|
+
'column--calc': isCalcColumn,
|
|
6654
|
+
'is--header': showHeader,
|
|
6655
|
+
'is--footer': showFooter,
|
|
6656
|
+
'is--group': isGroup,
|
|
6657
|
+
'is--tree-line': treeConfig && (treeOpts.showLine || treeOpts.line),
|
|
6658
|
+
'is--fixed-left': leftList.length,
|
|
6659
|
+
'is--fixed-right': rightList.length,
|
|
6660
|
+
'is--animat': !!props.animat,
|
|
6661
|
+
'is--padding': props.padding,
|
|
6662
|
+
'is--round': props.round,
|
|
6663
|
+
'is--stripe': !treeConfig && stripe,
|
|
6664
|
+
'is--loading': currLoading,
|
|
6665
|
+
'is--empty': !currLoading && !tableData.length,
|
|
6666
|
+
'is--scroll-y': overflowY,
|
|
6667
|
+
'is--scroll-x': overflowX,
|
|
6668
|
+
'is--virtual-x': scrollXLoad,
|
|
6669
|
+
'is--virtual-y': scrollYLoad
|
|
6670
|
+
}],
|
|
6671
|
+
spellcheck: false,
|
|
6672
|
+
onKeydown: keydownEvent
|
|
6673
|
+
}, [
|
|
6674
|
+
/**
|
|
6675
|
+
* 隐藏列
|
|
6676
|
+
*/
|
|
6677
|
+
h('div', {
|
|
6678
|
+
class: 'vxe-table-slots'
|
|
6679
|
+
}, slots.default ? slots.default({}) : []),
|
|
6680
|
+
h('div', {
|
|
6681
|
+
class: 'vxe-table--render-wrapper'
|
|
6682
|
+
}, [
|
|
6683
|
+
h('div', {
|
|
6684
|
+
class: 'vxe-table--main-wrapper'
|
|
6685
|
+
}, [
|
|
6686
|
+
/**
|
|
6687
|
+
* 表头
|
|
6688
|
+
*/
|
|
6689
|
+
showHeader
|
|
6690
|
+
? h(TableHeaderComponent, {
|
|
6691
|
+
ref: refTableHeader,
|
|
6692
|
+
tableData,
|
|
6693
|
+
tableColumn,
|
|
6694
|
+
tableGroupColumn
|
|
6695
|
+
})
|
|
6696
|
+
: createCommentVNode(),
|
|
6697
|
+
/**
|
|
6698
|
+
* 表体
|
|
6699
|
+
*/
|
|
6700
|
+
h(TableBodyComponent, {
|
|
6701
|
+
ref: refTableBody,
|
|
6702
|
+
tableData,
|
|
6703
|
+
tableColumn
|
|
6704
|
+
}),
|
|
6705
|
+
/**
|
|
6706
|
+
* 表尾
|
|
6707
|
+
*/
|
|
6708
|
+
showFooter
|
|
6709
|
+
? h(TableFooterComponent, {
|
|
6710
|
+
ref: refTableFooter,
|
|
6711
|
+
footerTableData,
|
|
6712
|
+
tableColumn
|
|
6713
|
+
})
|
|
6714
|
+
: createCommentVNode()
|
|
6715
|
+
]),
|
|
6716
|
+
h('div', {
|
|
6717
|
+
class: 'vxe-table--fixed-wrapper'
|
|
6718
|
+
}, [
|
|
6719
|
+
/**
|
|
6720
|
+
* 左侧固定区域
|
|
6721
|
+
*/
|
|
6722
|
+
leftList && leftList.length && overflowX ? renderFixed('left') : createCommentVNode(),
|
|
6723
|
+
/**
|
|
6724
|
+
* 右侧固定区域
|
|
6725
|
+
*/
|
|
6726
|
+
rightList && rightList.length && overflowX ? renderFixed('right') : createCommentVNode()
|
|
6727
|
+
])
|
|
6728
|
+
]),
|
|
6729
|
+
/**
|
|
6730
|
+
* 空数据
|
|
6731
|
+
*/
|
|
6732
|
+
h('div', {
|
|
6733
|
+
ref: refEmptyPlaceholder,
|
|
6734
|
+
class: 'vxe-table--empty-placeholder'
|
|
6735
|
+
}, [
|
|
6736
|
+
h('div', {
|
|
6737
|
+
class: 'vxe-table--empty-content'
|
|
6738
|
+
}, renderEmptyContenet())
|
|
6739
|
+
]),
|
|
6740
|
+
/**
|
|
6741
|
+
* 边框线
|
|
6742
|
+
*/
|
|
6743
|
+
h('div', {
|
|
6744
|
+
class: 'vxe-table--border-line'
|
|
6745
|
+
}),
|
|
6746
|
+
/**
|
|
6747
|
+
* 列宽线
|
|
6748
|
+
*/
|
|
6749
|
+
h('div', {
|
|
6750
|
+
ref: refCellResizeBar,
|
|
6751
|
+
class: 'vxe-table--resizable-bar',
|
|
6752
|
+
style: overflowX
|
|
6753
|
+
? {
|
|
6754
|
+
'padding-bottom': `${scrollbarHeight}px`
|
|
6755
|
+
}
|
|
6756
|
+
: null
|
|
6757
|
+
}),
|
|
6758
|
+
/**
|
|
6759
|
+
* 加载中
|
|
6760
|
+
*/
|
|
6761
|
+
VxeUILoadingComponent
|
|
6762
|
+
? h(VxeUILoadingComponent, {
|
|
6763
|
+
class: 'vxe-table--loading',
|
|
6764
|
+
modelValue: currLoading,
|
|
6765
|
+
icon: loadingOpts.icon,
|
|
6766
|
+
text: loadingOpts.text
|
|
6767
|
+
}, loadingSlot
|
|
6768
|
+
? {
|
|
6769
|
+
default: () => loadingSlot({ $table: $xeTable, $grid: $xeGrid })
|
|
6770
|
+
}
|
|
6771
|
+
: {})
|
|
6772
|
+
: createCommentVNode(),
|
|
6773
|
+
/**
|
|
6774
|
+
* 自定义列
|
|
6775
|
+
*/
|
|
6776
|
+
initStore.custom
|
|
6777
|
+
? h(TableCustomPanelComponent, {
|
|
6778
|
+
ref: refTableCustom,
|
|
6779
|
+
customStore
|
|
6780
|
+
})
|
|
6781
|
+
: createCommentVNode(),
|
|
6782
|
+
/**
|
|
6783
|
+
* 筛选
|
|
6784
|
+
*/
|
|
6785
|
+
initStore.filter
|
|
6786
|
+
? h(TableFilterPanelComponent, {
|
|
6787
|
+
ref: refTableFilter,
|
|
6788
|
+
filterStore
|
|
6789
|
+
})
|
|
6790
|
+
: createCommentVNode(),
|
|
6791
|
+
/**
|
|
6792
|
+
* 导入
|
|
6793
|
+
*/
|
|
6794
|
+
initStore.import && props.importConfig
|
|
6795
|
+
? h(TableImportPanelComponent, {
|
|
6796
|
+
defaultOptions: reactData.importParams,
|
|
6797
|
+
storeData: reactData.importStore
|
|
6798
|
+
})
|
|
6799
|
+
: createCommentVNode(),
|
|
6800
|
+
/**
|
|
6801
|
+
* 导出
|
|
6802
|
+
*/
|
|
6803
|
+
initStore.export && (props.exportConfig || props.printConfig)
|
|
6804
|
+
? h(TableExportPanelComponent, {
|
|
6805
|
+
defaultOptions: reactData.exportParams,
|
|
6806
|
+
storeData: reactData.exportStore
|
|
6807
|
+
})
|
|
6808
|
+
: createCommentVNode(),
|
|
6809
|
+
/**
|
|
6810
|
+
* 快捷菜单
|
|
6811
|
+
*/
|
|
6812
|
+
isMenu
|
|
6813
|
+
? h(TableMenuPanelComponent, {
|
|
6814
|
+
ref: refTableMenu
|
|
6815
|
+
})
|
|
6816
|
+
: createCommentVNode(),
|
|
6817
|
+
/**
|
|
6818
|
+
* 提示相关
|
|
6819
|
+
*/
|
|
6820
|
+
VxeUITooltipComponent
|
|
6821
|
+
? h('div', {}, [
|
|
6822
|
+
/**
|
|
6823
|
+
* 通用提示
|
|
6824
|
+
*/
|
|
6825
|
+
h(VxeUITooltipComponent, {
|
|
6826
|
+
ref: refCommTooltip,
|
|
6827
|
+
isArrow: false,
|
|
6828
|
+
enterable: false
|
|
6829
|
+
}),
|
|
6830
|
+
/**
|
|
6831
|
+
* 工具提示
|
|
6832
|
+
*/
|
|
6833
|
+
h(VxeUITooltipComponent, Object.assign({
|
|
6834
|
+
ref: refTooltip
|
|
6835
|
+
}, tipConfig, tooltipStore.currOpts)),
|
|
6836
|
+
/**
|
|
6837
|
+
* 校验提示
|
|
6838
|
+
*/
|
|
6839
|
+
props.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
|
|
6840
|
+
? h(VxeUITooltipComponent, {
|
|
6841
|
+
ref: refValidTooltip,
|
|
6842
|
+
class: [{
|
|
6843
|
+
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete'
|
|
6844
|
+
}, 'vxe-table--valid-error'],
|
|
6845
|
+
...(validOpts.message === 'tooltip' || tableData.length === 1 ? validTipOpts : {}) as any
|
|
6846
|
+
})
|
|
6847
|
+
: createCommentVNode()
|
|
6848
|
+
])
|
|
6849
|
+
: createCommentVNode()
|
|
6850
|
+
])
|
|
6851
|
+
}
|
|
6852
|
+
|
|
6628
6853
|
const dataFlag = ref(0)
|
|
6629
6854
|
watch(() => props.data ? props.data.length : -1, () => {
|
|
6630
6855
|
dataFlag.value++
|
|
@@ -7006,239 +7231,6 @@ export default defineComponent({
|
|
|
7006
7231
|
tablePrivateMethods.preventEvent(null, 'unmounted', { $table: $xeTable })
|
|
7007
7232
|
})
|
|
7008
7233
|
|
|
7009
|
-
const renderVN = () => {
|
|
7010
|
-
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props
|
|
7011
|
-
const { isCalcColumn, isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, scrollbarHeight, tableData, tableColumn, tableGroupColumn, footerTableData, initStore, columnStore, filterStore, customStore, tooltipStore } = reactData
|
|
7012
|
-
const { leftList, rightList } = columnStore
|
|
7013
|
-
const loadingSlot = slots.loading
|
|
7014
|
-
const tipConfig = computeTipConfig.value
|
|
7015
|
-
const validOpts = computeValidOpts.value
|
|
7016
|
-
const checkboxOpts = computeCheckboxOpts.value
|
|
7017
|
-
const treeOpts = computeTreeOpts.value
|
|
7018
|
-
const rowOpts = computeRowOpts.value
|
|
7019
|
-
const columnOpts = computeColumnOpts.value
|
|
7020
|
-
const vSize = computeSize.value
|
|
7021
|
-
const tableBorder = computeTableBorder.value
|
|
7022
|
-
const mouseOpts = computeMouseOpts.value
|
|
7023
|
-
const validTipOpts = computeValidTipOpts.value
|
|
7024
|
-
const loadingOpts = computeLoadingOpts.value
|
|
7025
|
-
const isMenu = computeIsMenu.value
|
|
7026
|
-
const currLoading = reactData._isLoading || loading
|
|
7027
|
-
return h('div', {
|
|
7028
|
-
ref: refElem,
|
|
7029
|
-
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, {
|
|
7030
|
-
[`size--${vSize}`]: vSize,
|
|
7031
|
-
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
7032
|
-
'vxe-editable': !!editConfig,
|
|
7033
|
-
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete',
|
|
7034
|
-
'cell--highlight': highlightCell,
|
|
7035
|
-
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
7036
|
-
'cell--area': mouseConfig && mouseOpts.area,
|
|
7037
|
-
'row--highlight': rowOpts.isHover || highlightHoverRow,
|
|
7038
|
-
'column--highlight': columnOpts.isHover || highlightHoverColumn,
|
|
7039
|
-
'checkbox--range': checkboxOpts.range,
|
|
7040
|
-
'column--calc': isCalcColumn,
|
|
7041
|
-
'is--header': showHeader,
|
|
7042
|
-
'is--footer': showFooter,
|
|
7043
|
-
'is--group': isGroup,
|
|
7044
|
-
'is--tree-line': treeConfig && (treeOpts.showLine || treeOpts.line),
|
|
7045
|
-
'is--fixed-left': leftList.length,
|
|
7046
|
-
'is--fixed-right': rightList.length,
|
|
7047
|
-
'is--animat': !!props.animat,
|
|
7048
|
-
'is--padding': props.padding,
|
|
7049
|
-
'is--round': props.round,
|
|
7050
|
-
'is--stripe': !treeConfig && stripe,
|
|
7051
|
-
'is--loading': currLoading,
|
|
7052
|
-
'is--empty': !currLoading && !tableData.length,
|
|
7053
|
-
'is--scroll-y': overflowY,
|
|
7054
|
-
'is--scroll-x': overflowX,
|
|
7055
|
-
'is--virtual-x': scrollXLoad,
|
|
7056
|
-
'is--virtual-y': scrollYLoad
|
|
7057
|
-
}],
|
|
7058
|
-
spellcheck: false,
|
|
7059
|
-
onKeydown: keydownEvent
|
|
7060
|
-
}, [
|
|
7061
|
-
/**
|
|
7062
|
-
* 隐藏列
|
|
7063
|
-
*/
|
|
7064
|
-
h('div', {
|
|
7065
|
-
class: 'vxe-table-slots'
|
|
7066
|
-
}, slots.default ? slots.default({}) : []),
|
|
7067
|
-
h('div', {
|
|
7068
|
-
class: 'vxe-table--render-wrapper'
|
|
7069
|
-
}, [
|
|
7070
|
-
h('div', {
|
|
7071
|
-
class: 'vxe-table--main-wrapper'
|
|
7072
|
-
}, [
|
|
7073
|
-
/**
|
|
7074
|
-
* 表头
|
|
7075
|
-
*/
|
|
7076
|
-
showHeader
|
|
7077
|
-
? h(TableHeaderComponent, {
|
|
7078
|
-
ref: refTableHeader,
|
|
7079
|
-
tableData,
|
|
7080
|
-
tableColumn,
|
|
7081
|
-
tableGroupColumn
|
|
7082
|
-
})
|
|
7083
|
-
: createCommentVNode(),
|
|
7084
|
-
/**
|
|
7085
|
-
* 表体
|
|
7086
|
-
*/
|
|
7087
|
-
h(TableBodyComponent, {
|
|
7088
|
-
ref: refTableBody,
|
|
7089
|
-
tableData,
|
|
7090
|
-
tableColumn
|
|
7091
|
-
}),
|
|
7092
|
-
/**
|
|
7093
|
-
* 表尾
|
|
7094
|
-
*/
|
|
7095
|
-
showFooter
|
|
7096
|
-
? h(TableFooterComponent, {
|
|
7097
|
-
ref: refTableFooter,
|
|
7098
|
-
footerTableData,
|
|
7099
|
-
tableColumn
|
|
7100
|
-
})
|
|
7101
|
-
: createCommentVNode()
|
|
7102
|
-
]),
|
|
7103
|
-
h('div', {
|
|
7104
|
-
class: 'vxe-table--fixed-wrapper'
|
|
7105
|
-
}, [
|
|
7106
|
-
/**
|
|
7107
|
-
* 左侧固定区域
|
|
7108
|
-
*/
|
|
7109
|
-
leftList && leftList.length && overflowX ? renderFixed('left') : createCommentVNode(),
|
|
7110
|
-
/**
|
|
7111
|
-
* 右侧固定区域
|
|
7112
|
-
*/
|
|
7113
|
-
rightList && rightList.length && overflowX ? renderFixed('right') : createCommentVNode()
|
|
7114
|
-
])
|
|
7115
|
-
]),
|
|
7116
|
-
/**
|
|
7117
|
-
* 空数据
|
|
7118
|
-
*/
|
|
7119
|
-
h('div', {
|
|
7120
|
-
ref: refEmptyPlaceholder,
|
|
7121
|
-
class: 'vxe-table--empty-placeholder'
|
|
7122
|
-
}, [
|
|
7123
|
-
h('div', {
|
|
7124
|
-
class: 'vxe-table--empty-content'
|
|
7125
|
-
}, renderEmptyContenet())
|
|
7126
|
-
]),
|
|
7127
|
-
/**
|
|
7128
|
-
* 边框线
|
|
7129
|
-
*/
|
|
7130
|
-
h('div', {
|
|
7131
|
-
class: 'vxe-table--border-line'
|
|
7132
|
-
}),
|
|
7133
|
-
/**
|
|
7134
|
-
* 列宽线
|
|
7135
|
-
*/
|
|
7136
|
-
h('div', {
|
|
7137
|
-
ref: refCellResizeBar,
|
|
7138
|
-
class: 'vxe-table--resizable-bar',
|
|
7139
|
-
style: overflowX
|
|
7140
|
-
? {
|
|
7141
|
-
'padding-bottom': `${scrollbarHeight}px`
|
|
7142
|
-
}
|
|
7143
|
-
: null
|
|
7144
|
-
}),
|
|
7145
|
-
/**
|
|
7146
|
-
* 加载中
|
|
7147
|
-
*/
|
|
7148
|
-
VxeUILoadingComponent
|
|
7149
|
-
? h(VxeUILoadingComponent, {
|
|
7150
|
-
class: 'vxe-table--loading',
|
|
7151
|
-
modelValue: currLoading,
|
|
7152
|
-
icon: loadingOpts.icon,
|
|
7153
|
-
text: loadingOpts.text
|
|
7154
|
-
}, loadingSlot
|
|
7155
|
-
? {
|
|
7156
|
-
default: () => loadingSlot({ $table: $xeTable, $grid: $xeGrid })
|
|
7157
|
-
}
|
|
7158
|
-
: {})
|
|
7159
|
-
: createCommentVNode(),
|
|
7160
|
-
/**
|
|
7161
|
-
* 自定义列
|
|
7162
|
-
*/
|
|
7163
|
-
initStore.custom
|
|
7164
|
-
? h(TableCustomPanelComponent, {
|
|
7165
|
-
ref: refTableCustom,
|
|
7166
|
-
customStore
|
|
7167
|
-
})
|
|
7168
|
-
: createCommentVNode(),
|
|
7169
|
-
/**
|
|
7170
|
-
* 筛选
|
|
7171
|
-
*/
|
|
7172
|
-
initStore.filter
|
|
7173
|
-
? h(TableFilterPanelComponent, {
|
|
7174
|
-
ref: refTableFilter,
|
|
7175
|
-
filterStore
|
|
7176
|
-
})
|
|
7177
|
-
: createCommentVNode(),
|
|
7178
|
-
/**
|
|
7179
|
-
* 导入
|
|
7180
|
-
*/
|
|
7181
|
-
initStore.import && props.importConfig
|
|
7182
|
-
? h(TableImportPanelComponent, {
|
|
7183
|
-
defaultOptions: reactData.importParams,
|
|
7184
|
-
storeData: reactData.importStore
|
|
7185
|
-
})
|
|
7186
|
-
: createCommentVNode(),
|
|
7187
|
-
/**
|
|
7188
|
-
* 导出
|
|
7189
|
-
*/
|
|
7190
|
-
initStore.export && (props.exportConfig || props.printConfig)
|
|
7191
|
-
? h(TableExportPanelComponent, {
|
|
7192
|
-
defaultOptions: reactData.exportParams,
|
|
7193
|
-
storeData: reactData.exportStore
|
|
7194
|
-
})
|
|
7195
|
-
: createCommentVNode(),
|
|
7196
|
-
/**
|
|
7197
|
-
* 快捷菜单
|
|
7198
|
-
*/
|
|
7199
|
-
isMenu
|
|
7200
|
-
? h(TableMenuPanelComponent, {
|
|
7201
|
-
ref: refTableMenu
|
|
7202
|
-
})
|
|
7203
|
-
: createCommentVNode(),
|
|
7204
|
-
/**
|
|
7205
|
-
* 提示相关
|
|
7206
|
-
*/
|
|
7207
|
-
VxeUITooltipComponent
|
|
7208
|
-
? h('div', {}, [
|
|
7209
|
-
/**
|
|
7210
|
-
* 通用提示
|
|
7211
|
-
*/
|
|
7212
|
-
h(VxeUITooltipComponent, {
|
|
7213
|
-
ref: refCommTooltip,
|
|
7214
|
-
isArrow: false,
|
|
7215
|
-
enterable: false
|
|
7216
|
-
}),
|
|
7217
|
-
/**
|
|
7218
|
-
* 工具提示
|
|
7219
|
-
*/
|
|
7220
|
-
h(VxeUITooltipComponent, Object.assign({
|
|
7221
|
-
ref: refTooltip
|
|
7222
|
-
}, tipConfig, tooltipStore.currOpts)),
|
|
7223
|
-
/**
|
|
7224
|
-
* 校验提示
|
|
7225
|
-
*/
|
|
7226
|
-
props.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
|
|
7227
|
-
? h(VxeUITooltipComponent, {
|
|
7228
|
-
ref: refValidTooltip,
|
|
7229
|
-
class: [{
|
|
7230
|
-
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete'
|
|
7231
|
-
}, 'vxe-table--valid-error'],
|
|
7232
|
-
...(validOpts.message === 'tooltip' || tableData.length === 1 ? validTipOpts : {}) as any
|
|
7233
|
-
})
|
|
7234
|
-
: createCommentVNode()
|
|
7235
|
-
])
|
|
7236
|
-
: createCommentVNode()
|
|
7237
|
-
])
|
|
7238
|
-
}
|
|
7239
|
-
|
|
7240
|
-
$xeTable.renderVN = renderVN
|
|
7241
|
-
|
|
7242
7234
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
7243
7235
|
nextTick(() => {
|
|
7244
7236
|
if (props.loading) {
|
|
@@ -7260,6 +7252,8 @@ export default defineComponent({
|
|
|
7260
7252
|
provide('$xeColgroup', null)
|
|
7261
7253
|
provide('$xeTable', $xeTable)
|
|
7262
7254
|
|
|
7255
|
+
$xeTable.renderVN = renderVN
|
|
7256
|
+
|
|
7263
7257
|
return $xeTable
|
|
7264
7258
|
},
|
|
7265
7259
|
render () {
|
|
@@ -81,27 +81,27 @@ export default defineComponent({
|
|
|
81
81
|
const $xeGrid = inject<(VxeGridConstructor & GridPrivateMethods) | null>('$xeGrid', null)
|
|
82
82
|
|
|
83
83
|
const computeRefreshOpts = computed(() => {
|
|
84
|
-
return Object.assign({}, getConfig().toolbar.refresh, props.refresh) as VxeToolbarPropTypes.RefreshOpts
|
|
84
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.refresh, true), props.refresh) as VxeToolbarPropTypes.RefreshOpts
|
|
85
85
|
})
|
|
86
86
|
|
|
87
87
|
const computeImportOpts = computed(() => {
|
|
88
|
-
return Object.assign({}, getConfig().toolbar.import, props.import) as VxeToolbarPropTypes.ImportOpts
|
|
88
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.import, true), props.import) as VxeToolbarPropTypes.ImportOpts
|
|
89
89
|
})
|
|
90
90
|
|
|
91
91
|
const computeExportOpts = computed(() => {
|
|
92
|
-
return Object.assign({}, getConfig().toolbar.export, props.export) as VxeToolbarPropTypes.ExportOpts
|
|
92
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.export, true), props.export) as VxeToolbarPropTypes.ExportOpts
|
|
93
93
|
})
|
|
94
94
|
|
|
95
95
|
const computePrintOpts = computed(() => {
|
|
96
|
-
return Object.assign({}, getConfig().toolbar.print, props.print) as VxeToolbarPropTypes.PrintOpts
|
|
96
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.print, true), props.print) as VxeToolbarPropTypes.PrintOpts
|
|
97
97
|
})
|
|
98
98
|
|
|
99
99
|
const computeZoomOpts = computed(() => {
|
|
100
|
-
return Object.assign({}, getConfig().toolbar.zoom, props.zoom) as VxeToolbarPropTypes.ZoomOpts
|
|
100
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.zoom, true), props.zoom) as VxeToolbarPropTypes.ZoomOpts
|
|
101
101
|
})
|
|
102
102
|
|
|
103
103
|
const computeCustomOpts = computed(() => {
|
|
104
|
-
return Object.assign({}, getConfig().toolbar.custom, props.custom) as VxeToolbarPropTypes.CustomOpts
|
|
104
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.custom, true), props.custom) as VxeToolbarPropTypes.CustomOpts
|
|
105
105
|
})
|
|
106
106
|
|
|
107
107
|
const computeTableCustomOpts = computed(() => {
|