vxe-table 4.13.56 → 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.
- 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/table.js +36 -123
- package/es/table/src/util.js +116 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +127 -44
- 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/table.js +9 -42
- 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/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/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/table.ts +37 -127
- package/packages/table/src/util.ts +121 -1
- /package/es/{iconfont.1753525580419.ttf → iconfont.1754456487956.ttf} +0 -0
- /package/es/{iconfont.1753525580419.woff → iconfont.1754456487956.woff} +0 -0
- /package/es/{iconfont.1753525580419.woff2 → iconfont.1754456487956.woff2} +0 -0
- /package/lib/{iconfont.1753525580419.ttf → iconfont.1754456487956.ttf} +0 -0
- /package/lib/{iconfont.1753525580419.woff → iconfont.1754456487956.woff} +0 -0
- /package/lib/{iconfont.1753525580419.woff2 → iconfont.1754456487956.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -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';
|
|
@@ -273,120 +273,7 @@ export default defineVxeComponent({
|
|
|
273
273
|
isRowLoading: false,
|
|
274
274
|
isColLoading: false
|
|
275
275
|
});
|
|
276
|
-
const internalData =
|
|
277
|
-
tZindex: 0,
|
|
278
|
-
currKeyField: '',
|
|
279
|
-
isCurrDeepKey: false,
|
|
280
|
-
elemStore: {},
|
|
281
|
-
// 存放横向 X 虚拟滚动相关的信息
|
|
282
|
-
scrollXStore: {
|
|
283
|
-
preloadSize: 0,
|
|
284
|
-
offsetSize: 0,
|
|
285
|
-
visibleSize: 0,
|
|
286
|
-
visibleStartIndex: 0,
|
|
287
|
-
visibleEndIndex: 0,
|
|
288
|
-
startIndex: 0,
|
|
289
|
-
endIndex: 0
|
|
290
|
-
},
|
|
291
|
-
// 存放纵向 Y 虚拟滚动相关信息
|
|
292
|
-
scrollYStore: {
|
|
293
|
-
preloadSize: 0,
|
|
294
|
-
offsetSize: 0,
|
|
295
|
-
visibleSize: 0,
|
|
296
|
-
visibleStartIndex: 0,
|
|
297
|
-
visibleEndIndex: 0,
|
|
298
|
-
startIndex: 0,
|
|
299
|
-
endIndex: 0
|
|
300
|
-
},
|
|
301
|
-
// 表格宽度
|
|
302
|
-
tableWidth: 0,
|
|
303
|
-
// 表格高度
|
|
304
|
-
tableHeight: 0,
|
|
305
|
-
// 表头高度
|
|
306
|
-
headerHeight: 0,
|
|
307
|
-
// 表尾高度
|
|
308
|
-
footerHeight: 0,
|
|
309
|
-
customHeight: 0,
|
|
310
|
-
customMinHeight: 0,
|
|
311
|
-
customMaxHeight: 0,
|
|
312
|
-
// 当前 hover 行
|
|
313
|
-
hoverRow: null,
|
|
314
|
-
// 最后滚动位置
|
|
315
|
-
lastScrollLeft: 0,
|
|
316
|
-
lastScrollTop: 0,
|
|
317
|
-
// 单选框属性,已选中保留的行
|
|
318
|
-
radioReserveRow: null,
|
|
319
|
-
// 复选框属性,已选中保留的行集合
|
|
320
|
-
checkboxReserveRowMap: {},
|
|
321
|
-
// 行数据,已展开保留的行集合
|
|
322
|
-
rowExpandedReserveRowMap: {},
|
|
323
|
-
// 树结构数据,已展开保留的行集合
|
|
324
|
-
treeExpandedReserveRowMap: {},
|
|
325
|
-
// 树结构数据,不确定状态的集合
|
|
326
|
-
treeIndeterminateRowMaps: {},
|
|
327
|
-
// 列表完整数据、条件处理后
|
|
328
|
-
tableFullData: [],
|
|
329
|
-
afterFullData: [],
|
|
330
|
-
afterTreeFullData: [],
|
|
331
|
-
afterGroupFullData: [],
|
|
332
|
-
// 列表条件处理后数据集合
|
|
333
|
-
afterFullRowMaps: {},
|
|
334
|
-
// 树结构完整数据、条件处理后
|
|
335
|
-
tableFullTreeData: [],
|
|
336
|
-
// 行分组全量数据、条件处理后
|
|
337
|
-
tableFullGroupData: [],
|
|
338
|
-
tableSynchData: [],
|
|
339
|
-
tableSourceData: [],
|
|
340
|
-
// 收集的列配置(带分组)
|
|
341
|
-
collectColumn: [],
|
|
342
|
-
// 完整所有列(不带分组)
|
|
343
|
-
tableFullColumn: [],
|
|
344
|
-
// 渲染所有列
|
|
345
|
-
visibleColumn: [],
|
|
346
|
-
// 全量数据集(包括当前和已删除)
|
|
347
|
-
fullAllDataRowIdData: {},
|
|
348
|
-
// 数据集(仅当前)
|
|
349
|
-
fullDataRowIdData: {},
|
|
350
|
-
// 数据集(仅可视)
|
|
351
|
-
visibleDataRowIdData: {},
|
|
352
|
-
// 渲染中缓存数据
|
|
353
|
-
sourceDataRowIdData: {},
|
|
354
|
-
fullColumnIdData: {},
|
|
355
|
-
fullColumnFieldData: {},
|
|
356
|
-
// 合并单元格的数据
|
|
357
|
-
mergeBodyList: [],
|
|
358
|
-
mergeBodyMaps: {},
|
|
359
|
-
// 合并表尾的数据
|
|
360
|
-
mergeFooterList: [],
|
|
361
|
-
mergeFooterMaps: {},
|
|
362
|
-
// 已合并单元格数据集合
|
|
363
|
-
mergeBodyCellMaps: {},
|
|
364
|
-
// 已合并表尾数据集合
|
|
365
|
-
mergeFooterCellMaps: {},
|
|
366
|
-
// 已展开的行集合
|
|
367
|
-
rowExpandedMaps: {},
|
|
368
|
-
// 懒加载中的展开行的集合
|
|
369
|
-
rowExpandLazyLoadedMaps: {},
|
|
370
|
-
// 已展开的分组行
|
|
371
|
-
rowGroupExpandedMaps: {},
|
|
372
|
-
// 已展开树节点集合
|
|
373
|
-
treeExpandedMaps: {},
|
|
374
|
-
// 懒加载中的树节点的集合
|
|
375
|
-
treeExpandLazyLoadedMaps: {},
|
|
376
|
-
// 复选框属性,已选中的行集合
|
|
377
|
-
selectCheckboxMaps: {},
|
|
378
|
-
// 已标记的对象集
|
|
379
|
-
pendingRowMaps: {},
|
|
380
|
-
// 已新增的临时行
|
|
381
|
-
insertRowMaps: {},
|
|
382
|
-
// 已删除行
|
|
383
|
-
removeRowMaps: {},
|
|
384
|
-
cvCacheMaps: {},
|
|
385
|
-
inited: false,
|
|
386
|
-
tooltipTimeout: null,
|
|
387
|
-
initStatus: false,
|
|
388
|
-
isActivated: false
|
|
389
|
-
};
|
|
276
|
+
const internalData = createInternalData();
|
|
390
277
|
let tableMethods = {};
|
|
391
278
|
let tablePrivateMethods = {};
|
|
392
279
|
const refElem = ref();
|
|
@@ -471,10 +358,38 @@ export default defineVxeComponent({
|
|
|
471
358
|
return virtualYOpts;
|
|
472
359
|
});
|
|
473
360
|
const computeVirtualXOpts = computed(() => {
|
|
474
|
-
|
|
361
|
+
const { virtualXConfig, scrollX } = props;
|
|
362
|
+
const globalVirtualXConfig = getConfig().table.virtualXConfig;
|
|
363
|
+
const globalScrollX = getConfig().table.scrollX;
|
|
364
|
+
if (virtualXConfig) {
|
|
365
|
+
return Object.assign({}, globalVirtualXConfig, virtualXConfig);
|
|
366
|
+
}
|
|
367
|
+
if (scrollX) {
|
|
368
|
+
// 已废弃,保留兼容
|
|
369
|
+
return Object.assign({}, globalScrollX, scrollX);
|
|
370
|
+
}
|
|
371
|
+
if (globalVirtualXConfig) {
|
|
372
|
+
return Object.assign({}, globalVirtualXConfig, virtualXConfig);
|
|
373
|
+
}
|
|
374
|
+
// 已废弃,保留兼容
|
|
375
|
+
return Object.assign({}, globalScrollX, scrollX);
|
|
475
376
|
});
|
|
476
377
|
const computeVirtualYOpts = computed(() => {
|
|
477
|
-
|
|
378
|
+
const { virtualYConfig, scrollY } = props;
|
|
379
|
+
const globalVirtualYConfig = getConfig().table.virtualYConfig;
|
|
380
|
+
const globalScrollY = getConfig().table.scrollY;
|
|
381
|
+
if (virtualYConfig) {
|
|
382
|
+
return Object.assign({}, globalVirtualYConfig, virtualYConfig);
|
|
383
|
+
}
|
|
384
|
+
if (scrollY) {
|
|
385
|
+
// 已废弃,保留兼容
|
|
386
|
+
return Object.assign({}, globalScrollY, scrollY);
|
|
387
|
+
}
|
|
388
|
+
if (globalVirtualYConfig) {
|
|
389
|
+
return Object.assign({}, globalVirtualYConfig, virtualYConfig);
|
|
390
|
+
}
|
|
391
|
+
// 已废弃,保留兼容
|
|
392
|
+
return Object.assign({}, globalScrollY, scrollY);
|
|
478
393
|
});
|
|
479
394
|
const computeScrollbarOpts = computed(() => {
|
|
480
395
|
return Object.assign({}, getConfig().table.scrollbarConfig, props.scrollbarConfig);
|
|
@@ -1578,10 +1493,10 @@ export default defineVxeComponent({
|
|
|
1578
1493
|
}
|
|
1579
1494
|
if (htmlColumn) {
|
|
1580
1495
|
if (!columnOpts.useKey) {
|
|
1581
|
-
errLog('vxe.error.
|
|
1496
|
+
errLog('vxe.error.notSupportProp', ['column.type=html', 'column-config.useKey=false', 'column-config.useKey=true']);
|
|
1582
1497
|
}
|
|
1583
1498
|
if (!rowOpts.useKey) {
|
|
1584
|
-
errLog('vxe.error.
|
|
1499
|
+
errLog('vxe.error.notSupportProp', ['column.type=html', 'row-config.useKey=false', 'row-config.useKey=true']);
|
|
1585
1500
|
}
|
|
1586
1501
|
}
|
|
1587
1502
|
reactData.isGroup = isGroup;
|
|
@@ -11266,7 +11181,7 @@ export default defineVxeComponent({
|
|
|
11266
11181
|
if (value && value.length >= 50000) {
|
|
11267
11182
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
11268
11183
|
}
|
|
11269
|
-
loadTableData(value,
|
|
11184
|
+
loadTableData(value, true).then(() => {
|
|
11270
11185
|
const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
|
|
11271
11186
|
const expandOpts = computeExpandOpts.value;
|
|
11272
11187
|
internalData.inited = true;
|
|
@@ -11694,9 +11609,6 @@ export default defineVxeComponent({
|
|
|
11694
11609
|
if (tableViewportEl) {
|
|
11695
11610
|
tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
|
|
11696
11611
|
}
|
|
11697
|
-
internalData.cvCacheMaps = {};
|
|
11698
|
-
internalData.prevDragRow = null;
|
|
11699
|
-
internalData.prevDragCol = null;
|
|
11700
11612
|
if (resizeObserver) {
|
|
11701
11613
|
resizeObserver.disconnect();
|
|
11702
11614
|
}
|
|
@@ -11717,6 +11629,7 @@ export default defineVxeComponent({
|
|
|
11717
11629
|
globalEvents.off($xeTable, 'resize');
|
|
11718
11630
|
globalEvents.off($xeTable, 'contextmenu');
|
|
11719
11631
|
tablePrivateMethods.preventEvent(null, 'unmounted', { $table: $xeTable });
|
|
11632
|
+
XEUtils.assign(internalData, createInternalData());
|
|
11720
11633
|
});
|
|
11721
11634
|
nextTick(() => {
|
|
11722
11635
|
if (props.loading) {
|
package/es/table/src/util.js
CHANGED
|
@@ -3,6 +3,122 @@ import XEUtils from 'xe-utils';
|
|
|
3
3
|
import { ColumnInfo } from './columnInfo';
|
|
4
4
|
import { isPx, isScale, queryElement } from '../../ui/src/dom';
|
|
5
5
|
import { eqEmptyValue } from '../../ui/src/utils';
|
|
6
|
+
export function createInternalData() {
|
|
7
|
+
return {
|
|
8
|
+
tZindex: 0,
|
|
9
|
+
currKeyField: '',
|
|
10
|
+
isCurrDeepKey: false,
|
|
11
|
+
elemStore: {},
|
|
12
|
+
// 存放横向 X 虚拟滚动相关的信息
|
|
13
|
+
scrollXStore: {
|
|
14
|
+
preloadSize: 0,
|
|
15
|
+
offsetSize: 0,
|
|
16
|
+
visibleSize: 0,
|
|
17
|
+
visibleStartIndex: 0,
|
|
18
|
+
visibleEndIndex: 0,
|
|
19
|
+
startIndex: 0,
|
|
20
|
+
endIndex: 0
|
|
21
|
+
},
|
|
22
|
+
// 存放纵向 Y 虚拟滚动相关信息
|
|
23
|
+
scrollYStore: {
|
|
24
|
+
preloadSize: 0,
|
|
25
|
+
offsetSize: 0,
|
|
26
|
+
visibleSize: 0,
|
|
27
|
+
visibleStartIndex: 0,
|
|
28
|
+
visibleEndIndex: 0,
|
|
29
|
+
startIndex: 0,
|
|
30
|
+
endIndex: 0
|
|
31
|
+
},
|
|
32
|
+
// 表格宽度
|
|
33
|
+
tableWidth: 0,
|
|
34
|
+
// 表格高度
|
|
35
|
+
tableHeight: 0,
|
|
36
|
+
// 表头高度
|
|
37
|
+
headerHeight: 0,
|
|
38
|
+
// 表尾高度
|
|
39
|
+
footerHeight: 0,
|
|
40
|
+
customHeight: 0,
|
|
41
|
+
customMinHeight: 0,
|
|
42
|
+
customMaxHeight: 0,
|
|
43
|
+
// 当前 hover 行
|
|
44
|
+
hoverRow: null,
|
|
45
|
+
// 最后滚动位置
|
|
46
|
+
lastScrollLeft: 0,
|
|
47
|
+
lastScrollTop: 0,
|
|
48
|
+
// 单选框属性,已选中保留的行
|
|
49
|
+
radioReserveRow: null,
|
|
50
|
+
// 复选框属性,已选中保留的行集合
|
|
51
|
+
checkboxReserveRowMap: {},
|
|
52
|
+
// 行数据,已展开保留的行集合
|
|
53
|
+
rowExpandedReserveRowMap: {},
|
|
54
|
+
// 树结构数据,已展开保留的行集合
|
|
55
|
+
treeExpandedReserveRowMap: {},
|
|
56
|
+
// 树结构数据,不确定状态的集合
|
|
57
|
+
treeIndeterminateRowMaps: {},
|
|
58
|
+
// 列表完整数据、条件处理后
|
|
59
|
+
tableFullData: [],
|
|
60
|
+
afterFullData: [],
|
|
61
|
+
afterTreeFullData: [],
|
|
62
|
+
afterGroupFullData: [],
|
|
63
|
+
// 列表条件处理后数据集合
|
|
64
|
+
afterFullRowMaps: {},
|
|
65
|
+
// 树结构完整数据、条件处理后
|
|
66
|
+
tableFullTreeData: [],
|
|
67
|
+
// 行分组全量数据、条件处理后
|
|
68
|
+
tableFullGroupData: [],
|
|
69
|
+
tableSynchData: [],
|
|
70
|
+
tableSourceData: [],
|
|
71
|
+
// 收集的列配置(带分组)
|
|
72
|
+
collectColumn: [],
|
|
73
|
+
// 完整所有列(不带分组)
|
|
74
|
+
tableFullColumn: [],
|
|
75
|
+
// 渲染所有列
|
|
76
|
+
visibleColumn: [],
|
|
77
|
+
// 全量数据集(包括当前和已删除)
|
|
78
|
+
fullAllDataRowIdData: {},
|
|
79
|
+
// 数据集(仅当前)
|
|
80
|
+
fullDataRowIdData: {},
|
|
81
|
+
// 数据集(仅可视)
|
|
82
|
+
visibleDataRowIdData: {},
|
|
83
|
+
// 渲染中缓存数据
|
|
84
|
+
sourceDataRowIdData: {},
|
|
85
|
+
fullColumnIdData: {},
|
|
86
|
+
fullColumnFieldData: {},
|
|
87
|
+
// 合并单元格的数据
|
|
88
|
+
mergeBodyList: [],
|
|
89
|
+
mergeBodyMaps: {},
|
|
90
|
+
// 合并表尾的数据
|
|
91
|
+
mergeFooterList: [],
|
|
92
|
+
mergeFooterMaps: {},
|
|
93
|
+
// 已合并单元格数据集合
|
|
94
|
+
mergeBodyCellMaps: {},
|
|
95
|
+
// 已合并表尾数据集合
|
|
96
|
+
mergeFooterCellMaps: {},
|
|
97
|
+
// 已展开的行集合
|
|
98
|
+
rowExpandedMaps: {},
|
|
99
|
+
// 懒加载中的展开行的集合
|
|
100
|
+
rowExpandLazyLoadedMaps: {},
|
|
101
|
+
// 已展开的分组行
|
|
102
|
+
rowGroupExpandedMaps: {},
|
|
103
|
+
// 已展开树节点集合
|
|
104
|
+
treeExpandedMaps: {},
|
|
105
|
+
// 懒加载中的树节点的集合
|
|
106
|
+
treeExpandLazyLoadedMaps: {},
|
|
107
|
+
// 复选框属性,已选中的行集合
|
|
108
|
+
selectCheckboxMaps: {},
|
|
109
|
+
// 已标记的对象集
|
|
110
|
+
pendingRowMaps: {},
|
|
111
|
+
// 已新增的临时行
|
|
112
|
+
insertRowMaps: {},
|
|
113
|
+
// 已删除行
|
|
114
|
+
removeRowMaps: {},
|
|
115
|
+
cvCacheMaps: {},
|
|
116
|
+
inited: false,
|
|
117
|
+
tooltipTimeout: null,
|
|
118
|
+
initStatus: false,
|
|
119
|
+
isActivated: false
|
|
120
|
+
};
|
|
121
|
+
}
|
|
6
122
|
const getAllConvertColumns = (columns, parentColumn) => {
|
|
7
123
|
const result = [];
|
|
8
124
|
columns.forEach((column) => {
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED