vxe-table 4.13.57 → 4.13.58

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.
Files changed (60) hide show
  1. package/es/locale/lang/de-DE.js +80 -80
  2. package/es/locale/lang/es-ES.js +79 -79
  3. package/es/locale/lang/ja-JP.js +82 -82
  4. package/es/locale/lang/ko-KR.js +88 -88
  5. package/es/locale/lang/ru-RU.js +84 -84
  6. package/es/locale/lang/vi-VN.js +79 -79
  7. package/es/locale/lang/zh-CHT.js +21 -21
  8. package/es/style.css +1 -1
  9. package/es/table/src/table.js +4 -119
  10. package/es/table/src/util.js +116 -0
  11. package/es/ui/index.js +1 -1
  12. package/es/ui/src/log.js +1 -1
  13. package/lib/index.umd.js +121 -42
  14. package/lib/index.umd.min.js +1 -1
  15. package/lib/locale/lang/de-DE.js +80 -80
  16. package/lib/locale/lang/de-DE.min.js +1 -1
  17. package/lib/locale/lang/de-DE.umd.js +80 -80
  18. package/lib/locale/lang/es-ES.js +79 -79
  19. package/lib/locale/lang/es-ES.min.js +1 -1
  20. package/lib/locale/lang/es-ES.umd.js +79 -79
  21. package/lib/locale/lang/ja-JP.js +82 -82
  22. package/lib/locale/lang/ja-JP.min.js +1 -1
  23. package/lib/locale/lang/ja-JP.umd.js +82 -82
  24. package/lib/locale/lang/ko-KR.js +88 -88
  25. package/lib/locale/lang/ko-KR.min.js +1 -1
  26. package/lib/locale/lang/ko-KR.umd.js +88 -88
  27. package/lib/locale/lang/ru-RU.js +84 -84
  28. package/lib/locale/lang/ru-RU.min.js +1 -1
  29. package/lib/locale/lang/ru-RU.umd.js +84 -84
  30. package/lib/locale/lang/vi-VN.js +79 -79
  31. package/lib/locale/lang/vi-VN.min.js +1 -1
  32. package/lib/locale/lang/vi-VN.umd.js +79 -79
  33. package/lib/locale/lang/zh-CHT.js +21 -21
  34. package/lib/locale/lang/zh-CHT.min.js +1 -1
  35. package/lib/locale/lang/zh-CHT.umd.js +21 -21
  36. package/lib/style.css +1 -1
  37. package/lib/table/src/table.js +3 -40
  38. package/lib/table/src/table.min.js +1 -1
  39. package/lib/table/src/util.js +117 -0
  40. package/lib/table/src/util.min.js +1 -1
  41. package/lib/ui/index.js +1 -1
  42. package/lib/ui/index.min.js +1 -1
  43. package/lib/ui/src/log.js +1 -1
  44. package/lib/ui/src/log.min.js +1 -1
  45. package/package.json +1 -1
  46. package/packages/locale/lang/de-DE.ts +80 -80
  47. package/packages/locale/lang/es-ES.ts +79 -79
  48. package/packages/locale/lang/ja-JP.ts +82 -82
  49. package/packages/locale/lang/ko-KR.ts +88 -88
  50. package/packages/locale/lang/ru-RU.ts +84 -84
  51. package/packages/locale/lang/vi-VN.ts +79 -79
  52. package/packages/locale/lang/zh-CHT.ts +21 -21
  53. package/packages/table/src/table.ts +5 -123
  54. package/packages/table/src/util.ts +121 -1
  55. /package/es/{iconfont.1754364708207.ttf → iconfont.1754456487956.ttf} +0 -0
  56. /package/es/{iconfont.1754364708207.woff → iconfont.1754456487956.woff} +0 -0
  57. /package/es/{iconfont.1754364708207.woff2 → iconfont.1754456487956.woff2} +0 -0
  58. /package/lib/{iconfont.1754364708207.ttf → iconfont.1754456487956.ttf} +0 -0
  59. /package/lib/{iconfont.1754364708207.woff → iconfont.1754456487956.woff} +0 -0
  60. /package/lib/{iconfont.1754364708207.woff2 → iconfont.1754456487956.woff2} +0 -0
@@ -10,7 +10,7 @@ import TableHeaderComponent from './header'
10
10
  import TableFooterComponent from './footer'
11
11
  import tableProps from './props'
12
12
  import tableEmits from './emits'
13
- import { getRowUniqueId, clearTableAllStatus, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCellHeight } from './util'
13
+ import { createInternalData, getRowUniqueId, clearTableAllStatus, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCellHeight } from './util'
14
14
  import { getSlotVNs } from '../../ui/src/vn'
15
15
  import { warnLog, errLog } from '../../ui/src/log'
16
16
  import TableCustomPanelComponent from '../module/custom/panel'
@@ -20,7 +20,7 @@ import TableExportPanelComponent from '../module/export/export-panel'
20
20
  import TableMenuPanelComponent from '../module/menu/panel'
21
21
 
22
22
  import type { VxeLoadingComponent, VxeTooltipInstance, VxeTooltipComponent, VxeTabsConstructor, VxeTabsPrivateMethods, ValueOf, VxeComponentSlotType } from 'vxe-pc-ui'
23
- import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableEmits, VxeTableProps, VxeColumnPropTypes, VxeTableCustomPanelConstructor } from '../../../types'
23
+ import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableEmits, VxeTableProps, VxeColumnPropTypes, VxeTableCustomPanelConstructor } from '../../../types'
24
24
 
25
25
  const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI
26
26
 
@@ -295,123 +295,7 @@ export default defineVxeComponent({
295
295
  isColLoading: false
296
296
  })
297
297
 
