vxe-table 4.15.2 → 4.15.4
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 +8 -0
- package/es/locale/lang/de-DE.js +80 -80
- package/es/locale/lang/es-ES.js +79 -79
- package/es/locale/lang/ja-JP.js +82 -82
- package/es/locale/lang/ko-KR.js +88 -88
- package/es/locale/lang/ru-RU.js +84 -84
- package/es/locale/lang/vi-VN.js +79 -79
- package/es/locale/lang/zh-CHT.js +21 -21
- package/es/style.css +1 -1
- package/es/table/src/body.js +4 -4
- package/es/table/src/table.js +30 -124
- package/es/table/src/util.js +116 -0
- package/es/toolbar/src/toolbar.js +10 -4
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +8 -0
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +146 -54
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/de-DE.js +80 -80
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +80 -80
- package/lib/locale/lang/es-ES.js +79 -79
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +79 -79
- package/lib/locale/lang/ja-JP.js +82 -82
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +82 -82
- package/lib/locale/lang/ko-KR.js +88 -88
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +88 -88
- package/lib/locale/lang/ru-RU.js +84 -84
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +84 -84
- package/lib/locale/lang/vi-VN.js +79 -79
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +79 -79
- package/lib/locale/lang/zh-CHT.js +21 -21
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +21 -21
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +4 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +7 -46
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +117 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +9 -3
- package/lib/toolbar/src/toolbar.min.js +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/package.json +1 -1
- package/packages/grid/src/grid.ts +11 -1
- package/packages/locale/lang/de-DE.ts +80 -80
- package/packages/locale/lang/es-ES.ts +79 -79
- package/packages/locale/lang/ja-JP.ts +82 -82
- package/packages/locale/lang/ko-KR.ts +88 -88
- package/packages/locale/lang/ru-RU.ts +84 -84
- package/packages/locale/lang/vi-VN.ts +79 -79
- package/packages/locale/lang/zh-CHT.ts +21 -21
- package/packages/table/src/body.ts +4 -4
- package/packages/table/src/table.ts +32 -128
- package/packages/table/src/util.ts +121 -1
- package/packages/toolbar/src/toolbar.ts +12 -4
- /package/es/{iconfont.1754370048998.ttf → iconfont.1754457119712.ttf} +0 -0
- /package/es/{iconfont.1754370048998.woff → iconfont.1754457119712.woff} +0 -0
- /package/es/{iconfont.1754370048998.woff2 → iconfont.1754457119712.woff2} +0 -0
- /package/lib/{iconfont.1754370048998.ttf → iconfont.1754457119712.ttf} +0 -0
- /package/lib/{iconfont.1754370048998.woff → iconfont.1754457119712.woff} +0 -0
- /package/lib/{iconfont.1754370048998.woff2 → iconfont.1754457119712.woff2} +0 -0
|
@@ -4,7 +4,7 @@ import XEUtils from 'xe-utils'
|
|
|
4
4
|
import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom'
|
|
5
5
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils'
|
|
6
6
|
import { VxeUI } from '../../ui'
|
|
7
|
-
import { getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight } from './util'
|
|
7
|
+
import { createInternalData, getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight } from './util'
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
9
9
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from './anime'
|
|
10
10
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
@@ -21,7 +21,7 @@ import TableExportPanelComponent from '../module/export/export-panel'
|
|
|
21
21
|
import TableMenuPanelComponent from '../module/menu/panel'
|
|
22
22
|
|
|
23
23
|
import type { VxeTooltipInstance, VxeTabsConstructor, VxeTabsPrivateMethods, ValueOf, VxeComponentSlotType } from 'vxe-pc-ui'
|
|
24
|
-
import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData,
|
|
24
|
+
import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableEmits, VxeTableProps, VxeColumnPropTypes, VxeTableCustomPanelConstructor } from '../../../types'
|
|
25
25
|
|
|
26
26
|
const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI
|
|
27
27
|
|
|
@@ -298,123 +298,7 @@ export default defineVxeComponent({
|
|
|
298
298
|
isColLoading: false
|
|
299
299
|
})
|
|
300
300
|
|
|
301
|
-
const internalData
|
|
302
|
-
tZindex: 0,
|
|
303
|
-
currKeyField: '',
|
|
304
|
-
isCurrDeepKey: false,
|
|
305
|
-
elemStore: {},
|
|
306
|
-
// 存放横向 X 虚拟滚动相关的信息
|
|
307
|
-
scrollXStore: {
|
|
308
|
-
preloadSize: 0,
|
|
309
|
-
offsetSize: 0,
|
|
310
|
-
visibleSize: 0,
|
|
311
|
-
visibleStartIndex: 0,
|
|
312
|
-
visibleEndIndex: 0,
|
|
313
|
-
startIndex: 0,
|
|
314
|
-
endIndex: 0
|
|
315
|
-
},
|
|
316
|
-
// 存放纵向 Y 虚拟滚动相关信息
|
|
317
|
-
scrollYStore: {
|
|
318
|
-
preloadSize: 0,
|
|
319
|
-
offsetSize: 0,
|
|
320
|
-
visibleSize: 0,
|
|
321
|
-
visibleStartIndex: 0,
|
|
322
|
-
visibleEndIndex: 0,
|
|
323
|
-
startIndex: 0,
|
|
324
|
-
endIndex: 0
|
|
325
|
-
},
|
|
326
|
-
// 表格宽度
|
|
327
|
-
tableWidth: 0,
|
|
328
|
-
// 表格高度
|
|
329
|
-
tableHeight: 0,
|
|
330
|
-
// 表头高度
|
|
331
|
-
headerHeight: 0,
|
|
332
|
-
// 表尾高度
|
|
333
|
-
footerHeight: 0,
|
|
334
|
-
customHeight: 0,
|
|
335
|
-
customMinHeight: 0,
|
|
336
|
-
customMaxHeight: 0,
|
|
337
|
-
// 当前 hover 行
|
|
338
|
-
hoverRow: null,
|
|
339
|
-
// 最后滚动位置
|
|
340
|
-
lastScrollLeft: 0,
|
|
341
|
-
lastScrollTop: 0,
|
|
342
|
-
// 单选框属性,已选中保留的行
|
|
343
|
-
radioReserveRow: null,
|
|
344
|
-
// 复选框属性,已选中保留的行集合
|
|
345
|
-
checkboxReserveRowMap: {},
|
|
346
|
-
// 行数据,已展开保留的行集合
|
|
347
|
-
rowExpandedReserveRowMap: {},
|
|
348
|
-
// 树结构数据,已展开保留的行集合
|
|
349
|
-
treeExpandedReserveRowMap: {},
|
|
350
|
-
// 树结构数据,不确定状态的集合
|
|
351
|
-
treeIndeterminateRowMaps: {},
|
|
352
|
-
// 列表完整数据、条件处理后
|
|
353
|
-
tableFullData: [],
|
|
354
|
-
afterFullData: [],
|
|
355
|
-
afterTreeFullData: [],
|
|
356
|
-
afterGroupFullData: [],
|
|
357
|
-
// 列表条件处理后数据集合
|
|
358
|
-
afterFullRowMaps: {},
|
|
359
|
-
// 树结构完整数据、条件处理后
|
|
360
|
-
tableFullTreeData: [],
|
|
361
|
-
// 行分组全量数据、条件处理后
|
|
362
|
-
tableFullGroupData: [],
|
|
363
|
-
tableSynchData: [],
|
|
364
|
-
tableSourceData: [],
|
|
365
|
-
// 收集的列配置(带分组)
|
|
366
|
-
collectColumn: [],
|
|
367
|
-
// 完整所有列(不带分组)
|
|
368
|
-
tableFullColumn: [],
|
|
369
|
-
// 渲染所有列
|
|
370
|
-
visibleColumn: [],
|
|
371
|
-
// 全量数据集(包括当前和已删除)
|
|
372
|
-
fullAllDataRowIdData: {},
|
|
373
|
-
// 数据集(仅当前)
|
|
374
|
-
fullDataRowIdData: {},
|
|
375
|
-
// 数据集(仅可视)
|
|
376
|
-
visibleDataRowIdData: {},
|
|
377
|
-
// 渲染中缓存数据
|
|
378
|
-
sourceDataRowIdData: {},
|
|
379
|
-
fullColumnIdData: {},
|
|
380
|
-
fullColumnFieldData: {},
|
|
381
|
-
|
|
382
|
-
// 合并单元格的数据
|
|
383
|
-
mergeBodyList: [],
|
|
384
|
-
mergeBodyMaps: {},
|
|
385
|
-
// 合并表尾的数据
|
|
386
|
-
mergeFooterList: [],
|
|
387
|
-
mergeFooterMaps: {},
|
|
388
|
-
// 已合并单元格数据集合
|
|
389
|
-
mergeBodyCellMaps: {},
|
|
390
|
-
// 已合并表尾数据集合
|
|
391
|
-
mergeFooterCellMaps: {},
|
|
392
|
-
// 已展开的行集合
|
|
393
|
-
rowExpandedMaps: {},
|
|
394
|
-
// 懒加载中的展开行的集合
|
|
395
|
-
rowExpandLazyLoadedMaps: {},
|
|
396
|
-
// 已展开的分组行
|
|
397
|
-
rowGroupExpandedMaps: {},
|
|
398
|
-
// 已展开树节点集合
|
|
399
|
-
treeExpandedMaps: {},
|
|
400
|
-
// 懒加载中的树节点的集合
|
|
401
|
-
treeExpandLazyLoadedMaps: {},
|
|
402
|
-
// 复选框属性,已选中的行集合
|
|
403
|
-
selectCheckboxMaps: {},
|
|
404
|
-
// 已标记的对象集
|
|
405
|
-
pendingRowMaps: {},
|
|
406
|
-
// 已新增的临时行
|
|
407
|
-
insertRowMaps: {},
|
|
408
|
-
// 已删除行
|
|
409
|
-
removeRowMaps: {},
|
|
410
|
-
|
|
411
|
-
cvCacheMaps: {},
|
|
412
|
-
|
|
413
|
-
inited: false,
|
|
414
|
-
tooltipTimeout: null,
|
|
415
|
-
initStatus: false,
|
|
416
|
-
isActivated: false
|
|
417
|
-
}
|
|
301
|
+
const internalData = createInternalData()
|
|
418
302
|
|
|
419
303
|
let tableMethods = {} as TableMethods
|
|
420
304
|
let tablePrivateMethods = {} as TablePrivateMethods
|
|
@@ -3536,9 +3420,7 @@ export default defineVxeComponent({
|
|
|
3536
3420
|
internalData.cvCacheMaps = {}
|
|
3537
3421
|
reactData.isRowLoading = true
|
|
3538
3422
|
reactData.scrollVMLoading = false
|
|
3539
|
-
// internalData.treeExpandedMaps = {}
|
|
3540
3423
|
reactData.treeExpandedFlag++
|
|
3541
|
-
// internalData.rowExpandedMaps = {}
|
|
3542
3424
|
reactData.rowExpandedFlag++
|
|
3543
3425
|
internalData.insertRowMaps = {}
|
|
3544
3426
|
reactData.insertRowFlag++
|
|
@@ -5901,9 +5783,23 @@ export default defineVxeComponent({
|
|
|
5901
5783
|
/**
|
|
5902
5784
|
* 用于当前行,获取当前行的数据
|
|
5903
5785
|
*/
|
|
5904
|
-
getCurrentRecord () {
|
|
5786
|
+
getCurrentRecord (isFull) {
|
|
5787
|
+
const { currentRow } = reactData
|
|
5788
|
+
const { fullDataRowIdData, afterFullRowMaps } = internalData
|
|
5905
5789
|
const rowOpts = computeRowOpts.value
|
|
5906
|
-
|
|
5790
|
+
if (rowOpts.isCurrent || props.highlightCurrentRow) {
|
|
5791
|
+
const rowid = getRowid($xeTable, currentRow)
|
|
5792
|
+
if (isFull) {
|
|
5793
|
+
if (fullDataRowIdData[rowid]) {
|
|
5794
|
+
return currentRow
|
|
5795
|
+
}
|
|
5796
|
+
} else {
|
|
5797
|
+
if (afterFullRowMaps[rowid]) {
|
|
5798
|
+
return currentRow
|
|
5799
|
+
}
|
|
5800
|
+
}
|
|
5801
|
+
}
|
|
5802
|
+
return null
|
|
5907
5803
|
},
|
|
5908
5804
|
/**
|
|
5909
5805
|
* 用于单选行,获取当已选中的数据
|
|
@@ -8097,13 +7993,17 @@ export default defineVxeComponent({
|
|
|
8097
7993
|
cacheRowMap (isReset) {
|
|
8098
7994
|
const { treeConfig } = props
|
|
8099
7995
|
const { isRowGroupStatus } = reactData
|
|
8100
|
-
const { fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps } = internalData
|
|
7996
|
+
const { currKeyField, fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps } = internalData
|
|
8101
7997
|
const fullAllDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = isReset ? {} : { ...fullAllDataRowIdData } // 存在已删除数据
|
|
8102
7998
|
const fullDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = {}
|
|
8103
7999
|
|
|
8000
|
+
const idMaps: Record<string, boolean> = {}
|
|
8104
8001
|
const { handleUpdateRowId } = createHandleUpdateRowId($xeTable)
|
|
8105
8002
|
const handleRowCache = (row: any, index: number, items: any, currIndex: number, parentRow: any, rowid: string, level: number, seq: string | number) => {
|
|
8106
8003
|
let rowRest = fullAllDataRowIdMaps[rowid]
|
|
8004
|
+
if (idMaps[rowid]) {
|
|
8005
|
+
errLog('vxe.error.repeatKey', [currKeyField, rowid])
|
|
8006
|
+
}
|
|
8107
8007
|
if (!rowRest) {
|
|
8108
8008
|
rowRest = { row, rowid, seq, index: -1, _index: -1, $index: -1, treeIndex: index, _tIndex: -1, items, parent: parentRow, level, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 }
|
|
8109
8009
|
fullDataRowIdMaps[rowid] = rowRest
|
|
@@ -8119,6 +8019,7 @@ export default defineVxeComponent({
|
|
|
8119
8019
|
rowRest.index = currIndex
|
|
8120
8020
|
rowRest.treeIndex = index
|
|
8121
8021
|
|
|
8022
|
+
idMaps[rowid] = true
|
|
8122
8023
|
fullDataRowIdMaps[rowid] = rowRest
|
|
8123
8024
|
fullAllDataRowIdMaps[rowid] = rowRest
|
|
8124
8025
|
}
|
|
@@ -11870,7 +11771,7 @@ export default defineVxeComponent({
|
|
|
11870
11771
|
if (value && value.length >= 50000) {
|
|
11871
11772
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)'])
|
|
11872
11773
|
}
|
|
11873
|
-
loadTableData(value,
|
|
11774
|
+
loadTableData(value, true).then(() => {
|
|
11874
11775
|
const { scrollXLoad, scrollYLoad, expandColumn } = reactData
|
|
11875
11776
|
const expandOpts = computeExpandOpts.value
|
|
11876
11777
|
internalData.inited = true
|
|
@@ -12335,10 +12236,7 @@ export default defineVxeComponent({
|
|
|
12335
12236
|
if ($xeTable.closeMenu) {
|
|
12336
12237
|
$xeTable.closeMenu()
|
|
12337
12238
|
}
|
|
12338
|
-
tablePrivateMethods.preventEvent(null, 'beforeUnmount', { $table: $xeTable })
|
|
12339
|
-
})
|
|
12340
12239
|
|
|
12341
|
-
onUnmounted(() => {
|
|
12342
12240
|
globalEvents.off($xeTable, 'paste')
|
|
12343
12241
|
globalEvents.off($xeTable, 'copy')
|
|
12344
12242
|
globalEvents.off($xeTable, 'cut')
|
|
@@ -12348,7 +12246,13 @@ export default defineVxeComponent({
|
|
|
12348
12246
|
globalEvents.off($xeTable, 'keydown')
|
|
12349
12247
|
globalEvents.off($xeTable, 'resize')
|
|
12350
12248
|
globalEvents.off($xeTable, 'contextmenu')
|
|
12249
|
+
|
|
12250
|
+
tablePrivateMethods.preventEvent(null, 'beforeUnmount', { $table: $xeTable })
|
|
12251
|
+
})
|
|
12252
|
+
|
|
12253
|
+
onUnmounted(() => {
|
|
12351
12254
|
tablePrivateMethods.preventEvent(null, 'unmounted', { $table: $xeTable })
|
|
12255
|
+
XEUtils.assign(internalData, createInternalData())
|
|
12352
12256
|
})
|
|
12353
12257
|
|
|
12354
12258
|
nextTick(() => {
|
|
@@ -4,7 +4,127 @@ import { ColumnInfo } from './columnInfo'
|
|
|
4
4
|
import { isPx, isScale, queryElement } from '../../ui/src/dom'
|
|
5
5
|
import { eqEmptyValue } from '../../ui/src/utils'
|
|
6
6
|
|
|
7
|
-
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, VxeTablePropTypes } from '../../../types'
|
|
7
|
+
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, VxeTablePropTypes, TableInternalData } from '../../../types'
|
|
8
|
+
|
|
9
|
+
export function createInternalData (): TableInternalData {
|
|
10
|
+
return {
|
|
11
|
+
tZindex: 0,
|
|
12
|
+
currKeyField: '',
|
|
13
|
+
isCurrDeepKey: false,
|
|
14
|
+
elemStore: {},
|
|
15
|
+
// 存放横向 X 虚拟滚动相关的信息
|
|
16
|
+
scrollXStore: {
|
|
17
|
+
preloadSize: 0,
|
|
18
|
+
offsetSize: 0,
|
|
19
|
+
visibleSize: 0,
|
|
20
|
+
visibleStartIndex: 0,
|
|
21
|
+
visibleEndIndex: 0,
|
|
22
|
+
startIndex: 0,
|
|
23
|
+
endIndex: 0
|
|
24
|
+
},
|
|
25
|
+
// 存放纵向 Y 虚拟滚动相关信息
|
|
26
|
+
scrollYStore: {
|
|
27
|
+
preloadSize: 0,
|
|
28
|
+
offsetSize: 0,
|
|
29
|
+
visibleSize: 0,
|
|
30
|
+
visibleStartIndex: 0,
|
|
31
|
+
visibleEndIndex: 0,
|
|
32
|
+
startIndex: 0,
|
|
33
|
+
endIndex: 0
|
|
34
|
+
},
|
|
35
|
+
// 表格宽度
|
|
36
|
+
tableWidth: 0,
|
|
37
|
+
// 表格高度
|
|
38
|
+
tableHeight: 0,
|
|
39
|
+
// 表头高度
|
|
40
|
+
headerHeight: 0,
|
|
41
|
+
// 表尾高度
|
|
42
|
+
footerHeight: 0,
|
|
43
|
+
customHeight: 0,
|
|
44
|
+
customMinHeight: 0,
|
|
45
|
+
customMaxHeight: 0,
|
|
46
|
+
// 当前 hover 行
|
|
47
|
+
hoverRow: null,
|
|
48
|
+
// 最后滚动位置
|
|
49
|
+
lastScrollLeft: 0,
|
|
50
|
+
lastScrollTop: 0,
|
|
51
|
+
// 单选框属性,已选中保留的行
|
|
52
|
+
radioReserveRow: null,
|
|
53
|
+
// 复选框属性,已选中保留的行集合
|
|
54
|
+
checkboxReserveRowMap: {},
|
|
55
|
+
// 行数据,已展开保留的行集合
|
|
56
|
+
rowExpandedReserveRowMap: {},
|
|
57
|
+
// 树结构数据,已展开保留的行集合
|
|
58
|
+
treeExpandedReserveRowMap: {},
|
|
59
|
+
// 树结构数据,不确定状态的集合
|
|
60
|
+
treeIndeterminateRowMaps: {},
|
|
61
|
+
// 列表完整数据、条件处理后
|
|
62
|
+
tableFullData: [],
|
|
63
|
+
afterFullData: [],
|
|
64
|
+
afterTreeFullData: [],
|
|
65
|
+
afterGroupFullData: [],
|
|
66
|
+
// 列表条件处理后数据集合
|
|
67
|
+
afterFullRowMaps: {},
|
|
68
|
+
// 树结构完整数据、条件处理后
|
|
69
|
+
tableFullTreeData: [],
|
|
70
|
+
// 行分组全量数据、条件处理后
|
|
71
|
+
tableFullGroupData: [],
|
|
72
|
+
tableSynchData: [],
|
|
73
|
+
tableSourceData: [],
|
|
74
|
+
// 收集的列配置(带分组)
|
|
75
|
+
collectColumn: [],
|
|
76
|
+
// 完整所有列(不带分组)
|
|
77
|
+
tableFullColumn: [],
|
|
78
|
+
// 渲染所有列
|
|
79
|
+
visibleColumn: [],
|
|
80
|
+
// 全量数据集(包括当前和已删除)
|
|
81
|
+
fullAllDataRowIdData: {},
|
|
82
|
+
// 数据集(仅当前)
|
|
83
|
+
fullDataRowIdData: {},
|
|
84
|
+
// 数据集(仅可视)
|
|
85
|
+
visibleDataRowIdData: {},
|
|
86
|
+
// 渲染中缓存数据
|
|
87
|
+
sourceDataRowIdData: {},
|
|
88
|
+
fullColumnIdData: {},
|
|
89
|
+
fullColumnFieldData: {},
|
|
90
|
+
|
|
91
|
+
// 合并单元格的数据
|
|
92
|
+
mergeBodyList: [],
|
|
93
|
+
mergeBodyMaps: {},
|
|
94
|
+
// 合并表尾的数据
|
|
95
|
+
mergeFooterList: [],
|
|
96
|
+
mergeFooterMaps: {},
|
|
97
|
+
// 已合并单元格数据集合
|
|
98
|
+
mergeBodyCellMaps: {},
|
|
99
|
+
// 已合并表尾数据集合
|
|
100
|
+
mergeFooterCellMaps: {},
|
|
101
|
+
// 已展开的行集合
|
|
102
|
+
rowExpandedMaps: {},
|
|
103
|
+
// 懒加载中的展开行的集合
|
|
104
|
+
rowExpandLazyLoadedMaps: {},
|
|
105
|
+
// 已展开的分组行
|
|
106
|
+
rowGroupExpandedMaps: {},
|
|
107
|
+
// 已展开树节点集合
|
|
108
|
+
treeExpandedMaps: {},
|
|
109
|
+
// 懒加载中的树节点的集合
|
|
110
|
+
treeExpandLazyLoadedMaps: {},
|
|
111
|
+
// 复选框属性,已选中的行集合
|
|
112
|
+
selectCheckboxMaps: {},
|
|
113
|
+
// 已标记的对象集
|
|
114
|
+
pendingRowMaps: {},
|
|
115
|
+
// 已新增的临时行
|
|
116
|
+
insertRowMaps: {},
|
|
117
|
+
// 已删除行
|
|
118
|
+
removeRowMaps: {},
|
|
119
|
+
|
|
120
|
+
cvCacheMaps: {},
|
|
121
|
+
|
|
122
|
+
inited: false,
|
|
123
|
+
tooltipTimeout: null,
|
|
124
|
+
initStatus: false,
|
|
125
|
+
isActivated: false
|
|
126
|
+
}
|
|
127
|
+
}
|
|
8
128
|
|
|
9
129
|
const getAllConvertColumns = (columns: any, parentColumn?: any) => {
|
|
10
130
|
const result: any[] = []
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ref, computed, inject, createCommentVNode, VNode, reactive, nextTick, PropType } from 'vue'
|
|
1
|
+
import { h, ref, computed, inject, createCommentVNode, VNode, reactive, nextTick, PropType, onUnmounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI } from '../../ui'
|
|
@@ -10,6 +10,12 @@ import type { VxeGridConstructor, GridPrivateMethods, ToolbarMethods, ToolbarInt
|
|
|
10
10
|
|
|
11
11
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, useFns } = VxeUI
|
|
12
12
|
|
|
13
|
+
function createInternalData (): ToolbarInternalData {
|
|
14
|
+
return {
|
|
15
|
+
connectTable: null
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
export default defineVxeComponent({
|
|
14
20
|
name: 'VxeToolbar',
|
|
15
21
|
props: {
|
|
@@ -64,9 +70,7 @@ export default defineVxeComponent({
|
|
|
64
70
|
columns: []
|
|
65
71
|
})
|
|
66
72
|
|
|
67
|
-
const internalData
|
|
68
|
-
connectTable: null
|
|
69
|
-
}
|
|
73
|
+
const internalData = createInternalData()
|
|
70
74
|
|
|
71
75
|
const refElem = ref<HTMLDivElement>()
|
|
72
76
|
|
|
@@ -708,6 +712,10 @@ export default defineVxeComponent({
|
|
|
708
712
|
}
|
|
709
713
|
})
|
|
710
714
|
|
|
715
|
+
onUnmounted(() => {
|
|
716
|
+
XEUtils.assign(internalData, createInternalData())
|
|
717
|
+
})
|
|
718
|
+
|
|
711
719
|
return $xeToolbar
|
|
712
720
|
},
|
|
713
721
|
render () {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|