vxe-table 4.12.4 → 4.13.0-beta.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/es/grid/src/grid.js +2 -2
- package/es/locale/lang/ar-EG.js +3 -1
- package/es/locale/lang/de-DE.js +3 -1
- package/es/locale/lang/en-US.js +7 -5
- package/es/locale/lang/es-ES.js +3 -1
- package/es/locale/lang/fr-FR.js +3 -1
- package/es/locale/lang/hu-HU.js +3 -1
- package/es/locale/lang/hy-AM.js +3 -1
- package/es/locale/lang/id-ID.js +3 -1
- package/es/locale/lang/it-IT.js +3 -1
- package/es/locale/lang/ja-JP.js +3 -1
- package/es/locale/lang/ko-KR.js +3 -1
- package/es/locale/lang/nb-NO.js +3 -1
- package/es/locale/lang/pt-BR.js +3 -1
- package/es/locale/lang/ru-RU.js +3 -1
- package/es/locale/lang/th-TH.js +3 -1
- package/es/locale/lang/ug-CN.js +3 -1
- package/es/locale/lang/uk-UA.js +3 -1
- package/es/locale/lang/vi-VN.js +3 -1
- package/es/locale/lang/zh-CHT.js +3 -1
- package/es/locale/lang/zh-CN.js +3 -1
- package/es/style.css +1 -1
- package/es/table/module/edit/hook.js +10 -9
- package/es/table/module/export/export-panel.js +31 -19
- package/es/table/module/export/hook.js +16 -12
- package/es/table/src/body.js +11 -13
- package/es/table/src/footer.js +3 -16
- package/es/table/src/table.js +243 -107
- package/es/table/src/util.js +0 -13
- package/es/ui/index.js +2 -2
- 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 +8540 -8566
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +3 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +3 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +7 -5
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +7 -5
- package/lib/locale/lang/es-ES.js +3 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +3 -1
- package/lib/locale/lang/fr-FR.js +3 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +3 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +3 -1
- package/lib/locale/lang/hy-AM.js +3 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +3 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +3 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +3 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +3 -1
- package/lib/locale/lang/ko-KR.js +3 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +3 -1
- package/lib/locale/lang/nb-NO.js +3 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +3 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +3 -1
- package/lib/locale/lang/ru-RU.js +3 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +3 -1
- package/lib/locale/lang/th-TH.js +3 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +3 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +3 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +3 -1
- package/lib/locale/lang/vi-VN.js +3 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +3 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +3 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +3 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/hook.js +9 -9
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +26 -19
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/hook.js +19 -14
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/src/body.js +14 -15
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +4 -27
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/table.js +271 -108
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +0 -25
- package/lib/table/src/util.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/package.json +2 -2
- package/packages/grid/src/grid.ts +2 -2
- package/packages/locale/lang/ar-EG.ts +3 -1
- package/packages/locale/lang/de-DE.ts +3 -1
- package/packages/locale/lang/en-US.ts +7 -5
- package/packages/locale/lang/es-ES.ts +3 -1
- package/packages/locale/lang/fr-FR.ts +3 -1
- package/packages/locale/lang/hu-HU.ts +3 -1
- package/packages/locale/lang/hy-AM.ts +3 -1
- package/packages/locale/lang/id-ID.ts +3 -1
- package/packages/locale/lang/it-IT.ts +3 -1
- package/packages/locale/lang/ja-JP.ts +3 -1
- package/packages/locale/lang/ko-KR.ts +3 -1
- package/packages/locale/lang/nb-NO.ts +3 -1
- package/packages/locale/lang/pt-BR.ts +3 -1
- package/packages/locale/lang/ru-RU.ts +3 -1
- package/packages/locale/lang/th-TH.ts +3 -1
- package/packages/locale/lang/ug-CN.ts +3 -1
- package/packages/locale/lang/uk-UA.ts +3 -1
- package/packages/locale/lang/vi-VN.ts +3 -1
- package/packages/locale/lang/zh-CHT.ts +3 -1
- package/packages/locale/lang/zh-CN.ts +3 -1
- package/packages/table/module/edit/hook.ts +10 -9
- package/packages/table/module/export/export-panel.ts +31 -19
- package/packages/table/module/export/hook.ts +18 -14
- package/packages/table/src/body.ts +11 -13
- package/packages/table/src/footer.ts +3 -17
- package/packages/table/src/table.ts +240 -107
- package/packages/table/src/util.ts +0 -14
- package/packages/ui/index.ts +1 -1
- /package/es/{iconfont.1743394011765.ttf → iconfont.1743578564396.ttf} +0 -0
- /package/es/{iconfont.1743394011765.woff → iconfont.1743578564396.woff} +0 -0
- /package/es/{iconfont.1743394011765.woff2 → iconfont.1743578564396.woff2} +0 -0
- /package/lib/{iconfont.1743394011765.ttf → iconfont.1743578564396.ttf} +0 -0
- /package/lib/{iconfont.1743394011765.woff → iconfont.1743578564396.woff} +0 -0
- /package/lib/{iconfont.1743394011765.woff2 → iconfont.1743578564396.woff2} +0 -0
|
@@ -390,7 +390,7 @@ export default defineComponent({
|
|
|
390
390
|
}, [
|
|
391
391
|
VxeUICheckboxComponent
|
|
392
392
|
? h(VxeUICheckboxComponent, {
|
|
393
|
-
modelValue: hasEmptyData ||
|
|
393
|
+
modelValue: hasEmptyData || isHeader,
|
|
394
394
|
disabled: hasEmptyData,
|
|
395
395
|
title: getI18n('vxe.export.expHeaderTitle'),
|
|
396
396
|
content: getI18n('vxe.export.expOptHeader'),
|
|
@@ -401,23 +401,23 @@ export default defineComponent({
|
|
|
401
401
|
: createCommentVNode(),
|
|
402
402
|
VxeUICheckboxComponent
|
|
403
403
|
? h(VxeUICheckboxComponent, {
|
|
404
|
-
modelValue: defaultOptions.
|
|
405
|
-
disabled: !
|
|
406
|
-
title: getI18n('vxe.export.
|
|
407
|
-
content: getI18n('vxe.export.
|
|
404
|
+
modelValue: isHeader ? defaultOptions.isTitle : false,
|
|
405
|
+
disabled: !isHeader,
|
|
406
|
+
title: getI18n('vxe.export.expTitleTitle'),
|
|
407
|
+
content: getI18n('vxe.export.expOptTitle'),
|
|
408
408
|
'onUpdate:modelValue' (value: any) {
|
|
409
|
-
defaultOptions.
|
|
409
|
+
defaultOptions.isTitle = value
|
|
410
410
|
}
|
|
411
411
|
})
|
|
412
412
|
: createCommentVNode(),
|
|
413
413
|
VxeUICheckboxComponent
|
|
414
414
|
? h(VxeUICheckboxComponent, {
|
|
415
|
-
modelValue:
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
content: getI18n('vxe.export.
|
|
415
|
+
modelValue: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
416
|
+
title: getI18n('vxe.export.expColgroupTitle'),
|
|
417
|
+
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
418
|
+
content: getI18n('vxe.export.expOptColgroup'),
|
|
419
419
|
'onUpdate:modelValue' (value: any) {
|
|
420
|
-
defaultOptions.
|
|
420
|
+
defaultOptions.isColgroup = value
|
|
421
421
|
}
|
|
422
422
|
})
|
|
423
423
|
: createCommentVNode()
|
|
@@ -427,15 +427,12 @@ export default defineComponent({
|
|
|
427
427
|
}, [
|
|
428
428
|
VxeUICheckboxComponent
|
|
429
429
|
? h(VxeUICheckboxComponent, {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
title: getI18n('vxe.export.expColgroupTitle'),
|
|
435
|
-
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
436
|
-
content: getI18n('vxe.export.expOptColgroup'),
|
|
430
|
+
modelValue: hasEmptyData ? false : defaultOptions.original,
|
|
431
|
+
disabled: hasEmptyData,
|
|
432
|
+
title: getI18n('vxe.export.expOriginalTitle'),
|
|
433
|
+
content: getI18n('vxe.export.expOptOriginal'),
|
|
437
434
|
'onUpdate:modelValue' (value: any) {
|
|
438
|
-
defaultOptions.
|
|
435
|
+
defaultOptions.original = value
|
|
439
436
|
}
|
|
440
437
|
})
|
|
441
438
|
: createCommentVNode(),
|
|
@@ -472,6 +469,21 @@ export default defineComponent({
|
|
|
472
469
|
}
|
|
473
470
|
})
|
|
474
471
|
: createCommentVNode()
|
|
472
|
+
]),
|
|
473
|
+
h('div', {
|
|
474
|
+
class: 'vxe-table-export--panel-option-row'
|
|
475
|
+
}, [
|
|
476
|
+
VxeUICheckboxComponent
|
|
477
|
+
? h(VxeUICheckboxComponent, {
|
|
478
|
+
modelValue: defaultOptions.isFooter,
|
|
479
|
+
disabled: !storeData.hasFooter,
|
|
480
|
+
title: getI18n('vxe.export.expFooterTitle'),
|
|
481
|
+
content: getI18n('vxe.export.expOptFooter'),
|
|
482
|
+
'onUpdate:modelValue' (value: any) {
|
|
483
|
+
defaultOptions.isFooter = value
|
|
484
|
+
}
|
|
485
|
+
})
|
|
486
|
+
: createCommentVNode()
|
|
475
487
|
])
|
|
476
488
|
])
|
|
477
489
|
])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject, nextTick } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
|
-
import { isColumnInfo,
|
|
4
|
+
import { isColumnInfo, getCellValue } from '../../src/util'
|
|
5
5
|
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils'
|
|
6
6
|
import { hasClass } from '../../../ui/src/dom'
|
|
7
7
|
import { createHtmlPage, getExportBlobByContent } from './util'
|
|
@@ -328,7 +328,7 @@ hooks.add('tableExportModule', {
|
|
|
328
328
|
function getHeaderTitle (opts: any, column: any) {
|
|
329
329
|
const columnOpts = computeColumnOpts.value
|
|
330
330
|
const headExportMethod = column.headerExportMethod || columnOpts.headerExportMethod
|
|
331
|
-
return headExportMethod ? headExportMethod({ column, options: opts, $table: $xeTable }) : ((opts.
|
|
331
|
+
return headExportMethod ? headExportMethod({ column, options: opts, $table: $xeTable }) : ((opts.isTitle ? column.getTitle() : column.field) || '')
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
const toBooleanValue = (cellValue: any) => {
|
|
@@ -564,7 +564,8 @@ hooks.add('tableExportModule', {
|
|
|
564
564
|
|
|
565
565
|
const toHtml = (opts: VxeTablePropTypes.ExportHandleOptions, columns: VxeTableDefines.ColumnInfo[], datas: any[]) => {
|
|
566
566
|
const { id, border, treeConfig, headerAlign: allHeaderAlign, align: allAlign, footerAlign: allFooterAlign, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow } = props
|
|
567
|
-
const { isAllSelected, isIndeterminate
|
|
567
|
+
const { isAllSelected, isIndeterminate } = reactData
|
|
568
|
+
const { mergeBodyCellMaps } = internalData
|
|
568
569
|
const treeOpts = computeTreeOpts.value
|
|
569
570
|
const { print: isPrint, isHeader, isFooter, isColgroup, isMerge, colgroups, original } = opts
|
|
570
571
|
const allCls = 'check-all'
|
|
@@ -630,9 +631,10 @@ hooks.add('tableExportModule', {
|
|
|
630
631
|
datas.forEach((item: any) => {
|
|
631
632
|
tables.push(
|
|
632
633
|
'<tr>' + columns.map((column: any) => {
|
|
634
|
+
const colid = column.id
|
|
633
635
|
const cellAlign = column.align || allAlign
|
|
634
636
|
const classNames = hasEllipsis(column, 'showOverflow', allColumnOverflow) ? ['col--ellipsis'] : []
|
|
635
|
-
const cellValue = item[
|
|
637
|
+
const cellValue = item[colid]
|
|
636
638
|
if (cellAlign) {
|
|
637
639
|
classNames.push(`col--${cellAlign}`)
|
|
638
640
|
}
|
|
@@ -659,18 +661,18 @@ hooks.add('tableExportModule', {
|
|
|
659
661
|
)
|
|
660
662
|
})
|
|
661
663
|
} else {
|
|
662
|
-
datas.forEach((item
|
|
664
|
+
datas.forEach((item) => {
|
|
663
665
|
tables.push(
|
|
664
|
-
'<tr>' + columns.map((column
|
|
666
|
+
'<tr>' + columns.map((column) => {
|
|
665
667
|
const cellAlign = column.align || allAlign
|
|
666
668
|
const classNames = hasEllipsis(column, 'showOverflow', allColumnOverflow) ? ['col--ellipsis'] : []
|
|
667
669
|
const cellValue = item[column.id]
|
|
668
670
|
let rowSpan = 1
|
|
669
671
|
let colSpan = 1
|
|
670
|
-
if (isMerge
|
|
672
|
+
if (isMerge) {
|
|
671
673
|
const _rowIndex = $xeTable.getVTRowIndex(item._row)
|
|
672
674
|
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
673
|
-
const spanRest =
|
|
675
|
+
const spanRest = mergeBodyCellMaps[`${_rowIndex}:${_columnIndex}`]
|
|
674
676
|
if (spanRest) {
|
|
675
677
|
const { rowspan, colspan } = spanRest
|
|
676
678
|
if (!rowspan || !colspan) {
|
|
@@ -1014,18 +1016,19 @@ hooks.add('tableExportModule', {
|
|
|
1014
1016
|
|
|
1015
1017
|
const handleExportAndPrint = (options: VxeTablePropTypes.ExportOpts | VxeTablePropTypes.ExportConfig, isPrint?: boolean) => {
|
|
1016
1018
|
const { treeConfig, showHeader, showFooter } = props
|
|
1017
|
-
const { initStore,
|
|
1018
|
-
const { collectColumn } = internalData
|
|
1019
|
+
const { initStore, isGroup, footerTableData, exportStore, exportParams } = reactData
|
|
1020
|
+
const { collectColumn, mergeBodyList, mergeFooterList } = internalData
|
|
1019
1021
|
const exportOpts = computeExportOpts.value
|
|
1020
1022
|
const hasTree = treeConfig
|
|
1021
1023
|
const customOpts = computeCustomOpts.value
|
|
1022
1024
|
const selectRecords = $xeTable.getCheckboxRecords()
|
|
1023
1025
|
const proxyOpts = $xeGrid ? $xeGrid.getComputeMaps().computeProxyOpts.value : {} as VxeGridPropTypes.ProxyOpts
|
|
1024
1026
|
const hasFooter = !!footerTableData.length
|
|
1025
|
-
const hasMerge = !!(
|
|
1027
|
+
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length)
|
|
1026
1028
|
const defOpts = Object.assign({
|
|
1027
1029
|
message: true,
|
|
1028
1030
|
isHeader: showHeader,
|
|
1031
|
+
isTitle: showHeader,
|
|
1029
1032
|
isFooter: showFooter,
|
|
1030
1033
|
isColgroup: isGroup,
|
|
1031
1034
|
isMerge: hasMerge,
|
|
@@ -1137,15 +1140,16 @@ hooks.add('tableExportModule', {
|
|
|
1137
1140
|
*/
|
|
1138
1141
|
exportData (options) {
|
|
1139
1142
|
const { treeConfig, showHeader, showFooter } = props
|
|
1140
|
-
const {
|
|
1141
|
-
const { tableFullColumn, afterFullData, collectColumn } = internalData
|
|
1143
|
+
const { isGroup } = reactData
|
|
1144
|
+
const { tableFullColumn, afterFullData, collectColumn, mergeBodyList, mergeFooterList } = internalData
|
|
1142
1145
|
const exportOpts = computeExportOpts.value
|
|
1143
1146
|
const treeOpts = computeTreeOpts.value
|
|
1144
1147
|
const proxyOpts = $xeGrid ? $xeGrid.getComputeMaps().computeProxyOpts.value : {} as VxeGridPropTypes.ProxyOpts
|
|
1145
|
-
const hasMerge = !!(
|
|
1148
|
+
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length)
|
|
1146
1149
|
const opts = Object.assign({
|
|
1147
1150
|
message: true,
|
|
1148
1151
|
isHeader: showHeader,
|
|
1152
|
+
isTitle: showHeader,
|
|
1149
1153
|
isFooter: showFooter,
|
|
1150
1154
|
isColgroup: isGroup,
|
|
1151
1155
|
isMerge: hasMerge,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, TransitionGroup, h, ref, Ref, PropType, inject, nextTick, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
-
import { getOffsetSize, calcTreeLine,
|
|
4
|
+
import { getOffsetSize, calcTreeLine, getRowid, createHandleGetRowId } from './util'
|
|
5
5
|
import { updateCellTitle, getPropClass } from '../../ui/src/dom'
|
|
6
6
|
import { isEnableConf } from '../../ui/src/utils'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -55,14 +55,13 @@ export default defineComponent({
|
|
|
55
55
|
if (slots && (slots as any).line) {
|
|
56
56
|
return $xeTable.callSlot((slots as any).line, params)
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const rowRest = fullAllDataRowIdData[rowid]
|
|
59
59
|
let rLevel = 0
|
|
60
60
|
let prevRow = null
|
|
61
|
-
if (
|
|
62
|
-
rLevel =
|
|
63
|
-
prevRow =
|
|
61
|
+
if (rowRest) {
|
|
62
|
+
rLevel = rowRest.level
|
|
63
|
+
prevRow = rowRest.items[rowRest.treeIndex - 1]
|
|
64
64
|
}
|
|
65
|
-
const isFirstRow = $xeTable.eqRow(afterFullData[0], row)
|
|
66
65
|
if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
|
|
67
66
|
return [
|
|
68
67
|
h('div', {
|
|
@@ -72,7 +71,7 @@ export default defineComponent({
|
|
|
72
71
|
h('div', {
|
|
73
72
|
class: 'vxe-tree--line',
|
|
74
73
|
style: {
|
|
75
|
-
height: `${
|
|
74
|
+
height: `${$xeTable.eqRow(afterFullData[0], row) ? 1 : calcTreeLine(params, prevRow)}px`,
|
|
76
75
|
bottom: `-${Math.floor(cellHeight / 2)}px`,
|
|
77
76
|
left: `${(rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize($xeTable) : 0) + 16}px`
|
|
78
77
|
}
|
|
@@ -103,10 +102,9 @@ export default defineComponent({
|
|
|
103
102
|
) => {
|
|
104
103
|
const $xeGrid = $xeTable.xeGrid
|
|
105
104
|
|
|
106
|
-
const { fullAllDataRowIdData, fullColumnIdData, visibleColumn } = tableInternalData
|
|
107
105
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps
|
|
108
|
-
const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag,
|
|
109
|
-
const { afterFullData, scrollXStore, scrollYStore } = tableInternalData
|
|
106
|
+
const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData
|
|
107
|
+
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore } = tableInternalData
|
|
110
108
|
const cellOpts = computeCellOpts.value
|
|
111
109
|
const validOpts = computeValidOpts.value
|
|
112
110
|
const checkboxOpts = computeCheckboxOpts.value
|
|
@@ -235,8 +233,8 @@ export default defineComponent({
|
|
|
235
233
|
}
|
|
236
234
|
let isMergeCell = false
|
|
237
235
|
// 合并行或列
|
|
238
|
-
if (
|
|
239
|
-
const spanRest =
|
|
236
|
+
if (mergeBodyFlag && mergeBodyList.length) {
|
|
237
|
+
const spanRest = mergeBodyCellMaps[`${_rowIndex}:${_columnIndex}`]
|
|
240
238
|
if (spanRest) {
|
|
241
239
|
const { rowspan, colspan } = spanRest
|
|
242
240
|
if (!rowspan || !colspan) {
|
|
@@ -265,7 +263,7 @@ export default defineComponent({
|
|
|
265
263
|
}
|
|
266
264
|
}
|
|
267
265
|
// 如果被合并不可隐藏
|
|
268
|
-
if (fixedHiddenColumn &&
|
|
266
|
+
if (fixedHiddenColumn && isMergeCell) {
|
|
269
267
|
if (tdAttrs.colspan > 1 || tdAttrs.rowspan > 1) {
|
|
270
268
|
fixedHiddenColumn = false
|
|
271
269
|
}
|
|
@@ -10,20 +10,6 @@ const { renderer, renderEmptyElement } = VxeUI
|
|
|
10
10
|
|
|
11
11
|
const renderType = 'footer'
|
|
12
12
|
|
|
13
|
-
function mergeFooterMethod (mergeFooterList: VxeTableDefines.MergeItem[], _rowIndex: number, _columnIndex: number) {
|
|
14
|
-
for (let mIndex = 0; mIndex < mergeFooterList.length; mIndex++) {
|
|
15
|
-
const { row: mergeRowIndex, col: mergeColIndex, rowspan: mergeRowspan, colspan: mergeColspan } = mergeFooterList[mIndex]
|
|
16
|
-
if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
|
|
17
|
-
if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
|
|
18
|
-
return { rowspan: mergeRowspan, colspan: mergeColspan }
|
|
19
|
-
}
|
|
20
|
-
if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
|
|
21
|
-
return { rowspan: 0, colspan: 0 }
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
13
|
export default defineComponent({
|
|
28
14
|
name: 'VxeTableFooter',
|
|
29
15
|
props: {
|
|
@@ -62,8 +48,8 @@ export default defineComponent({
|
|
|
62
48
|
|
|
63
49
|
const { fixedType } = props
|
|
64
50
|
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps
|
|
65
|
-
const { scrollXLoad, scrollYLoad, overflowX, currentColumn
|
|
66
|
-
const { fullColumnIdData, scrollXStore } = tableInternalData
|
|
51
|
+
const { scrollXLoad, scrollYLoad, overflowX, currentColumn } = tableReactData
|
|
52
|
+
const { fullColumnIdData, mergeFooterList, mergeFooterCellMaps, scrollXStore } = tableInternalData
|
|
67
53
|
const tooltipOpts = computeTooltipOpts.value
|
|
68
54
|
const resizableOpts = computeResizableOpts.value
|
|
69
55
|
const { isAllColumnDrag } = resizableOpts
|
|
@@ -143,7 +129,7 @@ export default defineComponent({
|
|
|
143
129
|
let isMergeCell = false
|
|
144
130
|
// 合并行或列
|
|
145
131
|
if (mergeFooterList.length) {
|
|
146
|
-
const spanRest =
|
|
132
|
+
const spanRest = mergeFooterCellMaps[`${_rowIndex}:${_columnIndex}`]
|
|
147
133
|
if (spanRest) {
|
|
148
134
|
const { rowspan, colspan } = spanRest
|
|
149
135
|
if (!rowspan || !colspan) {
|