vxe-table 4.18.1 → 4.18.3
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/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/filter/hook.js +11 -2
- package/es/table/module/menu/hook.js +2 -2
- package/es/table/src/body.js +3 -2
- package/es/table/src/table.js +96 -7
- package/es/table/src/util.js +1 -2
- package/es/table/style.css +2 -2
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +3 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +2 -2
- 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 +33 -20
- 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/filter/hook.js +12 -2
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -1
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/src/body.js +4 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +9 -9
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +2 -2
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +3 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +2 -2
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +1 -1
- package/packages/table/module/filter/hook.ts +10 -2
- package/packages/table/module/menu/hook.ts +2 -2
- package/packages/table/src/body.ts +3 -2
- package/packages/table/src/table.ts +100 -9
- package/packages/table/src/util.ts +2 -2
- package/packages/ui/index.ts +2 -1
- package/styles/components/table.scss +2 -2
- package/styles/theme/base.scss +3 -0
- /package/es/{iconfont.1773109208977.ttf → iconfont.1773640299992.ttf} +0 -0
- /package/es/{iconfont.1773109208977.woff → iconfont.1773640299992.woff} +0 -0
- /package/es/{iconfont.1773109208977.woff2 → iconfont.1773640299992.woff2} +0 -0
- /package/lib/{iconfont.1773109208977.ttf → iconfont.1773640299992.ttf} +0 -0
- /package/lib/{iconfont.1773109208977.woff → iconfont.1773640299992.woff} +0 -0
- /package/lib/{iconfont.1773109208977.woff2 → iconfont.1773640299992.woff2} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.3",
|
|
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",
|
|
@@ -19,7 +19,7 @@ import type { VxeTableMethods, VxeGridConstructor, VxeGridEmits, GridReactData,
|
|
|
19
19
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI
|
|
20
20
|
|
|
21
21
|
const tableComponentPropKeys = Object.keys(tableProps) as (keyof VxeTableProps)[]
|
|
22
|
-
const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeRowLevel', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'getScrollData', 'scrollTo', 'scrollToStartRow', 'scrollToEndRow', 'scrollToRow', 'scrollToStartColumn', 'scrollToEndColumn', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'setMergeHeaderCells', 'removeMergeHeaderCells', 'getMergeHeaderCells', 'clearMergeHeaderCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect', 'connectToolbar']
|
|
22
|
+
const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeRowLevel', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'getScrollData', 'scrollTo', 'scrollToStartRow', 'scrollToEndRow', 'scrollToRow', 'scrollToStartColumn', 'scrollToEndColumn', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'setMergeHeaderCells', 'removeMergeHeaderCells', 'getMergeHeaderCells', 'clearMergeHeaderCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'updateCellLabel', 'clearFormatterCache', 'getFooterCellLabel', 'updateFooterCellLabel', 'clearFooterFormatterCache', 'getCellElement', 'focus', 'blur', 'connect', 'connectToolbar']
|
|
23
23
|
|
|
24
24
|
function createReactData (): GridReactData {
|
|
25
25
|
return {
|
|
@@ -42,7 +42,7 @@ hooks.add('tableFilterModule', {
|
|
|
42
42
|
const tableEl = refElem.value
|
|
43
43
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode()
|
|
44
44
|
const filterOpts = computeFilterOpts.value
|
|
45
|
-
const { transfer } = filterOpts
|
|
45
|
+
const { maxHeight: customMaxHeight, transfer, zIndex } = filterOpts
|
|
46
46
|
const currEl = btnEl || colEl
|
|
47
47
|
const tableRect = tableEl.getBoundingClientRect()
|
|
48
48
|
const filterRender = column ? column.filterRender : null
|
|
@@ -100,13 +100,21 @@ hooks.add('tableFilterModule', {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
const fStys: Record<string, any> = {
|
|
104
104
|
top: toCssUnit(top),
|
|
105
105
|
left: toCssUnit(left)
|
|
106
106
|
}
|
|
107
|
+
if (zIndex) {
|
|
108
|
+
fStys.zIndex = zIndex
|
|
109
|
+
}
|
|
110
|
+
filterStore.style = fStys
|
|
107
111
|
// 筛选面板是自适应表格高度
|
|
108
112
|
if (compConf ? !compConf.tableFilterAutoHeight : false) {
|
|
109
113
|
maxHeight = 0
|
|
114
|
+
} else {
|
|
115
|
+
if (customMaxHeight) {
|
|
116
|
+
maxHeight = customMaxHeight > maxHeight ? maxHeight : customMaxHeight
|
|
117
|
+
}
|
|
110
118
|
}
|
|
111
119
|
// 判断面板不能大于表格高度
|
|
112
120
|
filterStore.maxHeight = maxHeight
|
|
@@ -31,7 +31,7 @@ hooks.add('tableMenuModule', {
|
|
|
31
31
|
const isContentMenu = computeIsContentMenu.value
|
|
32
32
|
const menuOpts = computeMenuOpts.value
|
|
33
33
|
const config = menuOpts[type]
|
|
34
|
-
const { transfer, visibleMethod } = menuOpts
|
|
34
|
+
const { zIndex, transfer, visibleMethod } = menuOpts
|
|
35
35
|
if (config) {
|
|
36
36
|
const { options, disabled } = config
|
|
37
37
|
if (disabled) {
|
|
@@ -65,7 +65,7 @@ hooks.add('tableMenuModule', {
|
|
|
65
65
|
selectChild: null,
|
|
66
66
|
showChild: false,
|
|
67
67
|
style: {
|
|
68
|
-
zIndex: internalData.tZindex,
|
|
68
|
+
zIndex: zIndex || internalData.tZindex,
|
|
69
69
|
top: `${top}px`,
|
|
70
70
|
left: `${left}px`
|
|
71
71
|
}
|
|
@@ -43,8 +43,9 @@ export default defineVxeComponent({
|
|
|
43
43
|
// 滚动、拖动过程中不需要触发
|
|
44
44
|
const isVMScrollProcess = () => {
|
|
45
45
|
const { delayHover } = tableProps
|
|
46
|
-
const {
|
|
47
|
-
|
|
46
|
+
const { isDragResize } = tableReactData
|
|
47
|
+
const { lastSTime } = tableInternalData
|
|
48
|
+
return !!(isDragResize || (lastSTime && Date.now() < lastSTime + (delayHover as number)))
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
const renderLine = (rowid: string, params: VxeTableDefines.CellRenderBodyParams, cellHeight: number): VxeComponentSlotType[] => {
|
|
@@ -30,7 +30,7 @@ import '../module/validator/hook'
|
|
|
30
30
|
import '../module/custom/hook'
|
|
31
31
|
import '../render'
|
|
32
32
|
|
|
33
|
-
import type { VxeTooltipInstance, VxeTabsConstructor, VxeTabsPrivateMethods, ValueOf, VxeComponentSlotType } from 'vxe-pc-ui'
|
|
33
|
+
import type { VxeTooltipInstance, VxeTabsConstructor, VxeTabsPrivateMethods, ValueOf, VxeComponentSlotType, VxeComponentStyleType } from 'vxe-pc-ui'
|
|
34
34
|
import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableEmits, VxeTableProps, VxeColumnPropTypes, VxeTableCustomPanelConstructor } from '../../../types'
|
|
35
35
|
|
|
36
36
|
const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI
|
|
@@ -615,6 +615,19 @@ export default defineVxeComponent({
|
|
|
615
615
|
return ''
|
|
616
616
|
})
|
|
617
617
|
|
|
618
|
+
const computeTableStyle = computed(() => {
|
|
619
|
+
const scrollbarOpts = computeScrollbarOpts.value
|
|
620
|
+
const { width, height } = scrollbarOpts
|
|
621
|
+
const tStys: VxeComponentStyleType = {}
|
|
622
|
+
if (width) {
|
|
623
|
+
tStys['--vxe-ui-table-view-scrollbar-width'] = toCssUnit(width)
|
|
624
|
+
}
|
|
625
|
+
if (height) {
|
|
626
|
+
tStys['--vxe-ui-table-view-scrollbar-height'] = toCssUnit(height)
|
|
627
|
+
}
|
|
628
|
+
return tStys
|
|
629
|
+
})
|
|
630
|
+
|
|
618
631
|
const computeTableRowExpandedList = computed(() => {
|
|
619
632
|
const { tableData, rowExpandedFlag, expandColumn, rowGroupExpandedFlag, treeExpandedFlag } = reactData
|
|
620
633
|
const { visibleDataRowIdData, rowExpandedMaps } = internalData
|
|
@@ -3755,7 +3768,7 @@ export default defineVxeComponent({
|
|
|
3755
3768
|
if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
|
|
3756
3769
|
errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"'])
|
|
3757
3770
|
}
|
|
3758
|
-
if (virtualYOpts.mode === 'scroll' && expandOpts.mode === 'fixed') {
|
|
3771
|
+
if (virtualYOpts.mode === 'scroll' && reactData.expandColumn && expandOpts.mode === 'fixed') {
|
|
3759
3772
|
warnLog('vxe.error.notConflictProp', ['virtual-y-config.mode=scroll', 'expand-config.mode=inside'])
|
|
3760
3773
|
}
|
|
3761
3774
|
// if (showOverflow) {
|
|
@@ -4462,7 +4475,7 @@ export default defineVxeComponent({
|
|
|
4462
4475
|
return Promise.all([
|
|
4463
4476
|
xRest,
|
|
4464
4477
|
yRest,
|
|
4465
|
-
$xeTable.updateCellAreas()
|
|
4478
|
+
scrollXLoad || scrollYLoad ? $xeTable.updateCellAreas() : null
|
|
4466
4479
|
])
|
|
4467
4480
|
}
|
|
4468
4481
|
|
|
@@ -5254,7 +5267,7 @@ export default defineVxeComponent({
|
|
|
5254
5267
|
const cellValue = getCellValue(row, column)
|
|
5255
5268
|
let cellLabel = cellValue
|
|
5256
5269
|
if (formatter || tcFormatter) {
|
|
5257
|
-
let formatData
|
|
5270
|
+
let formatData: Record<string, VxeTableDefines.RowCacheFormatObj> | undefined
|
|
5258
5271
|
const { fullAllDataRowIdData } = internalData
|
|
5259
5272
|
const rowid = getRowid($xeTable, row)
|
|
5260
5273
|
const colid = column.id
|
|
@@ -5299,6 +5312,43 @@ export default defineVxeComponent({
|
|
|
5299
5312
|
}
|
|
5300
5313
|
return cellLabel
|
|
5301
5314
|
},
|
|
5315
|
+
updateCellLabel (row, fieldOrColumn) {
|
|
5316
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
5317
|
+
if (!column) {
|
|
5318
|
+
return null
|
|
5319
|
+
}
|
|
5320
|
+
const { fullAllDataRowIdData } = internalData
|
|
5321
|
+
const rowid = getRowid($xeTable, row)
|
|
5322
|
+
if (rowid) {
|
|
5323
|
+
const colid = column.id
|
|
5324
|
+
const rowid = getRowid($xeTable, row)
|
|
5325
|
+
const rowRest = fullAllDataRowIdData[rowid]
|
|
5326
|
+
if (rowRest) {
|
|
5327
|
+
const formatData = rowRest.formatData
|
|
5328
|
+
if (formatData) {
|
|
5329
|
+
delete formatData[colid]
|
|
5330
|
+
}
|
|
5331
|
+
}
|
|
5332
|
+
}
|
|
5333
|
+
return $xeTable.getFooterCellLabel(row, column)
|
|
5334
|
+
},
|
|
5335
|
+
clearFormatterCache (isUpdate) {
|
|
5336
|
+
const { tableData, tableColumn } = reactData
|
|
5337
|
+
const { fullAllDataRowIdData } = internalData
|
|
5338
|
+
XEUtils.each(fullAllDataRowIdData, (rowRest: VxeTableDefines.FooterRowCacheItem) => {
|
|
5339
|
+
if (rowRest.formatData) {
|
|
5340
|
+
rowRest.formatData = undefined
|
|
5341
|
+
}
|
|
5342
|
+
})
|
|
5343
|
+
if (isUpdate) {
|
|
5344
|
+
tableData.forEach(row => {
|
|
5345
|
+
tableColumn.forEach(column => {
|
|
5346
|
+
$xeTable.getCellLabel(row, column)
|
|
5347
|
+
})
|
|
5348
|
+
})
|
|
5349
|
+
}
|
|
5350
|
+
return nextTick()
|
|
5351
|
+
},
|
|
5302
5352
|
getFooterCellLabel (row, fieldOrColumn) {
|
|
5303
5353
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
5304
5354
|
if (!column) {
|
|
@@ -5315,7 +5365,7 @@ export default defineVxeComponent({
|
|
|
5315
5365
|
}
|
|
5316
5366
|
let cellLabel: any = itemValue
|
|
5317
5367
|
if (footerFormatter) {
|
|
5318
|
-
let formatData
|
|
5368
|
+
let formatData: Record<string, VxeTableDefines.RowCacheFormatObj> | undefined
|
|
5319
5369
|
const { footerTableData } = reactData
|
|
5320
5370
|
const { footerFullDataRowData } = internalData
|
|
5321
5371
|
const colid = column.id
|
|
@@ -5364,6 +5414,41 @@ export default defineVxeComponent({
|
|
|
5364
5414
|
}
|
|
5365
5415
|
return cellLabel
|
|
5366
5416
|
},
|
|
5417
|
+
updateFooterCellLabel (row, fieldOrColumn) {
|
|
5418
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
5419
|
+
if (!column) {
|
|
5420
|
+
return null
|
|
5421
|
+
}
|
|
5422
|
+
const { footerTableData } = reactData
|
|
5423
|
+
const { footerFullDataRowData } = internalData
|
|
5424
|
+
const colid = column.id
|
|
5425
|
+
const $rowIndex = footerTableData.indexOf(row)
|
|
5426
|
+
const rowRest = footerFullDataRowData[$rowIndex]
|
|
5427
|
+
if (rowRest) {
|
|
5428
|
+
const formatData = rowRest.formatData
|
|
5429
|
+
if (formatData) {
|
|
5430
|
+
delete formatData[colid]
|
|
5431
|
+
}
|
|
5432
|
+
}
|
|
5433
|
+
return $xeTable.getFooterCellLabel(row, column)
|
|
5434
|
+
},
|
|
5435
|
+
clearFooterFormatterCache (isUpdate) {
|
|
5436
|
+
const { tableData, tableColumn } = reactData
|
|
5437
|
+
const { footerFullDataRowData } = internalData
|
|
5438
|
+
XEUtils.each(footerFullDataRowData, (rowRest: VxeTableDefines.FooterRowCacheItem) => {
|
|
5439
|
+
if (rowRest.formatData) {
|
|
5440
|
+
rowRest.formatData = undefined
|
|
5441
|
+
}
|
|
5442
|
+
})
|
|
5443
|
+
if (isUpdate) {
|
|
5444
|
+
tableData.forEach(row => {
|
|
5445
|
+
tableColumn.forEach(column => {
|
|
5446
|
+
$xeTable.getFooterCellLabel(row, column)
|
|
5447
|
+
})
|
|
5448
|
+
})
|
|
5449
|
+
}
|
|
5450
|
+
return nextTick()
|
|
5451
|
+
},
|
|
5367
5452
|
/**
|
|
5368
5453
|
* 检查是否为临时行数据
|
|
5369
5454
|
*/
|
|
@@ -7299,14 +7384,18 @@ export default defineVxeComponent({
|
|
|
7299
7384
|
setScrollLeft(bodyScrollElem, scrollLeft)
|
|
7300
7385
|
setScrollLeft(headerScrollElem, scrollLeft)
|
|
7301
7386
|
setScrollLeft(footerScrollElem, scrollLeft)
|
|
7302
|
-
|
|
7387
|
+
if (reactData.scrollXLoad) {
|
|
7388
|
+
loadScrollXData()
|
|
7389
|
+
}
|
|
7303
7390
|
}
|
|
7304
7391
|
if (XEUtils.isNumber(scrollTop)) {
|
|
7305
7392
|
setScrollTop(yHandleEl, scrollTop)
|
|
7306
7393
|
setScrollTop(bodyScrollElem, scrollTop)
|
|
7307
7394
|
setScrollTop(leftScrollElem, scrollTop)
|
|
7308
7395
|
setScrollTop(rightScrollElem, scrollTop)
|
|
7309
|
-
|
|
7396
|
+
if (reactData.scrollYLoad) {
|
|
7397
|
+
loadScrollYData()
|
|
7398
|
+
}
|
|
7310
7399
|
}
|
|
7311
7400
|
return new Promise<void>(resolve => {
|
|
7312
7401
|
setTimeout(() => {
|
|
@@ -11625,7 +11714,7 @@ export default defineVxeComponent({
|
|
|
11625
11714
|
}
|
|
11626
11715
|
internalData.lastScrollTop = scrollTop
|
|
11627
11716
|
}
|
|
11628
|
-
|
|
11717
|
+
internalData.lastSTime = Date.now()
|
|
11629
11718
|
const evntParams = {
|
|
11630
11719
|
source: sourceType,
|
|
11631
11720
|
scrollTop,
|
|
@@ -11870,7 +11959,7 @@ export default defineVxeComponent({
|
|
|
11870
11959
|
return
|
|
11871
11960
|
}
|
|
11872
11961
|
|
|
11873
|
-
const wheelSpeed = getWheelSpeed(
|
|
11962
|
+
const wheelSpeed = getWheelSpeed(internalData.lastSTime)
|
|
11874
11963
|
const deltaTop = shiftKey ? 0 : (deltaY * wheelSpeed)
|
|
11875
11964
|
const deltaLeft = (shiftKey ? (deltaX || deltaY) : deltaX) * wheelSpeed
|
|
11876
11965
|
|
|
@@ -12873,6 +12962,7 @@ export default defineVxeComponent({
|
|
|
12873
12962
|
footer: slots.footerTooltip || slots['footer-tooltip']
|
|
12874
12963
|
}
|
|
12875
12964
|
const currTooltipSlot = tooltipStore.visible && tooltipStore.type ? tipSlots[tooltipStore.type] : null
|
|
12965
|
+
const tableStyle = computeTableStyle.value
|
|
12876
12966
|
const rowDragOpts = computeRowDragOpts.value
|
|
12877
12967
|
const tableTipConfig = computeTableTipConfig.value
|
|
12878
12968
|
const validTipConfig = computeValidTipConfig.value
|
|
@@ -12944,6 +13034,7 @@ export default defineVxeComponent({
|
|
|
12944
13034
|
'is--virtual-x': scrollXLoad,
|
|
12945
13035
|
'is--virtual-y': scrollYLoad
|
|
12946
13036
|
}],
|
|
13037
|
+
style: tableStyle,
|
|
12947
13038
|
spellcheck: false,
|
|
12948
13039
|
...tbOns
|
|
12949
13040
|
}, [
|
|
@@ -137,6 +137,8 @@ export function createInternalData (): TableInternalData {
|
|
|
137
137
|
teleportToWrapperElem: null,
|
|
138
138
|
popupToWrapperElem: null,
|
|
139
139
|
|
|
140
|
+
lastSTime: 0,
|
|
141
|
+
|
|
140
142
|
inited: false,
|
|
141
143
|
tooltipTimeout: null,
|
|
142
144
|
initStatus: false,
|
|
@@ -167,8 +169,6 @@ export function createReactData (): TableReactData {
|
|
|
167
169
|
scrollbarWidth: 0,
|
|
168
170
|
// 横向滚动条的高度
|
|
169
171
|
scrollbarHeight: 0,
|
|
170
|
-
// 最后滚动时间戳
|
|
171
|
-
lastScrollTime: 0,
|
|
172
172
|
// 行高
|
|
173
173
|
rowHeight: 0,
|
|
174
174
|
// 表格父容器的高度
|
package/packages/ui/index.ts
CHANGED
|
@@ -912,7 +912,7 @@ $btnThemeList: (
|
|
|
912
912
|
.vxe-table--scroll-x-handle {
|
|
913
913
|
overflow-y: hidden;
|
|
914
914
|
overflow-x: scroll;
|
|
915
|
-
height:
|
|
915
|
+
height: var(--vxe-ui-table-view-scrollbar-height);
|
|
916
916
|
}
|
|
917
917
|
.vxe-table--scroll-y-handle,
|
|
918
918
|
.vxe-table--scroll-y-wrapper {
|
|
@@ -924,7 +924,7 @@ $btnThemeList: (
|
|
|
924
924
|
.vxe-table--scroll-y-handle {
|
|
925
925
|
overflow-y: scroll;
|
|
926
926
|
overflow-x: hidden;
|
|
927
|
-
width:
|
|
927
|
+
width: var(--vxe-ui-table-view-scrollbar-width);
|
|
928
928
|
height: 100%;
|
|
929
929
|
}
|
|
930
930
|
.vxe-table--scroll-x-space {
|
package/styles/theme/base.scss
CHANGED
|
@@ -78,6 +78,9 @@
|
|
|
78
78
|
|
|
79
79
|
--vxe-ui-table-menu-item-width: 198px;
|
|
80
80
|
|
|
81
|
+
--vxe-ui-table-view-scrollbar-width: 18px;
|
|
82
|
+
--vxe-ui-table-view-scrollbar-height: 18px;
|
|
83
|
+
|
|
81
84
|
--vxe-ui-table-validate-error-color: #f56c6c;
|
|
82
85
|
--vxe-ui-table-validate-error-cell-background-color: rgba(245, 108,108, 0.1);
|
|
83
86
|
--vxe-ui-table-validate-error-theme-normal-background-color: var(--vxe-ui-layout-background-color);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|