298
- const internalData: TableInternalData = {
299
- tZindex: 0,
300
- currKeyField: '',
301
- isCurrDeepKey: false,
302
- elemStore: {},
303
- // 存放横向 X 虚拟滚动相关的信息
304
- scrollXStore: {
305
- preloadSize: 0,
306
- offsetSize: 0,
307
- visibleSize: 0,
308
- visibleStartIndex: 0,
309
- visibleEndIndex: 0,
310
- startIndex: 0,
311
- endIndex: 0
312
- },
313
- // 存放纵向 Y 虚拟滚动相关信息
314
- scrollYStore: {
315
- preloadSize: 0,
316
- offsetSize: 0,
317
- visibleSize: 0,
318
- visibleStartIndex: 0,
319
- visibleEndIndex: 0,
320
- startIndex: 0,
321
- endIndex: 0
322
- },
323
- // 表格宽度
324
- tableWidth: 0,
325
- // 表格高度
326
- tableHeight: 0,
327
- // 表头高度
328
- headerHeight: 0,
329
- // 表尾高度
330
- footerHeight: 0,
331
- customHeight: 0,
332
- customMinHeight: 0,
333
- customMaxHeight: 0,
334
- // 当前 hover 行
335
- hoverRow: null,
336
- // 最后滚动位置
337
- lastScrollLeft: 0,
338
- lastScrollTop: 0,
339
- // 单选框属性,已选中保留的行
340
- radioReserveRow: null,
341
- // 复选框属性,已选中保留的行集合
342
- checkboxReserveRowMap: {},
343
- // 行数据,已展开保留的行集合
344
- rowExpandedReserveRowMap: {},
345
- // 树结构数据,已展开保留的行集合
346
- treeExpandedReserveRowMap: {},
347
- // 树结构数据,不确定状态的集合
348
- treeIndeterminateRowMaps: {},
349
- // 列表完整数据、条件处理后
350
- tableFullData: [],
351
- afterFullData: [],
352
- afterTreeFullData: [],
353
- afterGroupFullData: [],
354
- // 列表条件处理后数据集合
355
- afterFullRowMaps: {},
356
- // 树结构完整数据、条件处理后
357
- tableFullTreeData: [],
358
- // 行分组全量数据、条件处理后
359
- tableFullGroupData: [],
360
- tableSynchData: [],
361
- tableSourceData: [],
362
- // 收集的列配置(带分组)
363
- collectColumn: [],
364
- // 完整所有列(不带分组)
365
- tableFullColumn: [],
366
- // 渲染所有列
367
- visibleColumn: [],
368
- // 全量数据集(包括当前和已删除)
369
- fullAllDataRowIdData: {},
370
- // 数据集(仅当前)
371
- fullDataRowIdData: {},
372
- // 数据集(仅可视)
373
- visibleDataRowIdData: {},
374
- // 渲染中缓存数据
375
- sourceDataRowIdData: {},
376
- fullColumnIdData: {},
377
- fullColumnFieldData: {},
378
-
379
- // 合并单元格的数据
380
- mergeBodyList: [],
381
- mergeBodyMaps: {},
382
- // 合并表尾的数据
383
- mergeFooterList: [],
384
- mergeFooterMaps: {},
385
- // 已合并单元格数据集合
386
- mergeBodyCellMaps: {},
387
- // 已合并表尾数据集合
388
- mergeFooterCellMaps: {},
389
- // 已展开的行集合
390
- rowExpandedMaps: {},
391
- // 懒加载中的展开行的集合
392
- rowExpandLazyLoadedMaps: {},
393
- // 已展开的分组行
394
- rowGroupExpandedMaps: {},
395
- // 已展开树节点集合
396
- treeExpandedMaps: {},
397
- // 懒加载中的树节点的集合
398
- treeExpandLazyLoadedMaps: {},
399
- // 复选框属性,已选中的行集合
400
- selectCheckboxMaps: {},
401
- // 已标记的对象集
402
- pendingRowMaps: {},
403
- // 已新增的临时行
404
- insertRowMaps: {},
405
- // 已删除行
406
- removeRowMaps: {},
407
-
408
- cvCacheMaps: {},
409
-
410
- inited: false,
411
- tooltipTimeout: null,
412
- initStatus: false,
413
- isActivated: false
414
- }
298
+ const internalData = createInternalData()
415
299
 
416
300
  let tableMethods = {} as TableMethods
417
301
  let tablePrivateMethods = {} as TablePrivateMethods
@@ -11468,7 +11352,7 @@ export default defineVxeComponent({
11468
11352
  if (value && value.length >= 50000) {
11469
11353
  warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)'])
11470
11354
  }
11471
- loadTableData(value, false).then(() => {
11355
+ loadTableData(value, true).then(() => {
11472
11356
  const { scrollXLoad, scrollYLoad, expandColumn } = reactData
11473
11357
  const expandOpts = computeExpandOpts.value
11474
11358
  internalData.inited = true
@@ -11930,9 +11814,6 @@ export default defineVxeComponent({
11930
11814
  if (tableViewportEl) {
11931
11815
  tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent)
11932
11816
  }
11933
- internalData.cvCacheMaps = {}
11934
- internalData.prevDragRow = null
11935
- internalData.prevDragCol = null
11936
11817
  if (resizeObserver) {
11937
11818
  resizeObserver.disconnect()
11938
11819
  }
@@ -11954,6 +11835,7 @@ export default defineVxeComponent({
11954
11835
  globalEvents.off($xeTable, 'resize')
11955
11836
  globalEvents.off($xeTable, 'contextmenu')
11956
11837
  tablePrivateMethods.preventEvent(null, 'unmounted', { $table: $xeTable })
11838
+ XEUtils.assign(internalData, createInternalData())
11957
11839
  })
11958
11840
 
11959
11841
  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[] = []