vxe-table 4.10.6-beta.8 → 4.10.6
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 +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +2 -1
- package/es/locale/lang/de-DE.js +2 -1
- package/es/locale/lang/en-US.js +4 -3
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/fr-FR.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +2 -1
- package/es/locale/lang/it-IT.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/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +4 -3
- package/es/locale/lang/th-TH.js +2 -1
- package/es/locale/lang/ug-CN.js +2 -1
- package/es/locale/lang/uk-UA.js +518 -517
- 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/module/edit/hook.js +7 -7
- package/es/table/module/export/hook.js +97 -62
- package/es/table/module/keyboard/hook.js +63 -27
- package/es/table/src/body.js +128 -81
- package/es/table/src/cell.js +41 -55
- package/es/table/src/column.js +13 -1
- package/es/table/src/columnInfo.js +3 -0
- package/es/table/src/emits.js +2 -0
- package/es/table/src/footer.js +48 -10
- package/es/table/src/header.js +70 -168
- package/es/table/src/props.js +14 -4
- package/es/table/src/table.js +884 -426
- package/es/table/src/util.js +77 -62
- package/es/table/style.css +253 -189
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +26 -11
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +253 -189
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +1 -1
- 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 +1533 -917
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +2 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +4 -3
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +4 -3
- 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/fr-FR.js +2 -1
- package/lib/locale/lang/fr-FR.min.js +1 -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/hy-AM.js +2 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -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/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -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 +4 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +4 -3
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +518 -517
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +518 -517
- 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/module/edit/hook.js +7 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +97 -57
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +71 -28
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/src/body.js +129 -80
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +32 -42
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +13 -1
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +3 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/footer.js +48 -8
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +54 -181
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/props.js +14 -4
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +935 -417
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +100 -82
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +253 -189
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +26 -11
- 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 +253 -189
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +1 -1
- package/packages/locale/lang/ar-EG.ts +2 -1
- package/packages/locale/lang/de-DE.ts +2 -1
- package/packages/locale/lang/en-US.ts +4 -3
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/fr-FR.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +2 -1
- package/packages/locale/lang/it-IT.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/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +4 -3
- package/packages/locale/lang/th-TH.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +518 -517
- 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/module/edit/hook.ts +7 -7
- package/packages/table/module/export/hook.ts +118 -65
- package/packages/table/module/keyboard/hook.ts +59 -25
- package/packages/table/src/body.ts +148 -91
- package/packages/table/src/cell.ts +41 -63
- package/packages/table/src/column.ts +13 -1
- package/packages/table/src/columnInfo.ts +3 -0
- package/packages/table/src/emits.ts +5 -1
- package/packages/table/src/footer.ts +51 -11
- package/packages/table/src/header.ts +70 -168
- package/packages/table/src/props.ts +14 -5
- package/packages/table/src/table.ts +890 -428
- package/packages/table/src/util.ts +81 -62
- package/packages/ui/index.ts +25 -10
- package/styles/components/table.scss +319 -271
- package/styles/theme/base.scss +4 -6
- package/styles/theme/dark.scss +1 -0
- package/styles/theme/light.scss +1 -0
- package/styles/variable.scss +1 -1
- /package/es/{iconfont.1736840923205.ttf → iconfont.1738985856004.ttf} +0 -0
- /package/es/{iconfont.1736840923205.woff → iconfont.1738985856004.woff} +0 -0
- /package/es/{iconfont.1736840923205.woff2 → iconfont.1738985856004.woff2} +0 -0
- /package/lib/{iconfont.1736840923205.ttf → iconfont.1738985856004.ttf} +0 -0
- /package/lib/{iconfont.1736840923205.woff → iconfont.1738985856004.woff} +0 -0
- /package/lib/{iconfont.1736840923205.woff2 → iconfont.1738985856004.woff2} +0 -0
|
@@ -57,6 +57,16 @@ export const columnProps = {
|
|
|
57
57
|
formatter: [Function, Array, String] as PropType<VxeColumnPropTypes.Formatter<any>>,
|
|
58
58
|
// 格式化表尾显示内容
|
|
59
59
|
footerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.FooterFormatter>,
|
|
60
|
+
// 是否显示间距
|
|
61
|
+
padding: {
|
|
62
|
+
type: Boolean as PropType<VxeColumnPropTypes.Padding>,
|
|
63
|
+
default: null
|
|
64
|
+
},
|
|
65
|
+
// 垂直对齐方式
|
|
66
|
+
verticalAlign: {
|
|
67
|
+
type: String as PropType<VxeColumnPropTypes.VerticalAlign>,
|
|
68
|
+
default: null
|
|
69
|
+
},
|
|
60
70
|
// 是否允许排序
|
|
61
71
|
sortable: Boolean as PropType<VxeColumnPropTypes.Sortable>,
|
|
62
72
|
// 自定义排序的属性
|
|
@@ -83,8 +93,10 @@ export const columnProps = {
|
|
|
83
93
|
filterRender: Object as PropType<VxeColumnPropTypes.FilterRender>,
|
|
84
94
|
// 设置为树节点
|
|
85
95
|
treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
|
|
86
|
-
//
|
|
96
|
+
// 设置为拖拽排序
|
|
87
97
|
dragSort: Boolean as PropType<VxeColumnPropTypes.DragSort>,
|
|
98
|
+
// 设置为行高拖拽
|
|
99
|
+
rowResize: Boolean as PropType<VxeColumnPropTypes.RowResize>,
|
|
88
100
|
// 是否可视
|
|
89
101
|
visible: {
|
|
90
102
|
type: Boolean as PropType<VxeColumnPropTypes.Visible>,
|
|
@@ -74,6 +74,8 @@ export class ColumnInfo {
|
|
|
74
74
|
footerClassName: _vm.footerClassName,
|
|
75
75
|
formatter: formatter,
|
|
76
76
|
footerFormatter: _vm.footerFormatter,
|
|
77
|
+
padding: _vm.padding,
|
|
78
|
+
verticalAlign: _vm.verticalAlign,
|
|
77
79
|
sortable: _vm.sortable,
|
|
78
80
|
sortBy: _vm.sortBy,
|
|
79
81
|
sortType: _vm.sortType,
|
|
@@ -85,6 +87,7 @@ export class ColumnInfo {
|
|
|
85
87
|
filterRender: _vm.filterRender,
|
|
86
88
|
treeNode: _vm.treeNode,
|
|
87
89
|
dragSort: _vm.dragSort,
|
|
90
|
+
rowResize: _vm.rowResize,
|
|
88
91
|
cellType: _vm.cellType,
|
|
89
92
|
cellRender: _vm.cellRender,
|
|
90
93
|
editRender: _vm.editRender,
|
|
@@ -36,7 +36,11 @@ export default [
|
|
|
36
36
|
'filter-change',
|
|
37
37
|
'filter-visible',
|
|
38
38
|
'clear-filter',
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
'resizable-change', // 废弃
|
|
41
|
+
|
|
42
|
+
'column-resizable-change',
|
|
43
|
+
'row-resizable-change',
|
|
40
44
|
'toggle-row-expand',
|
|
41
45
|
'toggle-tree-expand',
|
|
42
46
|
'menu-click',
|
|
@@ -2,6 +2,7 @@ import { defineComponent, TransitionGroup, h, ref, Ref, PropType, inject, nextTi
|
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
4
|
import { updateCellTitle, getPropClass } from '../../ui/src/dom'
|
|
5
|
+
import { getCellHeight } from './util'
|
|
5
6
|
|
|
6
7
|
import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines } from '../../../types'
|
|
7
8
|
|
|
@@ -47,7 +48,7 @@ export default defineComponent({
|
|
|
47
48
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
48
49
|
|
|
49
50
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
50
|
-
const { computeTooltipOpts, computeColumnOpts, computeColumnDragOpts } = $xeTable.getComputeMaps()
|
|
51
|
+
const { computeTooltipOpts, computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts } = $xeTable.getComputeMaps()
|
|
51
52
|
|
|
52
53
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
53
54
|
const refFooterScroll = ref() as Ref<HTMLDivElement>
|
|
@@ -58,31 +59,42 @@ export default defineComponent({
|
|
|
58
59
|
|
|
59
60
|
const renderRows = (tableColumn: VxeTableDefines.ColumnInfo[], footerTableData: any[], row: any, $rowIndex: number, _rowIndex: number) => {
|
|
60
61
|
const { fixedType } = props
|
|
61
|
-
const { footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps
|
|
62
|
+
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps
|
|
62
63
|
const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFooterList } = tableReactData
|
|
63
64
|
const { scrollXStore } = tableInternalData
|
|
64
65
|
const tooltipOpts = computeTooltipOpts.value
|
|
66
|
+
const resizableOpts = computeResizableOpts.value
|
|
67
|
+
const { isAllColumnDrag } = resizableOpts
|
|
65
68
|
const columnOpts = computeColumnOpts.value
|
|
69
|
+
const defaultRowHeight = computeDefaultRowHeight.value
|
|
70
|
+
const cellOpts = computeCellOpts.value
|
|
71
|
+
const footerCellOpts = computeFooterCellOpts.value
|
|
72
|
+
const currCellHeight = getCellHeight(footerCellOpts.height || cellOpts.height) || defaultRowHeight
|
|
66
73
|
|
|
67
74
|
return tableColumn.map((column, $columnIndex) => {
|
|
68
75
|
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column
|
|
76
|
+
const colid = column.id
|
|
69
77
|
const renderOpts = editRender || cellRender
|
|
70
78
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null
|
|
71
79
|
const showAllTip = tooltipOpts.showAll
|
|
72
80
|
const isColGroup = column.children && column.children.length
|
|
73
81
|
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX
|
|
82
|
+
const isPadding = XEUtils.isBoolean(footerCellOpts.padding) ? footerCellOpts.padding : cellOpts.padding
|
|
74
83
|
const footOverflow = XEUtils.eqNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow
|
|
75
84
|
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign
|
|
76
85
|
let showEllipsis = footOverflow === 'ellipsis'
|
|
77
86
|
const showTitle = footOverflow === 'title'
|
|
78
87
|
const showTooltip = footOverflow === true || footOverflow === 'tooltip'
|
|
79
88
|
let hasEllipsis = showTitle || showTooltip || showEllipsis
|
|
80
|
-
const
|
|
89
|
+
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable))
|
|
90
|
+
const attrs: any = { colid }
|
|
81
91
|
const tfOns: any = {}
|
|
82
92
|
const columnIndex = $xeTable.getColumnIndex(column)
|
|
83
93
|
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
84
94
|
const itemIndex = _columnIndex
|
|
85
|
-
const cellParams: VxeTableDefines.CellRenderFooterParams
|
|
95
|
+
const cellParams: VxeTableDefines.CellRenderFooterParams & {
|
|
96
|
+
$table: VxeTableConstructor<any> & VxeTablePrivateMethods
|
|
97
|
+
} = {
|
|
86
98
|
$table: $xeTable,
|
|
87
99
|
$grid: $xeTable.xegrid,
|
|
88
100
|
row,
|
|
@@ -156,9 +168,16 @@ export default defineComponent({
|
|
|
156
168
|
const isLastColumn = $columnIndex === tableColumn.length - 1
|
|
157
169
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')
|
|
158
170
|
|
|
159
|
-
let
|
|
160
|
-
if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex || _columnIndex > scrollXStore.visibleEndIndex)) {
|
|
161
|
-
|
|
171
|
+
let isVNPreEmptyStatus = false
|
|
172
|
+
if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
173
|
+
isVNPreEmptyStatus = true
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const tcStyle: Record<string, string> = {}
|
|
177
|
+
if (hasEllipsis) {
|
|
178
|
+
tcStyle.height = `${currCellHeight}px`
|
|
179
|
+
} else {
|
|
180
|
+
tcStyle.minHeight = `${currCellHeight}px`
|
|
162
181
|
}
|
|
163
182
|
|
|
164
183
|
return h('td', {
|
|
@@ -168,6 +187,7 @@ export default defineComponent({
|
|
|
168
187
|
'col--last': isLastColumn,
|
|
169
188
|
'fixed--width': !isAutoCellWidth,
|
|
170
189
|
'fixed--hidden': fixedHiddenColumn,
|
|
190
|
+
'is--padding': isPadding,
|
|
171
191
|
'col--ellipsis': hasEllipsis,
|
|
172
192
|
'col--current': currentColumn === column
|
|
173
193
|
}, getPropClass(footerClassName, cellParams), getPropClass(footerCellClassName, cellParams)],
|
|
@@ -181,8 +201,28 @@ export default defineComponent({
|
|
|
181
201
|
'c--title': showTitle,
|
|
182
202
|
'c--tooltip': showTooltip,
|
|
183
203
|
'c--ellipsis': showEllipsis
|
|
184
|
-
}]
|
|
185
|
-
|
|
204
|
+
}],
|
|
205
|
+
style: tcStyle
|
|
206
|
+
}, isVNPreEmptyStatus
|
|
207
|
+
? []
|
|
208
|
+
: [
|
|
209
|
+
h('div', {
|
|
210
|
+
colid,
|
|
211
|
+
class: 'vxe-cell--wrapper'
|
|
212
|
+
}, column.renderFooter(cellParams))
|
|
213
|
+
]),
|
|
214
|
+
/**
|
|
215
|
+
* 列宽拖动
|
|
216
|
+
*/
|
|
217
|
+
!fixedHiddenColumn && showResizable && isAllColumnDrag
|
|
218
|
+
? h('div', {
|
|
219
|
+
class: ['vxe-cell--col-resizable', {
|
|
220
|
+
'is--line': !border || border === 'none'
|
|
221
|
+
}],
|
|
222
|
+
onMousedown: (evnt: MouseEvent) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
223
|
+
onDblclick: (evnt: MouseEvent) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
224
|
+
})
|
|
225
|
+
: renderEmptyElement($xeTable)
|
|
186
226
|
])
|
|
187
227
|
})
|
|
188
228
|
}
|
|
@@ -190,7 +230,7 @@ export default defineComponent({
|
|
|
190
230
|
const renderHeads = (renderColumnList: VxeTableDefines.ColumnInfo[]) => {
|
|
191
231
|
const { fixedType, footerTableData } = props
|
|
192
232
|
const { footerRowClassName, footerRowStyle } = tableProps
|
|
193
|
-
const { isDragColMove } = tableReactData
|
|
233
|
+
const { isColLoading, isDragColMove } = tableReactData
|
|
194
234
|
const columnOpts = computeColumnOpts.value
|
|
195
235
|
const columnDragOpts = computeColumnDragOpts.value
|
|
196
236
|
|
|
@@ -198,7 +238,7 @@ export default defineComponent({
|
|
|
198
238
|
const _rowIndex = $rowIndex
|
|
199
239
|
const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType }
|
|
200
240
|
|
|
201
|
-
if (columnOpts.drag && columnDragOpts.animation) {
|
|
241
|
+
if (!isColLoading && columnOpts.drag && columnDragOpts.animation) {
|
|
202
242
|
return h(TransitionGroup, {
|
|
203
243
|
key: $rowIndex,
|
|
204
244
|
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineComponent, TransitionGroup, h, ref, Ref, PropType, inject, nextTick, watch, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
-
import {
|
|
5
|
-
import { hasClass, getOffsetPos, addClass, removeClass } from '../../ui/src/dom'
|
|
4
|
+
import { getCellHeight, convertHeaderColumnToRows } from './util'
|
|
6
5
|
|
|
7
6
|
import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines, VxeColumnPropTypes } from '../../../types'
|
|
8
7
|
|
|
9
|
-
const {
|
|
8
|
+
const { renderer, renderEmptyElement } = VxeUI
|
|
10
9
|
|
|
11
10
|
const renderType = 'header'
|
|
12
11
|
|
|
@@ -26,8 +25,7 @@ export default defineComponent({
|
|
|
26
25
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
27
26
|
|
|
28
27
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
29
|
-
const {
|
|
30
|
-
const { computeColumnOpts, computeColumnDragOpts, computeResizableOpts, computeScrollbarXToTop } = $xeTable.getComputeMaps()
|
|
28
|
+
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight } = $xeTable.getComputeMaps()
|
|
31
29
|
|
|
32
30
|
const headerColumn = ref([] as VxeTableDefines.ColumnInfo[][])
|
|
33
31
|
|
|
@@ -44,141 +42,6 @@ export default defineComponent({
|
|
|
44
42
|
headerColumn.value = isGroup ? convertHeaderColumnToRows(props.tableGroupColumn) : []
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
const resizeMousedownEvent = (evnt: MouseEvent, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) => {
|
|
48
|
-
const { column } = params
|
|
49
|
-
const { fixedType } = props
|
|
50
|
-
const { scrollbarHeight } = tableReactData
|
|
51
|
-
const { elemStore, visibleColumn } = tableInternalData
|
|
52
|
-
const resizableOpts = computeResizableOpts.value
|
|
53
|
-
const tableEl = tableRefElem.value
|
|
54
|
-
const leftContainerElem = refLeftContainer.value
|
|
55
|
-
const rightContainerElem = refRightContainer.value
|
|
56
|
-
const resizeBarElem = refCellResizeBar.value
|
|
57
|
-
const resizeTipElem = refCellResizeTip.value
|
|
58
|
-
const scrollbarXToTop = computeScrollbarXToTop.value
|
|
59
|
-
const { clientX: dragClientX } = evnt
|
|
60
|
-
const wrapperElem = refElem.value
|
|
61
|
-
const dragBtnElem = evnt.target as HTMLDivElement
|
|
62
|
-
let resizeColumn = column
|
|
63
|
-
if (column.children && column.children.length) {
|
|
64
|
-
XEUtils.eachTree(column.children, childColumn => {
|
|
65
|
-
resizeColumn = childColumn
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
const cell = dragBtnElem.parentNode as HTMLTableCellElement
|
|
69
|
-
const cellParams = Object.assign(params, { cell })
|
|
70
|
-
let dragLeft = 0
|
|
71
|
-
const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
|
|
72
|
-
if (!bodyScrollElem) {
|
|
73
|
-
return
|
|
74
|
-
}
|
|
75
|
-
const pos = getOffsetPos(dragBtnElem, wrapperElem)
|
|
76
|
-
const dragBtnWidth = dragBtnElem.clientWidth
|
|
77
|
-
const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2)
|
|
78
|
-
const minInterval = getColReMinWidth(cellParams) - dragBtnOffsetWidth // 列之间的最小间距
|
|
79
|
-
let dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval
|
|
80
|
-
let dragPosLeft = pos.left + dragBtnOffsetWidth
|
|
81
|
-
const domMousemove = document.onmousemove
|
|
82
|
-
const domMouseup = document.onmouseup
|
|
83
|
-
const isLeftFixed = fixedType === 'left'
|
|
84
|
-
const isRightFixed = fixedType === 'right'
|
|
85
|
-
|
|
86
|
-
// 计算左右侧固定列偏移量
|
|
87
|
-
let fixedOffsetWidth = 0
|
|
88
|
-
if (isLeftFixed || isRightFixed) {
|
|
89
|
-
const siblingProp = isLeftFixed ? 'nextElementSibling' : 'previousElementSibling'
|
|
90
|
-
let tempCellElem = cell[siblingProp] as HTMLTableCellElement
|
|
91
|
-
while (tempCellElem) {
|
|
92
|
-
if (hasClass(tempCellElem, 'fixed--hidden')) {
|
|
93
|
-
break
|
|
94
|
-
} else if (!hasClass(tempCellElem, 'col--group')) {
|
|
95
|
-
fixedOffsetWidth += tempCellElem.offsetWidth
|
|
96
|
-
}
|
|
97
|
-
tempCellElem = tempCellElem[siblingProp] as HTMLTableCellElement
|
|
98
|
-
}
|
|
99
|
-
if (isRightFixed && rightContainerElem) {
|
|
100
|
-
dragPosLeft = rightContainerElem.offsetLeft + fixedOffsetWidth
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// 处理拖动事件
|
|
105
|
-
const updateEvent = (evnt: MouseEvent) => {
|
|
106
|
-
evnt.stopPropagation()
|
|
107
|
-
evnt.preventDefault()
|
|
108
|
-
const tableHeight = tableEl.clientHeight
|
|
109
|
-
const offsetX = evnt.clientX - dragClientX
|
|
110
|
-
let left = dragPosLeft + offsetX
|
|
111
|
-
const scrollLeft = fixedType ? 0 : bodyScrollElem.scrollLeft
|
|
112
|
-
if (isLeftFixed) {
|
|
113
|
-
// 左固定列(不允许超过右侧固定列、不允许超过右边距)
|
|
114
|
-
left = Math.min(left, (rightContainerElem ? rightContainerElem.offsetLeft : bodyScrollElem.clientWidth) - fixedOffsetWidth - minInterval)
|
|
115
|
-
} else if (isRightFixed) {
|
|
116
|
-
// 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
|
|
117
|
-
dragMinLeft = (leftContainerElem ? leftContainerElem.clientWidth : 0) + fixedOffsetWidth + minInterval
|
|
118
|
-
left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval)
|
|
119
|
-
} else {
|
|
120
|
-
dragMinLeft = Math.max(bodyScrollElem.scrollLeft, dragMinLeft)
|
|
121
|
-
// left = Math.min(left, bodyScrollElem.clientWidth + bodyScrollElem.scrollLeft - 40)
|
|
122
|
-
}
|
|
123
|
-
dragLeft = Math.max(left, dragMinLeft)
|
|
124
|
-
const resizeBarLeft = Math.max(1, dragLeft - scrollLeft)
|
|
125
|
-
resizeBarElem.style.left = `${resizeBarLeft}px`
|
|
126
|
-
resizeBarElem.style.top = `${scrollbarXToTop ? scrollbarHeight : 0}px`
|
|
127
|
-
resizeBarElem.style.height = `${scrollbarXToTop ? tableHeight - scrollbarHeight : tableHeight}px`
|
|
128
|
-
if (resizableOpts.showDragTip && resizeTipElem) {
|
|
129
|
-
const tableWidth = tableEl.clientWidth
|
|
130
|
-
const wrapperRect = wrapperElem.getBoundingClientRect()
|
|
131
|
-
const resizeBarWidth = resizeBarElem.clientWidth
|
|
132
|
-
const resizeTipWidth = resizeTipElem.clientWidth
|
|
133
|
-
const resizeTipHeight = resizeTipElem.clientHeight
|
|
134
|
-
let resizeTipLeft = -resizeTipWidth
|
|
135
|
-
if (resizeBarLeft < resizeTipWidth + resizeBarWidth) {
|
|
136
|
-
resizeTipLeft = 0
|
|
137
|
-
} else if (resizeBarLeft > tableWidth) {
|
|
138
|
-
resizeTipLeft += tableWidth - resizeBarLeft
|
|
139
|
-
}
|
|
140
|
-
resizeTipElem.style.left = `${resizeTipLeft}px`
|
|
141
|
-
resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`
|
|
142
|
-
resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)])
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
tableReactData._isResize = true
|
|
147
|
-
addClass(tableEl, 'drag--resize')
|
|
148
|
-
resizeBarElem.style.display = 'block'
|
|
149
|
-
document.onmousemove = updateEvent
|
|
150
|
-
document.onmouseup = function (evnt) {
|
|
151
|
-
document.onmousemove = domMousemove
|
|
152
|
-
document.onmouseup = domMouseup
|
|
153
|
-
const resizeWidth = resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)
|
|
154
|
-
resizeColumn.resizeWidth = resizeWidth
|
|
155
|
-
if (resizableOpts.dragMode === 'fixed') {
|
|
156
|
-
visibleColumn.forEach(item => {
|
|
157
|
-
if (item.id !== resizeColumn.id) {
|
|
158
|
-
if (!item.resizeWidth) {
|
|
159
|
-
item.resizeWidth = item.renderWidth
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
}
|
|
164
|
-
resizeBarElem.style.display = 'none'
|
|
165
|
-
tableReactData._isResize = false
|
|
166
|
-
tableInternalData._lastResizeTime = Date.now()
|
|
167
|
-
$xeTable.analyColumnWidth()
|
|
168
|
-
$xeTable.recalculate(true).then(() => {
|
|
169
|
-
$xeTable.saveCustomStore('update:visible')
|
|
170
|
-
$xeTable.updateCellAreas()
|
|
171
|
-
$xeTable.dispatchEvent('resizable-change', { ...params, resizeWidth }, evnt)
|
|
172
|
-
setTimeout(() => $xeTable.recalculate(true), 300)
|
|
173
|
-
})
|
|
174
|
-
removeClass(tableEl, 'drag--resize')
|
|
175
|
-
}
|
|
176
|
-
updateEvent(evnt)
|
|
177
|
-
if ($xeTable.closeMenu) {
|
|
178
|
-
$xeTable.closeMenu()
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
45
|
const renderRows = (isGroup: boolean, isOptimizeMode: boolean, cols: VxeTableDefines.ColumnInfo[], $rowIndex: number) => {
|
|
183
46
|
const { fixedType } = props
|
|
184
47
|
const { resizable: allResizable, border, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps
|
|
@@ -186,6 +49,10 @@ export default defineComponent({
|
|
|
186
49
|
const { scrollXStore } = tableInternalData
|
|
187
50
|
const columnOpts = computeColumnOpts.value
|
|
188
51
|
const columnDragOpts = computeColumnDragOpts.value
|
|
52
|
+
const cellOpts = computeCellOpts.value
|
|
53
|
+
const defaultRowHeight = computeDefaultRowHeight.value
|
|
54
|
+
const headerCellOpts = computeHeaderCellOpts.value
|
|
55
|
+
const currCellHeight = getCellHeight(headerCellOpts.height || cellOpts.height) || defaultRowHeight
|
|
189
56
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
|
|
190
57
|
return cols.map((column, $columnIndex) => {
|
|
191
58
|
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column
|
|
@@ -194,6 +61,7 @@ export default defineComponent({
|
|
|
194
61
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null
|
|
195
62
|
const isColGroup = column.children && column.children.length
|
|
196
63
|
const fixedHiddenColumn = fixedType ? (column.fixed !== fixedType && !isColGroup) : !!column.fixed && overflowX
|
|
64
|
+
const isPadding = XEUtils.isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding
|
|
197
65
|
const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow
|
|
198
66
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign
|
|
199
67
|
let showEllipsis = headOverflow === 'ellipsis'
|
|
@@ -208,7 +76,7 @@ export default defineComponent({
|
|
|
208
76
|
}
|
|
209
77
|
const columnIndex = $xeTable.getColumnIndex(column)
|
|
210
78
|
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
211
|
-
const
|
|
79
|
+
const cellParams: VxeTableDefines.CellRenderHeaderParams & {
|
|
212
80
|
$table: VxeTableConstructor & VxeTablePrivateMethods
|
|
213
81
|
} = { $table: $xeTable, $grid: $xeTable.xegrid, $rowIndex, column, columnIndex, $columnIndex, _columnIndex, firstFilterOption, fixed: fixedType, type: renderType, isHidden: fixedHiddenColumn, hasFilter }
|
|
214
82
|
const thAttrs: Record<string, string | number | null> = {
|
|
@@ -217,8 +85,8 @@ export default defineComponent({
|
|
|
217
85
|
rowspan: column.rowSpan > 1 ? column.rowSpan : null
|
|
218
86
|
}
|
|
219
87
|
const thOns: any = {
|
|
220
|
-
onClick: (evnt: MouseEvent) => $xeTable.triggerHeaderCellClickEvent(evnt,
|
|
221
|
-
onDblclick: (evnt: MouseEvent) => $xeTable.triggerHeaderCellDblclickEvent(evnt,
|
|
88
|
+
onClick: (evnt: MouseEvent) => $xeTable.triggerHeaderCellClickEvent(evnt, cellParams),
|
|
89
|
+
onDblclick: (evnt: MouseEvent) => $xeTable.triggerHeaderCellDblclickEvent(evnt, cellParams)
|
|
222
90
|
}
|
|
223
91
|
// 横向虚拟滚动不支持动态行高
|
|
224
92
|
if (scrollXLoad && !hasEllipsis) {
|
|
@@ -227,11 +95,11 @@ export default defineComponent({
|
|
|
227
95
|
const isColDragCell = columnOpts.drag && columnDragOpts.trigger === 'cell'
|
|
228
96
|
let isDisabledDrag = false
|
|
229
97
|
if (isColDragCell) {
|
|
230
|
-
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(
|
|
98
|
+
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams))
|
|
231
99
|
}
|
|
232
100
|
// 按下事件处理
|
|
233
101
|
if (mouseConfig || isColDragCell) {
|
|
234
|
-
thOns.onMousedown = (evnt: MouseEvent) => $xeTable.triggerHeaderCellMousedownEvent(evnt,
|
|
102
|
+
thOns.onMousedown = (evnt: MouseEvent) => $xeTable.triggerHeaderCellMousedownEvent(evnt, cellParams)
|
|
235
103
|
}
|
|
236
104
|
// 拖拽列事件
|
|
237
105
|
if (columnOpts.drag) {
|
|
@@ -246,9 +114,16 @@ export default defineComponent({
|
|
|
246
114
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable))
|
|
247
115
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')
|
|
248
116
|
|
|
249
|
-
let
|
|
250
|
-
if (scrollXLoad && !
|
|
251
|
-
|
|
117
|
+
let isVNPreEmptyStatus = false
|
|
118
|
+
if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
119
|
+
isVNPreEmptyStatus = true
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const tcStyle: Record<string, string> = {}
|
|
123
|
+
if (hasEllipsis) {
|
|
124
|
+
tcStyle.height = `${currCellHeight}px`
|
|
125
|
+
} else {
|
|
126
|
+
tcStyle.minHeight = `${currCellHeight}px`
|
|
252
127
|
}
|
|
253
128
|
|
|
254
129
|
return h('th', {
|
|
@@ -261,6 +136,7 @@ export default defineComponent({
|
|
|
261
136
|
'col--ellipsis': hasEllipsis,
|
|
262
137
|
'fixed--width': !isAutoCellWidth,
|
|
263
138
|
'fixed--hidden': fixedHiddenColumn,
|
|
139
|
+
'is--padding': isPadding,
|
|
264
140
|
'is--sortable': column.sortable,
|
|
265
141
|
'col--filter': !!filters,
|
|
266
142
|
'is--filter-active': hasFilter,
|
|
@@ -268,10 +144,10 @@ export default defineComponent({
|
|
|
268
144
|
'is--drag-disabled': isDisabledDrag,
|
|
269
145
|
'col--current': currentColumn === column
|
|
270
146
|
},
|
|
271
|
-
headerClassName ? (XEUtils.isFunction(headerClassName) ? headerClassName(
|
|
272
|
-
headerCellClassName ? (XEUtils.isFunction(headerCellClassName) ? headerCellClassName(
|
|
147
|
+
headerClassName ? (XEUtils.isFunction(headerClassName) ? headerClassName(cellParams) : headerClassName) : '',
|
|
148
|
+
headerCellClassName ? (XEUtils.isFunction(headerCellClassName) ? headerCellClassName(cellParams) : headerCellClassName) : ''
|
|
273
149
|
],
|
|
274
|
-
style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(
|
|
150
|
+
style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(cellParams) : headerCellStyle) : null,
|
|
275
151
|
...thAttrs,
|
|
276
152
|
...thOns,
|
|
277
153
|
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
|
|
@@ -281,18 +157,26 @@ export default defineComponent({
|
|
|
281
157
|
'c--title': showTitle,
|
|
282
158
|
'c--tooltip': showTooltip,
|
|
283
159
|
'c--ellipsis': showEllipsis
|
|
284
|
-
}]
|
|
285
|
-
|
|
160
|
+
}],
|
|
161
|
+
style: tcStyle
|
|
162
|
+
}, isVNPreEmptyStatus || (isOptimizeMode && fixedHiddenColumn)
|
|
163
|
+
? []
|
|
164
|
+
: [
|
|
165
|
+
h('div', {
|
|
166
|
+
colid,
|
|
167
|
+
class: 'vxe-cell--wrapper'
|
|
168
|
+
}, column.renderHeader(cellParams))
|
|
169
|
+
]),
|
|
286
170
|
/**
|
|
287
171
|
* 列宽拖动
|
|
288
172
|
*/
|
|
289
173
|
!fixedHiddenColumn && showResizable
|
|
290
174
|
? h('div', {
|
|
291
|
-
class: ['vxe-resizable', {
|
|
175
|
+
class: ['vxe-cell--col-resizable', {
|
|
292
176
|
'is--line': !border || border === 'none'
|
|
293
177
|
}],
|
|
294
|
-
onMousedown: (evnt: MouseEvent) =>
|
|
295
|
-
onDblclick: (evnt: MouseEvent) => $xeTable.
|
|
178
|
+
onMousedown: (evnt: MouseEvent) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
179
|
+
onDblclick: (evnt: MouseEvent) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
296
180
|
})
|
|
297
181
|
: renderEmptyElement($xeTable)
|
|
298
182
|
])
|
|
@@ -302,14 +186,14 @@ export default defineComponent({
|
|
|
302
186
|
const renderHeads = (isGroup: boolean, isOptimizeMode: boolean, headerGroups: VxeTableDefines.ColumnInfo[][]) => {
|
|
303
187
|
const { fixedType } = props
|
|
304
188
|
const { headerRowClassName, headerRowStyle } = tableProps
|
|
305
|
-
const { isDragColMove } = tableReactData
|
|
189
|
+
const { isColLoading, isDragColMove } = tableReactData
|
|
306
190
|
const columnOpts = computeColumnOpts.value
|
|
307
191
|
const columnDragOpts = computeColumnDragOpts.value
|
|
308
192
|
|
|
309
193
|
return headerGroups.map((cols, $rowIndex) => {
|
|
310
194
|
const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType }
|
|
311
195
|
|
|
312
|
-
if (columnOpts.drag && columnDragOpts.animation) {
|
|
196
|
+
if (!isColLoading && columnOpts.drag && columnDragOpts.animation) {
|
|
313
197
|
return h(TransitionGroup, {
|
|
314
198
|
key: $rowIndex,
|
|
315
199
|
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
@@ -336,10 +220,11 @@ export default defineComponent({
|
|
|
336
220
|
|
|
337
221
|
const renderVN = () => {
|
|
338
222
|
const { fixedType, fixedColumn, tableColumn } = props
|
|
339
|
-
const { showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps
|
|
223
|
+
const { mouseConfig, showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps
|
|
340
224
|
const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData
|
|
341
225
|
const { visibleColumn, fullColumnIdData } = tableInternalData
|
|
342
226
|
|
|
227
|
+
const mouseOpts = computeMouseOpts.value
|
|
343
228
|
let renderHeaderList = headerColumn.value
|
|
344
229
|
let renderColumnList = tableColumn as VxeTableDefines.ColumnInfo[]
|
|
345
230
|
let isOptimizeMode = false
|
|
@@ -436,15 +321,32 @@ export default defineComponent({
|
|
|
436
321
|
h('thead', {
|
|
437
322
|
ref: refHeaderTHead
|
|
438
323
|
}, renderHeads(isGroup, isOptimizeMode, renderHeaderList))
|
|
439
|
-
])
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
324
|
+
]),
|
|
325
|
+
mouseConfig && mouseOpts.area
|
|
326
|
+
? h('div', {
|
|
327
|
+
class: 'vxe-table--cell-area'
|
|
328
|
+
}, [
|
|
329
|
+
h('span', {
|
|
330
|
+
class: 'vxe-table--cell-main-area'
|
|
331
|
+
}),
|
|
332
|
+
h('span', {
|
|
333
|
+
class: 'vxe-table--cell-copy-area'
|
|
334
|
+
}),
|
|
335
|
+
h('span', {
|
|
336
|
+
class: 'vxe-table--cell-extend-area'
|
|
337
|
+
}),
|
|
338
|
+
h('span', {
|
|
339
|
+
class: 'vxe-table--cell-multi-area'
|
|
340
|
+
}),
|
|
341
|
+
h('span', {
|
|
342
|
+
class: 'vxe-table--cell-active-area'
|
|
343
|
+
}),
|
|
344
|
+
h('span', {
|
|
345
|
+
class: 'vxe-table--cell-col-status-area'
|
|
346
|
+
})
|
|
347
|
+
])
|
|
348
|
+
: renderEmptyElement($xeTable)
|
|
349
|
+
])
|
|
448
350
|
])
|
|
449
351
|
}
|
|
450
352
|
|
|
@@ -34,10 +34,10 @@ export default {
|
|
|
34
34
|
type: [Boolean, String] as PropType<VxeTablePropTypes.Border>,
|
|
35
35
|
default: () => getConfig().table.border
|
|
36
36
|
},
|
|
37
|
-
//
|
|
37
|
+
// 已废弃,被 cell-config.padding 替换
|
|
38
38
|
padding: {
|
|
39
39
|
type: Boolean as PropType<VxeTablePropTypes.Padding>,
|
|
40
|
-
default:
|
|
40
|
+
default: null
|
|
41
41
|
},
|
|
42
42
|
// 是否圆角边框
|
|
43
43
|
round: {
|
|
@@ -86,13 +86,18 @@ export default {
|
|
|
86
86
|
type: Boolean as PropType<VxeTablePropTypes.HighlightHoverRow>,
|
|
87
87
|
default: () => getConfig().table.highlightHoverRow
|
|
88
88
|
},
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
/**
|
|
90
|
+
* (即将废弃)是否要高亮当前选中列
|
|
91
|
+
* @deprecated
|
|
92
|
+
*/
|
|
91
93
|
highlightCurrentColumn: {
|
|
92
94
|
type: Boolean as PropType<VxeTablePropTypes.HighlightCurrentColumn>,
|
|
93
95
|
default: () => getConfig().table.highlightCurrentColumn
|
|
94
96
|
},
|
|
95
|
-
|
|
97
|
+
/**
|
|
98
|
+
* (即将废弃)鼠标移到列是否要高亮显示
|
|
99
|
+
* @deprecated
|
|
100
|
+
*/
|
|
96
101
|
highlightHoverColumn: {
|
|
97
102
|
type: Boolean as PropType<VxeTablePropTypes.HighlightHoverColumn>,
|
|
98
103
|
default: () => getConfig().table.highlightHoverColumn
|
|
@@ -185,6 +190,10 @@ export default {
|
|
|
185
190
|
columnConfig: Object as PropType<VxeTablePropTypes.ColumnConfig>,
|
|
186
191
|
// 单元格配置信息
|
|
187
192
|
cellConfig: Object as PropType<VxeTablePropTypes.CellConfig>,
|
|
193
|
+
// 表头单元格配置信息
|
|
194
|
+
headerCellConfig: Object as PropType<VxeTablePropTypes.HeaderCellConfig>,
|
|
195
|
+
// 表尾单元格配置信息
|
|
196
|
+
footerCellConfig: Object as PropType<VxeTablePropTypes.FooterCellConfig>,
|
|
188
197
|
// 行配置信息
|
|
189
198
|
rowConfig: Object as PropType<VxeTablePropTypes.RowConfig>,
|
|
190
199
|
// 已废弃,被 rowDragConfig 替换
|