vxe-table 3.20.10 → 3.20.12
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/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/mixin.js +76 -5
- package/es/table/module/custom/panel.js +18 -12
- package/es/table/module/keyboard/mixin.js +1 -3
- package/es/table/src/body.js +4 -2
- package/es/table/src/footer.js +1 -0
- package/es/table/src/header.js +6 -2
- package/es/table/src/methods.js +67 -21
- package/es/table/src/table.js +19 -18
- package/es/table/src/util.js +6 -3
- package/es/table/style.css +14 -0
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +14 -0
- 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/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +164 -73
- 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/mixin.js +81 -5
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +20 -12
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +1 -4
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/body.js +8 -4
- package/lib/table/src/body.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 +13 -8
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +17 -17
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +15 -16
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +6 -3
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +14 -0
- package/lib/table/style/style.min.css +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 +14 -0
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/module/custom/mixin.ts +77 -6
- package/packages/table/module/custom/panel.ts +19 -13
- package/packages/table/module/keyboard/mixin.ts +1 -3
- package/packages/table/src/body.ts +10 -8
- package/packages/table/src/footer.ts +5 -4
- package/packages/table/src/header.ts +15 -10
- package/packages/table/src/methods.ts +71 -22
- package/packages/table/src/table.ts +19 -18
- package/packages/table/src/util.ts +7 -3
- package/styles/components/table-module/custom.scss +14 -0
- /package/es/{iconfont.1774663245801.ttf → iconfont.1776048358910.ttf} +0 -0
- /package/es/{iconfont.1774663245801.woff → iconfont.1776048358910.woff} +0 -0
- /package/es/{iconfont.1774663245801.woff2 → iconfont.1776048358910.woff2} +0 -0
- /package/lib/{iconfont.1774663245801.ttf → iconfont.1776048358910.ttf} +0 -0
- /package/lib/{iconfont.1774663245801.woff → iconfont.1776048358910.woff} +0 -0
- /package/lib/{iconfont.1774663245801.woff2 → iconfont.1776048358910.woff2} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.12",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { getColumnList } from '../../src/util'
|
|
3
|
+
import { toCssUnit } from '../../../ui/src/dom'
|
|
3
4
|
|
|
4
|
-
import type { VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, TableReactData, TableInternalData } from '../../../../types'
|
|
5
|
+
import type { VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, TableReactData, TableInternalData, VxeComponentStyleType } from '../../../../types'
|
|
5
6
|
|
|
6
7
|
function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
7
8
|
const $xeGrid = $xeTable.$xeGrid
|
|
@@ -11,20 +12,28 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
11
12
|
|
|
12
13
|
const { customStore } = reactData
|
|
13
14
|
const customOpts = $xeTable.computeCustomOpts
|
|
15
|
+
const { mode, placement, popupOptions } = customOpts
|
|
16
|
+
const showSimple = !(mode === 'modal' || mode === 'drawer')
|
|
17
|
+
const { transfer, maxHeight } = popupOptions || {}
|
|
14
18
|
const customSimpleMode = $xeTable.computeCustomSimpleMode
|
|
15
19
|
const showCustomSimpleOutside = customSimpleMode === 'outside'
|
|
16
|
-
const
|
|
17
|
-
const { maxHeight } = popupOptions || {}
|
|
20
|
+
const bodyEl = document.documentElement
|
|
18
21
|
let wrapperEl = $xeTable.$refs.refElem as HTMLDivElement
|
|
19
22
|
let popupTop = 0
|
|
20
23
|
let popupMaxHeight: string | number = 0
|
|
24
|
+
const popupStys: VxeComponentStyleType = {}
|
|
21
25
|
if ($xeGantt) {
|
|
22
26
|
const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem as HTMLDivElement
|
|
23
27
|
if (ganttContainerElem) {
|
|
24
28
|
wrapperEl = ganttContainerElem
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
const tableRect = wrapperEl.getBoundingClientRect()
|
|
32
|
+
// 多种模式,指定元素插入
|
|
33
|
+
if (showSimple && transfer) {
|
|
34
|
+
popupTop = tableRect.top + bodyEl.scrollTop
|
|
35
|
+
popupMaxHeight = XEUtils.eqNull(maxHeight) ? 360 : maxHeight
|
|
36
|
+
} else if (showCustomSimpleOutside) {
|
|
28
37
|
if ($xeGGWrapper && wrapperEl) {
|
|
29
38
|
popupTop = wrapperEl.offsetTop
|
|
30
39
|
}
|
|
@@ -36,8 +45,33 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
36
45
|
}
|
|
37
46
|
popupMaxHeight = Math.max(88, popupMaxHeight)
|
|
38
47
|
}
|
|
39
|
-
|
|
40
|
-
|
|
48
|
+
let popupMxHeight: string | number = 0
|
|
49
|
+
if (!(placement === 'left' || placement === 'right')) {
|
|
50
|
+
popupMxHeight = XEUtils.eqNull(maxHeight) ? popupMaxHeight : maxHeight
|
|
51
|
+
}
|
|
52
|
+
if (!placement || !(['left', 'right', 'bottom-left', 'bottom-right'].includes(placement))) {
|
|
53
|
+
if (popupTop) {
|
|
54
|
+
popupStys.top = toCssUnit(popupTop)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (showSimple && transfer) {
|
|
59
|
+
if (placement === 'bottom-left' || placement === 'bottom-right') {
|
|
60
|
+
popupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1)
|
|
61
|
+
}
|
|
62
|
+
if (placement === 'top-left' || placement === 'bottom-left') {
|
|
63
|
+
popupStys.left = toCssUnit(tableRect.left)
|
|
64
|
+
} else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
|
|
65
|
+
popupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (popupMxHeight) {
|
|
70
|
+
popupStys.maxHeight = toCssUnit(popupMxHeight)
|
|
71
|
+
}
|
|
72
|
+
customStore.popupStyle = popupStys
|
|
73
|
+
customStore.maxHeight = popupMxHeight
|
|
74
|
+
return $xeTable.$nextTick()
|
|
41
75
|
}
|
|
42
76
|
|
|
43
77
|
function emitCustomEvent ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, type: VxeTableDefines.CustomType, evnt: Event) {
|
|
@@ -60,8 +94,40 @@ export default {
|
|
|
60
94
|
_openCustom () {
|
|
61
95
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
62
96
|
const reactData = $xeTable as unknown as TableReactData
|
|
97
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
98
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
99
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
100
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
63
101
|
|
|
64
102
|
const { initStore, customStore } = reactData
|
|
103
|
+
const customOpts = $xeTable.computeCustomOpts
|
|
104
|
+
const { mode, popupOptions } = customOpts
|
|
105
|
+
const showSimple = !(mode === 'modal' || mode === 'drawer')
|
|
106
|
+
const { transfer } = popupOptions || {}
|
|
107
|
+
const customSimpleMode = $xeTable.computeCustomSimpleMode
|
|
108
|
+
const showCustomSimpleOutside = customSimpleMode === 'outside'
|
|
109
|
+
let cpToElem = $xeTable.$refs.refCustomContainerElem as HTMLElement
|
|
110
|
+
// 多种模式,指定元素插入
|
|
111
|
+
if (showSimple && transfer) {
|
|
112
|
+
cpToElem = document.body
|
|
113
|
+
} else {
|
|
114
|
+
if (showCustomSimpleOutside && $xeGGWrapper) {
|
|
115
|
+
const popupContainerElem = $xeGGWrapper.$refs.refPopupContainerElem as HTMLDivElement
|
|
116
|
+
if (popupContainerElem) {
|
|
117
|
+
cpToElem = popupContainerElem
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (cpToElem) {
|
|
122
|
+
const customPopupToElem = $xeTable.$refs.refCustomPopupToElem as HTMLDivElement
|
|
123
|
+
if (customPopupToElem && customPopupToElem.parentElement !== cpToElem) {
|
|
124
|
+
cpToElem.appendChild(customPopupToElem)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (internalData.customPopupToElem !== cpToElem) {
|
|
128
|
+
reactData.ctPopupFlag++
|
|
129
|
+
}
|
|
130
|
+
internalData.customPopupToElem = cpToElem
|
|
65
131
|
customStore.visible = true
|
|
66
132
|
initStore.custom = true
|
|
67
133
|
$xeTable.handleUpdateCustomColumn()
|
|
@@ -364,6 +430,11 @@ export default {
|
|
|
364
430
|
customStore.oldVisibleMaps = visibleMaps
|
|
365
431
|
reactData.customColumnList = collectColumn.slice(0)
|
|
366
432
|
}
|
|
433
|
+
},
|
|
434
|
+
handleCustomStyle () {
|
|
435
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
436
|
+
|
|
437
|
+
return updatePopupStyle($xeTable)
|
|
367
438
|
}
|
|
368
439
|
} as any
|
|
369
440
|
}
|
|
@@ -2,12 +2,12 @@ import { CreateElement, VNode, PropType } from 'vue'
|
|
|
2
2
|
import { defineVxeComponent } from '../../../ui/src/comp'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
4
|
import { formatText } from '../../../ui/src/utils'
|
|
5
|
-
import { getTpImg, addClass, removeClass, hasControlKey
|
|
5
|
+
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom'
|
|
6
6
|
import { errLog } from '../../../ui/src/log'
|
|
7
7
|
import XEUtils from 'xe-utils'
|
|
8
8
|
|
|
9
9
|
import type { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods, TableReactData, TableInternalData, VxeColumnPropTypes, VxeTableCustomPanelConstructor, TableCustomPanelReactData, TableCustomPanelInternalData } from '../../../../types'
|
|
10
|
-
import type { VxeButtonDefines, VxeRadioGroupDefines
|
|
10
|
+
import type { VxeButtonDefines, VxeRadioGroupDefines } from 'vxe-pc-ui'
|
|
11
11
|
|
|
12
12
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI
|
|
13
13
|
|
|
@@ -389,11 +389,18 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
389
389
|
},
|
|
390
390
|
sortDragstartEvent (evnt: any) {
|
|
391
391
|
const $xeTableCustomPanel = this
|
|
392
|
+
const $xeTable = $xeTableCustomPanel.$xeTable
|
|
393
|
+
const tableReactData = $xeTable as unknown as TableReactData
|
|
392
394
|
const customPanelInternalData = $xeTableCustomPanel.internalData
|
|
393
395
|
|
|
396
|
+
const { customDragTime } = customPanelInternalData
|
|
394
397
|
if (evnt.dataTransfer) {
|
|
395
398
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0)
|
|
396
399
|
}
|
|
400
|
+
if (customDragTime) {
|
|
401
|
+
clearTimeout(customDragTime)
|
|
402
|
+
}
|
|
403
|
+
tableReactData.isCustomDragStatus = true
|
|
397
404
|
customPanelInternalData.prevDragGroupField = null
|
|
398
405
|
customPanelInternalData.prevDragAggFnColid = null
|
|
399
406
|
},
|
|
@@ -582,6 +589,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
582
589
|
tableReactData.customColumnList = collectColumn.slice(0)
|
|
583
590
|
$xeTable.handleColDragSwapColumn()
|
|
584
591
|
}
|
|
592
|
+
customPanelInternalData.customDragTime = setTimeout(() => {
|
|
593
|
+
tableReactData.isCustomDragStatus = false
|
|
594
|
+
customPanelInternalData.customDragTime = undefined
|
|
595
|
+
}, 350)
|
|
585
596
|
}).catch(() => {
|
|
586
597
|
})
|
|
587
598
|
}
|
|
@@ -697,13 +708,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
697
708
|
|
|
698
709
|
const { customStore } = props
|
|
699
710
|
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps
|
|
700
|
-
const { isCustomStatus, customColumnList } = tableReactData
|
|
711
|
+
const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData
|
|
701
712
|
const customOpts = $xeTable.computeCustomOpts
|
|
702
713
|
const { immediate } = customOpts
|
|
703
714
|
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
704
|
-
const {
|
|
715
|
+
const { popupStyle } = customStore
|
|
705
716
|
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts
|
|
706
717
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn
|
|
718
|
+
const vSize = $xeTable.computeSize
|
|
707
719
|
const { isCrossDrag } = columnDragOpts
|
|
708
720
|
const slots = customOpts.slots || {}
|
|
709
721
|
const headerSlot = slots.header
|
|
@@ -858,20 +870,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
858
870
|
)
|
|
859
871
|
}
|
|
860
872
|
})
|
|
861
|
-
const popupStys: VxeComponentStyleType = {}
|
|
862
|
-
if (maxHeight && !['left', 'right'].includes(placement || '')) {
|
|
863
|
-
if (popupTop) {
|
|
864
|
-
popupStys.top = toCssUnit(popupTop)
|
|
865
|
-
}
|
|
866
|
-
popupStys.maxHeight = toCssUnit(maxHeight)
|
|
867
|
-
}
|
|
868
873
|
return h('div', {
|
|
869
874
|
ref: 'refElem',
|
|
870
875
|
key: 'simple',
|
|
871
876
|
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
877
|
+
[`size--${vSize}`]: vSize,
|
|
872
878
|
'is--active': customStore.visible
|
|
873
879
|
}],
|
|
874
|
-
style:
|
|
880
|
+
style: popupStyle
|
|
875
881
|
}, customStore.visible
|
|
876
882
|
? [
|
|
877
883
|
h('div', {
|
|
@@ -941,7 +947,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
941
947
|
: h('transition-group', {
|
|
942
948
|
class: 'vxe-table-custom--panel-list',
|
|
943
949
|
props: {
|
|
944
|
-
name: 'vxe-table-custom--list',
|
|
950
|
+
name: isCustomDragStatus ? 'vxe-table-custom--list' : '',
|
|
945
951
|
tag: 'ul'
|
|
946
952
|
},
|
|
947
953
|
on: customWrapperOns
|
|
@@ -362,12 +362,10 @@ export default {
|
|
|
362
362
|
moveCurrentRow (isUpArrow: boolean, isDwArrow: boolean, evnt: any) {
|
|
363
363
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
364
364
|
const props = $xeTable
|
|
365
|
-
const reactData = $xeTable as unknown as TableReactData
|
|
366
365
|
const internalData = $xeTable as unknown as TableInternalData
|
|
367
366
|
|
|
368
367
|
const { treeConfig } = props
|
|
369
|
-
const { currentRow } =
|
|
370
|
-
const { afterFullData } = internalData
|
|
368
|
+
const { afterFullData, currentRow } = internalData
|
|
371
369
|
const treeOpts = $xeTable.computeTreeOpts
|
|
372
370
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
373
371
|
let targetRow
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType, CreateElement } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
4
5
|
import { isEnableConf, getClass } from '../../ui/src/utils'
|
|
5
6
|
import { getRowid, createHandleGetRowId, getCellRestHeight } from './util'
|
|
6
7
|
import { updateCellTitle } from '../../ui/src/dom'
|
|
@@ -488,7 +489,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
488
489
|
|
|
489
490
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps
|
|
490
491
|
const { hasFixedColumn, treeExpandedFlag, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData
|
|
491
|
-
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData
|
|
492
|
+
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps, currentRow } = tableInternalData
|
|
492
493
|
const checkboxOpts = $xeTable.computeCheckboxOpts
|
|
493
494
|
const radioOpts = $xeTable.computeRadioOpts
|
|
494
495
|
const treeOpts = $xeTable.computeTreeOpts
|
|
@@ -579,7 +580,8 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
579
580
|
'row--radio': radioOpts.highlight && selectRadioRow === row,
|
|
580
581
|
'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
|
|
581
582
|
'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
|
|
582
|
-
'row--group': hasRowGroupAggregate
|
|
583
|
+
'row--group': hasRowGroupAggregate,
|
|
584
|
+
'row--current': currentRow && rowid === getRowid($xeTable, currentRow)
|
|
583
585
|
},
|
|
584
586
|
rowClassName ? (XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName) : ''
|
|
585
587
|
]
|
|
@@ -709,7 +711,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
709
711
|
return rows
|
|
710
712
|
}
|
|
711
713
|
|
|
712
|
-
export default {
|
|
714
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
713
715
|
name: 'VxeTableBody',
|
|
714
716
|
props: {
|
|
715
717
|
tableData: Array as PropType<any[]>,
|
|
@@ -717,10 +719,10 @@ export default {
|
|
|
717
719
|
fixedColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
|
|
718
720
|
fixedType: {
|
|
719
721
|
type: String as PropType<'right' | 'left' | ''>,
|
|
720
|
-
default: ''
|
|
722
|
+
default: '' as 'right' | 'left' | ''
|
|
721
723
|
}
|
|
722
724
|
},
|
|
723
|
-
mounted (
|
|
725
|
+
mounted () {
|
|
724
726
|
const _vm = this
|
|
725
727
|
const props = _vm
|
|
726
728
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
@@ -738,7 +740,7 @@ export default {
|
|
|
738
740
|
elemStore[`${prefix}ySpace`] = _vm.$refs.refBodyYSpace
|
|
739
741
|
elemStore[`${prefix}emptyBlock`] = _vm.$refs.refBodyEmptyBlock
|
|
740
742
|
},
|
|
741
|
-
destroyed (
|
|
743
|
+
destroyed () {
|
|
742
744
|
const props = this
|
|
743
745
|
const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
744
746
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
@@ -755,7 +757,7 @@ export default {
|
|
|
755
757
|
elemStore[`${prefix}ySpace`] = null
|
|
756
758
|
elemStore[`${prefix}emptyBlock`] = null
|
|
757
759
|
},
|
|
758
|
-
render (
|
|
760
|
+
render (h: CreateElement) {
|
|
759
761
|
const props = this
|
|
760
762
|
const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
761
763
|
const tableProps = $xeTable
|
|
@@ -968,4 +970,4 @@ export default {
|
|
|
968
970
|
])
|
|
969
971
|
])
|
|
970
972
|
}
|
|
971
|
-
}
|
|
973
|
+
}) /* define-vxe-component end */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType, CreateElement } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
4
5
|
import { getClass } from '../../ui/src/utils'
|
|
5
6
|
import { updateCellTitle } from '../../ui/src/dom'
|
|
6
7
|
import { getCalcHeight } from './util'
|
|
@@ -222,7 +223,7 @@ function renderHeads (h: CreateElement, _vm: any, isOptimizeMode: boolean, rende
|
|
|
222
223
|
})
|
|
223
224
|
}
|
|
224
225
|
|
|
225
|
-
export default {
|
|
226
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
226
227
|
name: 'VxeTableFooter',
|
|
227
228
|
props: {
|
|
228
229
|
footerTableData: {
|
|
@@ -243,7 +244,7 @@ export default {
|
|
|
243
244
|
}
|
|
244
245
|
},
|
|
245
246
|
mounted () {
|
|
246
|
-
const _vm = this
|
|
247
|
+
const _vm = this
|
|
247
248
|
const props = _vm
|
|
248
249
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
249
250
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
@@ -259,7 +260,7 @@ export default {
|
|
|
259
260
|
elemStore[`${prefix}xSpace`] = _vm.$refs.refFooterXSpace
|
|
260
261
|
},
|
|
261
262
|
destroyed () {
|
|
262
|
-
const _vm = this
|
|
263
|
+
const _vm = this
|
|
263
264
|
const props = _vm
|
|
264
265
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
265
266
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
@@ -385,4 +386,4 @@ export default {
|
|
|
385
386
|
])
|
|
386
387
|
])
|
|
387
388
|
}
|
|
388
|
-
}
|
|
389
|
+
}) /* define-vxe-component end */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType, CreateElement } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
4
5
|
import { isEnableConf, getClass } from '../../ui/src/utils'
|
|
5
6
|
import { getCalcHeight, convertHeaderColumnToRows, convertHeaderToGridRows } from './util'
|
|
6
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -362,7 +363,7 @@ function renderHeads (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMo
|
|
|
362
363
|
return rowVNs
|
|
363
364
|
}
|
|
364
365
|
|
|
365
|
-
export default {
|
|
366
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
366
367
|
name: 'VxeTableHeader',
|
|
367
368
|
props: {
|
|
368
369
|
tableData: Array as PropType<any[]>,
|
|
@@ -375,8 +376,10 @@ export default {
|
|
|
375
376
|
}
|
|
376
377
|
},
|
|
377
378
|
data () {
|
|
379
|
+
const headerColumn: VxeTableDefines.ColumnInfo[][] = []
|
|
380
|
+
|
|
378
381
|
return {
|
|
379
|
-
headerColumn
|
|
382
|
+
headerColumn
|
|
380
383
|
}
|
|
381
384
|
},
|
|
382
385
|
watch: {
|
|
@@ -391,7 +394,7 @@ export default {
|
|
|
391
394
|
_vm.uploadColumn()
|
|
392
395
|
},
|
|
393
396
|
mounted () {
|
|
394
|
-
const _vm = this
|
|
397
|
+
const _vm = this
|
|
395
398
|
const props = _vm
|
|
396
399
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
397
400
|
const internalData = $xeTable as unknown as TableInternalData
|
|
@@ -408,7 +411,7 @@ export default {
|
|
|
408
411
|
elemStore[`${prefix}repair`] = _vm.$refs.refHeaderBorderRepair
|
|
409
412
|
},
|
|
410
413
|
destroyed () {
|
|
411
|
-
const _vm = this
|
|
414
|
+
const _vm = this
|
|
412
415
|
const props = _vm
|
|
413
416
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
414
417
|
const internalData = $xeTable as unknown as TableInternalData
|
|
@@ -425,7 +428,7 @@ export default {
|
|
|
425
428
|
elemStore[`${prefix}repair`] = null
|
|
426
429
|
},
|
|
427
430
|
render (h: CreateElement) {
|
|
428
|
-
const _vm = this
|
|
431
|
+
const _vm = this
|
|
429
432
|
const props = _vm
|
|
430
433
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
431
434
|
const tableProps = $xeTable
|
|
@@ -434,7 +437,7 @@ export default {
|
|
|
434
437
|
|
|
435
438
|
const { xID } = $xeTable
|
|
436
439
|
const { fixedType, fixedColumn, tableColumn } = props
|
|
437
|
-
const { headerColumn } = _vm
|
|
440
|
+
const { headerColumn } = _vm as any
|
|
438
441
|
|
|
439
442
|
const { mouseConfig } = tableProps
|
|
440
443
|
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData
|
|
@@ -577,7 +580,7 @@ export default {
|
|
|
577
580
|
},
|
|
578
581
|
methods: {
|
|
579
582
|
uploadColumn () {
|
|
580
|
-
const _vm = this
|
|
583
|
+
const _vm = this
|
|
581
584
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
582
585
|
const tableProps = $xeTable
|
|
583
586
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
@@ -595,8 +598,10 @@ export default {
|
|
|
595
598
|
visibleColgroups = convertHeaderToGridRows(spanColumns)
|
|
596
599
|
spanColumns = visibleColgroups
|
|
597
600
|
}
|
|
598
|
-
_vm.headerColumn = spanColumns
|
|
599
|
-
$xeTable
|
|
601
|
+
(_vm as any).headerColumn = spanColumns
|
|
602
|
+
$xeTable.$nextTick(() => {
|
|
603
|
+
$xeTable.dispatchEvent('columns-change', { visibleColgroups, collectColumn, visibleColumn }, null)
|
|
604
|
+
})
|
|
600
605
|
}
|
|
601
606
|
}
|
|
602
|
-
}
|
|
607
|
+
}) /* define-vxe-component end */
|