vxe-table 4.14.0-beta.1 → 4.14.0-beta.2
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.en.md +2 -1
- package/README.ja-JP.md +2 -1
- package/README.md +4 -2
- package/README.zh-TW.md +2 -1
- package/es/grid/src/grid.js +28 -19
- 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/custom/hook.js +0 -4
- package/es/table/module/custom/panel.js +0 -1
- package/es/table/src/anime.js +46 -0
- package/es/table/src/body.js +9 -24
- package/es/table/src/columnInfo.js +5 -0
- package/es/table/src/footer.js +5 -22
- package/es/table/src/header.js +4 -21
- package/es/table/src/table.js +561 -357
- package/es/table/src/util.js +1 -1
- package/es/table/style.css +8 -8
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +8 -8
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +33 -21
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +141 -127
- 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/custom/hook.js +0 -4
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +0 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/anime.js +56 -0
- package/lib/table/src/anime.min.js +1 -0
- package/lib/table/src/body.js +3 -26
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +5 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +2 -20
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +2 -19
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +46 -33
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +2 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +8 -8
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +2 -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 +8 -8
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +30 -20
- package/packages/table/module/custom/hook.ts +0 -4
- package/packages/table/module/custom/panel.ts +0 -1
- package/packages/table/src/anime.ts +52 -0
- package/packages/table/src/body.ts +15 -38
- package/packages/table/src/columnInfo.ts +5 -0
- package/packages/table/src/footer.ts +5 -22
- package/packages/table/src/header.ts +4 -21
- package/packages/table/src/table.ts +569 -360
- package/packages/table/src/util.ts +1 -1
- package/packages/ui/index.ts +1 -0
- package/styles/components/table.scss +9 -9
- /package/es/{iconfont.1750910518778.ttf → iconfont.1751195167653.ttf} +0 -0
- /package/es/{iconfont.1750910518778.woff → iconfont.1751195167653.woff} +0 -0
- /package/es/{iconfont.1750910518778.woff2 → iconfont.1751195167653.woff2} +0 -0
- /package/lib/{iconfont.1750910518778.ttf → iconfont.1751195167653.ttf} +0 -0
- /package/lib/{iconfont.1750910518778.woff → iconfont.1751195167653.woff} +0 -0
- /package/lib/{iconfont.1750910518778.woff2 → iconfont.1751195167653.woff2} +0 -0
|
@@ -175,11 +175,12 @@ export default defineVxeComponent({
|
|
|
175
175
|
})
|
|
176
176
|
|
|
177
177
|
const computeTableProps = computed(() => {
|
|
178
|
-
const { seqConfig, pagerConfig,
|
|
179
|
-
const { isZMax,
|
|
178
|
+
const { seqConfig, pagerConfig, editConfig, proxyConfig } = props
|
|
179
|
+
const { isZMax, tablePage } = reactData
|
|
180
180
|
const tableExtendProps = computeTableExtendProps.value
|
|
181
181
|
const proxyOpts = computeProxyOpts.value
|
|
182
182
|
const pagerOpts = computePagerOpts.value
|
|
183
|
+
const isLoading = computeIsLoading.value
|
|
183
184
|
const tProps = Object.assign({}, tableExtendProps)
|
|
184
185
|
if (isZMax) {
|
|
185
186
|
if (tableExtendProps.maxHeight) {
|
|
@@ -189,7 +190,7 @@ export default defineVxeComponent({
|
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
192
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
192
|
-
tProps.loading =
|
|
193
|
+
tProps.loading = isLoading
|
|
193
194
|
if (pagerConfig && proxyOpts.seq && isEnableConf(pagerOpts)) {
|
|
194
195
|
tProps.seqConfig = Object.assign({}, seqConfig, { startIndex: (tablePage.currentPage - 1) * tablePage.pageSize })
|
|
195
196
|
}
|
|
@@ -242,6 +243,14 @@ export default defineVxeComponent({
|
|
|
242
243
|
return pagerOpts.total
|
|
243
244
|
})
|
|
244
245
|
|
|
246
|
+
const computeIsLoading = computed(() => {
|
|
247
|
+
const { loading, proxyConfig } = props
|
|
248
|
+
const { tableLoading } = reactData
|
|
249
|
+
const proxyOpts = computeProxyOpts.value
|
|
250
|
+
const { showLoading } = proxyOpts
|
|
251
|
+
return loading || (tableLoading && showLoading && proxyConfig && isEnableConf(proxyOpts))
|
|
252
|
+
})
|
|
253
|
+
|
|
245
254
|
const refMaps: GridPrivateRef = {
|
|
246
255
|
refElem,
|
|
247
256
|
refTable,
|
|
@@ -981,7 +990,7 @@ export default defineVxeComponent({
|
|
|
981
990
|
reactData.formData = formData
|
|
982
991
|
}
|
|
983
992
|
if ($xeTable) {
|
|
984
|
-
const
|
|
993
|
+
const tableInternalData = $xeTable.internalData
|
|
985
994
|
const { tableFullColumn, fullColumnFieldData } = tableInternalData
|
|
986
995
|
const { computeSortOpts } = $xeTable.getComputeMaps()
|
|
987
996
|
const sortOpts = computeSortOpts.value
|
|
@@ -1381,6 +1390,23 @@ export default defineVxeComponent({
|
|
|
1381
1390
|
}
|
|
1382
1391
|
})
|
|
1383
1392
|
|
|
1393
|
+
const renderVN = () => {
|
|
1394
|
+
const vSize = computeSize.value
|
|
1395
|
+
const styles = computeStyles.value
|
|
1396
|
+
const isLoading = computeIsLoading.value
|
|
1397
|
+
return h('div', {
|
|
1398
|
+
ref: refElem,
|
|
1399
|
+
class: ['vxe-grid', {
|
|
1400
|
+
[`size--${vSize}`]: vSize,
|
|
1401
|
+
'is--animat': !!props.animat,
|
|
1402
|
+
'is--round': props.round,
|
|
1403
|
+
'is--maximize': reactData.isZMax,
|
|
1404
|
+
'is--loading': isLoading
|
|
1405
|
+
}],
|
|
1406
|
+
style: styles
|
|
1407
|
+
}, renderLayout())
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1384
1410
|
const columnFlag = ref(0)
|
|
1385
1411
|
watch(() => props.columns ? props.columns.length : -1, () => {
|
|
1386
1412
|
columnFlag.value++
|
|
@@ -1463,22 +1489,6 @@ export default defineVxeComponent({
|
|
|
1463
1489
|
globalEvents.off($xeGrid, 'keydown')
|
|
1464
1490
|
})
|
|
1465
1491
|
|
|
1466
|
-
const renderVN = () => {
|
|
1467
|
-
const vSize = computeSize.value
|
|
1468
|
-
const styles = computeStyles.value
|
|
1469
|
-
return h('div', {
|
|
1470
|
-
ref: refElem,
|
|
1471
|
-
class: ['vxe-grid', {
|
|
1472
|
-
[`size--${vSize}`]: vSize,
|
|
1473
|
-
'is--animat': !!props.animat,
|
|
1474
|
-
'is--round': props.round,
|
|
1475
|
-
'is--maximize': reactData.isZMax,
|
|
1476
|
-
'is--loading': props.loading || reactData.tableLoading
|
|
1477
|
-
}],
|
|
1478
|
-
style: styles
|
|
1479
|
-
}, renderLayout())
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
1492
|
$xeGrid.renderVN = renderVN
|
|
1483
1493
|
|
|
1484
1494
|
provide('$xeGrid', $xeGrid)
|
|
@@ -111,10 +111,6 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
111
111
|
}
|
|
112
112
|
})
|
|
113
113
|
reactData.isCustomStatus = true
|
|
114
|
-
reactData.isDragColMove = true
|
|
115
|
-
setTimeout(() => {
|
|
116
|
-
reactData.isDragColMove = false
|
|
117
|
-
}, 1000)
|
|
118
114
|
return $xeTable.saveCustomStore('confirm').then(() => {
|
|
119
115
|
if (allowGroup && allowValues && ($xeTable as any).handlePivotTableAggregateData) {
|
|
120
116
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
import XEUtils from 'xe-utils'
|
|
3
|
+
import { addClass, removeClass } from '../../ui/src/dom'
|
|
4
|
+
|
|
5
|
+
const rowMoveCls = 'row--drag-move'
|
|
6
|
+
const colMoveClass = 'col--drag-move'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 上下拖拽
|
|
10
|
+
*/
|
|
11
|
+
export function moveRowAnimateToTb (elemList: NodeListOf<HTMLElement> | HTMLDivElement[], offsetTop: number) {
|
|
12
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
13
|
+
trEl.style.transform = `translateY(${offsetTop}px)`
|
|
14
|
+
})
|
|
15
|
+
requestAnimationFrame(() => {
|
|
16
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
17
|
+
addClass(trEl, rowMoveCls)
|
|
18
|
+
trEl.style.transform = ''
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function clearRowAnimate (elem: HTMLElement | undefined) {
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
if (elem) {
|
|
26
|
+
XEUtils.arrayEach(elem.querySelectorAll(`.vxe-body--row.${rowMoveCls}`), elem => removeClass(elem, rowMoveCls))
|
|
27
|
+
}
|
|
28
|
+
}, 500)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 左右拖拽
|
|
33
|
+
*/
|
|
34
|
+
export function moveColAnimateToLr (elemList: NodeListOf<HTMLElement> | HTMLDivElement[], offsetLeft: number) {
|
|
35
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
36
|
+
trEl.style.transform = `translateX(${offsetLeft}px)`
|
|
37
|
+
})
|
|
38
|
+
requestAnimationFrame(() => {
|
|
39
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
40
|
+
addClass(trEl, colMoveClass)
|
|
41
|
+
trEl.style.transform = ''
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function clearColAnimate (elem: HTMLElement | undefined) {
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
if (elem) {
|
|
49
|
+
XEUtils.arrayEach(elem.querySelectorAll(`.vxe-table--column.${colMoveClass}`), elem => removeClass(elem, colMoveClass))
|
|
50
|
+
}
|
|
51
|
+
}, 500)
|
|
52
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, ref, Ref, PropType, inject, nextTick, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI } from '../../ui'
|
|
@@ -28,7 +28,7 @@ export default defineVxeComponent({
|
|
|
28
28
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTablePrivateMethods)
|
|
29
29
|
|
|
30
30
|
const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
31
|
-
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts,
|
|
31
|
+
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeResizableOpts, computeVirtualXOpts, computeVirtualYOpts } = $xeTable.getComputeMaps()
|
|
32
32
|
|
|
33
33
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
34
34
|
const refBodyScroll = ref() as Ref<HTMLDivElement>
|
|
@@ -434,7 +434,7 @@ export default defineVxeComponent({
|
|
|
434
434
|
|
|
435
435
|
return h('td', {
|
|
436
436
|
class: [
|
|
437
|
-
'vxe-body--column',
|
|
437
|
+
'vxe-table--column vxe-body--column',
|
|
438
438
|
colid,
|
|
439
439
|
cellVerticalAlign ? `col--vertical-${cellVerticalAlign}` : '',
|
|
440
440
|
cellAlign ? `col--${cellAlign}` : '',
|
|
@@ -474,7 +474,7 @@ export default defineVxeComponent({
|
|
|
474
474
|
const $xeGrid = $xeTable.xeGrid
|
|
475
475
|
|
|
476
476
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps
|
|
477
|
-
const { hasFixedColumn, treeExpandedFlag,
|
|
477
|
+
const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData
|
|
478
478
|
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData
|
|
479
479
|
const checkboxOpts = computeCheckboxOpts.value
|
|
480
480
|
const radioOpts = computeRadioOpts.value
|
|
@@ -482,7 +482,6 @@ export default defineVxeComponent({
|
|
|
482
482
|
const editOpts = computeEditOpts.value
|
|
483
483
|
const rowOpts = computeRowOpts.value
|
|
484
484
|
const columnOpts = computeColumnOpts.value
|
|
485
|
-
const columnDragOpts = computeColumnDragOpts.value
|
|
486
485
|
const { transform, seqMode } = treeOpts
|
|
487
486
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
488
487
|
const rows: any[] = []
|
|
@@ -562,25 +561,13 @@ export default defineVxeComponent({
|
|
|
562
561
|
return renderTdColumn(seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData)
|
|
563
562
|
})
|
|
564
563
|
rows.push(
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
|
|
573
|
-
...trOn
|
|
574
|
-
}, {
|
|
575
|
-
default: () => tdVNs
|
|
576
|
-
})
|
|
577
|
-
: h('tr', {
|
|
578
|
-
class: trClass,
|
|
579
|
-
rowid: rowid,
|
|
580
|
-
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
|
|
581
|
-
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
|
|
582
|
-
...trOn
|
|
583
|
-
}, tdVNs)
|
|
564
|
+
h('tr', {
|
|
565
|
+
class: trClass,
|
|
566
|
+
rowid: rowid,
|
|
567
|
+
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
|
|
568
|
+
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
|
|
569
|
+
...trOn
|
|
570
|
+
}, tdVNs)
|
|
584
571
|
)
|
|
585
572
|
// 如果行被展开了
|
|
586
573
|
if (isExpandRow) {
|
|
@@ -715,12 +702,10 @@ export default defineVxeComponent({
|
|
|
715
702
|
|
|
716
703
|
const { fixedColumn, fixedType, tableColumn } = props
|
|
717
704
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps
|
|
718
|
-
const { isGroup, tableData,
|
|
705
|
+
const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad, isAllOverflow, expandColumn, dragRow, dragCol } = tableReactData
|
|
719
706
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData
|
|
720
|
-
const rowOpts = computeRowOpts.value
|
|
721
707
|
const emptyOpts = computeEmptyOpts.value
|
|
722
708
|
const mouseOpts = computeMouseOpts.value
|
|
723
|
-
const rowDragOpts = computeRowDragOpts.value
|
|
724
709
|
const expandOpts = computeExpandOpts.value
|
|
725
710
|
|
|
726
711
|
let renderDataList = tableData
|
|
@@ -860,17 +845,9 @@ export default defineVxeComponent({
|
|
|
860
845
|
/**
|
|
861
846
|
* 内容
|
|
862
847
|
*/
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`,
|
|
867
|
-
tag: 'tbody'
|
|
868
|
-
}, {
|
|
869
|
-
default: () => renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList)
|
|
870
|
-
})
|
|
871
|
-
: h('tbody', {
|
|
872
|
-
ref: refBodyTBody
|
|
873
|
-
}, renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList))
|
|
848
|
+
h('tbody', {
|
|
849
|
+
ref: refBodyTBody
|
|
850
|
+
}, renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList))
|
|
874
851
|
]),
|
|
875
852
|
h('div', {
|
|
876
853
|
class: 'vxe-table--checkbox-range'
|
|
@@ -47,6 +47,11 @@ export class ColumnInfo {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
if (_vm.aggFunc) {
|
|
51
|
+
if (!$xeTable.handlePivotTableAggregateData && _vm.aggFunc !== true) {
|
|
52
|
+
errLog('vxe.error.errProp', [`column.agg-func=${_vm.aggFunc}`, 'column.agg-func=true'])
|
|
53
|
+
}
|
|
54
|
+
}
|
|
50
55
|
|
|
51
56
|
Object.assign(this, {
|
|
52
57
|
// 基本属性
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, ref, Ref, PropType, inject, nextTick, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI } from '../../ui'
|
|
5
5
|
import { updateCellTitle, getPropClass } from '../../ui/src/dom'
|
|
6
|
-
import {
|
|
6
|
+
import { getCalcHeight } from './util'
|
|
7
7
|
|
|
8
8
|
import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines } from '../../../types'
|
|
9
9
|
|
|
@@ -35,7 +35,7 @@ export default defineVxeComponent({
|
|
|
35
35
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
36
36
|
|
|
37
37
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
38
|
-
const { computeTooltipOpts, computeColumnOpts,
|
|
38
|
+
const { computeTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts } = $xeTable.getComputeMaps()
|
|
39
39
|
|
|
40
40
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
41
41
|
const refFooterScroll = ref() as Ref<HTMLDivElement>
|
|
@@ -59,7 +59,7 @@ export default defineVxeComponent({
|
|
|
59
59
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
60
60
|
const cellOpts = computeCellOpts.value
|
|
61
61
|
const footerCellOpts = computeFooterCellOpts.value
|
|
62
|
-
const currCellHeight =
|
|
62
|
+
const currCellHeight = getCalcHeight(footerCellOpts.height) || defaultRowHeight
|
|
63
63
|
|
|
64
64
|
return tableColumn.map((column, $columnIndex) => {
|
|
65
65
|
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column
|
|
@@ -173,7 +173,7 @@ export default defineVxeComponent({
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
return h('td', {
|
|
176
|
-
class: ['vxe-footer--column', column.id, {
|
|
176
|
+
class: ['vxe-table--column vxe-footer--column', column.id, {
|
|
177
177
|
[`col--${footAlign}`]: footAlign,
|
|
178
178
|
[`col--${type}`]: type,
|
|
179
179
|
'col--last': isLastColumn,
|
|
@@ -222,28 +222,11 @@ export default defineVxeComponent({
|
|
|
222
222
|
const renderHeads = (isOptimizeMode: boolean, renderColumnList: VxeTableDefines.ColumnInfo[]) => {
|
|
223
223
|
const { fixedType, footerTableData } = props
|
|
224
224
|
const { footerRowClassName, footerRowStyle } = tableProps
|
|
225
|
-
const { isColLoading, isDragColMove } = tableReactData
|
|
226
|
-
const columnOpts = computeColumnOpts.value
|
|
227
|
-
const columnDragOpts = computeColumnDragOpts.value
|
|
228
225
|
|
|
229
226
|
return footerTableData.map((row, $rowIndex) => {
|
|
230
227
|
const _rowIndex = $rowIndex
|
|
231
228
|
const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType }
|
|
232
229
|
|
|
233
|
-
if (!isColLoading && columnOpts.drag && columnDragOpts.animation) {
|
|
234
|
-
return h(TransitionGroup, {
|
|
235
|
-
key: $rowIndex,
|
|
236
|
-
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
237
|
-
tag: 'tr',
|
|
238
|
-
class: [
|
|
239
|
-
'vxe-footer--row',
|
|
240
|
-
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
|
|
241
|
-
],
|
|
242
|
-
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
|
|
243
|
-
}, {
|
|
244
|
-
default: () => renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
|
|
245
|
-
})
|
|
246
|
-
}
|
|
247
230
|
return h('tr', {
|
|
248
231
|
key: $rowIndex,
|
|
249
232
|
class: [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, ref, Ref, PropType, inject, nextTick, watch, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI } from '../../ui'
|
|
5
|
-
import {
|
|
5
|
+
import { getCalcHeight, convertHeaderColumnToRows } from './util'
|
|
6
6
|
|
|
7
7
|
import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines, VxeColumnPropTypes } from '../../../types'
|
|
8
8
|
|
|
@@ -56,7 +56,7 @@ export default defineVxeComponent({
|
|
|
56
56
|
const cellOpts = computeCellOpts.value
|
|
57
57
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
58
58
|
const headerCellOpts = computeHeaderCellOpts.value
|
|
59
|
-
const currCellHeight =
|
|
59
|
+
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight
|
|
60
60
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
|
|
61
61
|
|
|
62
62
|
return cols.map((column, $columnIndex) => {
|
|
@@ -146,7 +146,7 @@ export default defineVxeComponent({
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
return h('th', {
|
|
149
|
-
class: ['vxe-header--column', colid, {
|
|
149
|
+
class: ['vxe-table--column vxe-header--column', colid, {
|
|
150
150
|
[`col--${headAlign}`]: headAlign,
|
|
151
151
|
[`col--${type}`]: type,
|
|
152
152
|
'col--last': isLastColumn,
|
|
@@ -203,27 +203,10 @@ export default defineVxeComponent({
|
|
|
203
203
|
const renderHeads = (isGroup: boolean, isOptimizeMode: boolean, headerGroups: VxeTableDefines.ColumnInfo[][]) => {
|
|
204
204
|
const { fixedType } = props
|
|
205
205
|
const { headerRowClassName, headerRowStyle } = tableProps
|
|
206
|
-
const { isColLoading, isDragColMove } = tableReactData
|
|
207
|
-
const columnOpts = computeColumnOpts.value
|
|
208
|
-
const columnDragOpts = computeColumnDragOpts.value
|
|
209
206
|
|
|
210
207
|
return headerGroups.map((cols, $rowIndex) => {
|
|
211
208
|
const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType }
|
|
212
209
|
|
|
213
|
-
if (!isColLoading && columnOpts.drag && columnDragOpts.animation) {
|
|
214
|
-
return h(TransitionGroup, {
|
|
215
|
-
key: $rowIndex,
|
|
216
|
-
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
217
|
-
tag: 'tr',
|
|
218
|
-
class: [
|
|
219
|
-
'vxe-header--row',
|
|
220
|
-
headerRowClassName ? (XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName) : ''
|
|
221
|
-
],
|
|
222
|
-
style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) : null
|
|
223
|
-
}, {
|
|
224
|
-
default: () => renderRows(isGroup, isOptimizeMode, cols, $rowIndex)
|
|
225
|
-
})
|
|
226
|
-
}
|
|
227
210
|
return h('tr', {
|
|
228
211
|
key: $rowIndex,
|
|
229
212
|
class: [
|