vxe-table 3.16.12 → 3.16.13
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/methods.js +22 -2
- package/es/table/src/table.js +9 -120
- package/es/table/src/util.js +116 -0
- package/es/toolbar/src/toolbar.js +11 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +163 -126
- 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/methods.js +26 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +8 -119
- 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 +11 -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/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/methods.ts +22 -2
- package/packages/table/src/table.ts +10 -124
- package/packages/table/src/util.ts +120 -0
- package/packages/toolbar/src/toolbar.ts +13 -3
- /package/es/{iconfont.1754381491758.ttf → iconfont.1754456334514.ttf} +0 -0
- /package/es/{iconfont.1754381491758.woff → iconfont.1754456334514.woff} +0 -0
- /package/es/{iconfont.1754381491758.woff2 → iconfont.1754456334514.woff2} +0 -0
- /package/lib/{iconfont.1754381491758.ttf → iconfont.1754456334514.ttf} +0 -0
- /package/lib/{iconfont.1754381491758.woff → iconfont.1754456334514.woff} +0 -0
- /package/lib/{iconfont.1754381491758.woff2 → iconfont.1754456334514.woff2} +0 -0
|
@@ -2,7 +2,7 @@ import { CreateElement } from 'vue'
|
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { getFuncText, isEnableConf } from '../../ui/src/utils'
|
|
4
4
|
import { initTpImg } from '../../ui/src/dom'
|
|
5
|
-
import { createHandleGetRowId, getCellHeight, hasDeepKey } from './util'
|
|
5
|
+
import { createInternalData, createHandleGetRowId, getCellHeight, hasDeepKey } from './util'
|
|
6
6
|
import { VxeUI } from '../../ui'
|
|
7
7
|
import methods from './methods'
|
|
8
8
|
import TableBodyComponent from './body'
|
|
@@ -1374,7 +1374,7 @@ export default {
|
|
|
1374
1374
|
if (value && value.length >= 50000) {
|
|
1375
1375
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)'])
|
|
1376
1376
|
}
|
|
1377
|
-
this.loadTableData(value || [],
|
|
1377
|
+
this.loadTableData(value || [], true).then(() => {
|
|
1378
1378
|
const { scrollXLoad, scrollYLoad, expandColumn } = reactData
|
|
1379
1379
|
const expandOpts = $xeTable.computeExpandOpts
|
|
1380
1380
|
this.inited = true
|
|
@@ -1509,119 +1509,7 @@ export default {
|
|
|
1509
1509
|
const props = $xeTable
|
|
1510
1510
|
const internalData = $xeTable as unknown as TableInternalData
|
|
1511
1511
|
|
|
1512
|
-
|
|
1513
|
-
tZindex: 0,
|
|
1514
|
-
currKeyField: '',
|
|
1515
|
-
isCurrDeepKey: false,
|
|
1516
|
-
elemStore: {},
|
|
1517
|
-
// 存放横向 X 虚拟滚动相关的信息
|
|
1518
|
-
scrollXStore: {
|
|
1519
|
-
preloadSize: 0,
|
|
1520
|
-
offsetSize: 0,
|
|
1521
|
-
visibleSize: 0,
|
|
1522
|
-
visibleStartIndex: 0,
|
|
1523
|
-
visibleEndIndex: 0,
|
|
1524
|
-
startIndex: 0,
|
|
1525
|
-
endIndex: 0
|
|
1526
|
-
},
|
|
1527
|
-
// 存放纵向 Y 虚拟滚动相关信息
|
|
1528
|
-
scrollYStore: {
|
|
1529
|
-
preloadSize: 0,
|
|
1530
|
-
offsetSize: 0,
|
|
1531
|
-
visibleSize: 0,
|
|
1532
|
-
visibleStartIndex: 0,
|
|
1533
|
-
visibleEndIndex: 0,
|
|
1534
|
-
startIndex: 0,
|
|
1535
|
-
endIndex: 0
|
|
1536
|
-
},
|
|
1537
|
-
// 表格宽度
|
|
1538
|
-
tableWidth: 0,
|
|
1539
|
-
// 表格高度
|
|
1540
|
-
tableHeight: 0,
|
|
1541
|
-
// 表头高度
|
|
1542
|
-
headerHeight: 0,
|
|
1543
|
-
// 表尾高度
|
|
1544
|
-
footerHeight: 0,
|
|
1545
|
-
// 当前 hover 行
|
|
1546
|
-
// hoverRow: null,
|
|
1547
|
-
// 最后滚动位置
|
|
1548
|
-
lastScrollLeft: 0,
|
|
1549
|
-
lastScrollTop: 0,
|
|
1550
|
-
// 单选框属性,已选中保留的行
|
|
1551
|
-
radioReserveRow: null,
|
|
1552
|
-
// 复选框属性,已选中保留的行集合
|
|
1553
|
-
checkboxReserveRowMap: {},
|
|
1554
|
-
// 行数据,已展开保留的行集合
|
|
1555
|
-
rowExpandedReserveRowMap: {},
|
|
1556
|
-
// 树结构数据,已展开保留的行集合
|
|
1557
|
-
treeExpandedReserveRowMap: {},
|
|
1558
|
-
// 树结构数据,不确定状态的集合
|
|
1559
|
-
treeIndeterminateRowMaps: {},
|
|
1560
|
-
// 列表完整数据、条件处理后
|
|
1561
|
-
tableFullData: [],
|
|
1562
|
-
afterFullData: [],
|
|
1563
|
-
afterTreeFullData: [],
|
|
1564
|
-
afterGroupFullData: [],
|
|
1565
|
-
// 列表条件处理后数据集合
|
|
1566
|
-
afterFullRowMaps: {},
|
|
1567
|
-
// 树结构完整数据、条件处理后
|
|
1568
|
-
tableFullTreeData: [],
|
|
1569
|
-
// 行分组全量数据、条件处理后
|
|
1570
|
-
tableFullGroupData: [],
|
|
1571
|
-
tableSynchData: [],
|
|
1572
|
-
tableSourceData: [],
|
|
1573
|
-
// 收集的列配置(带分组)
|
|
1574
|
-
collectColumn: [],
|
|
1575
|
-
// 完整所有列(不带分组)
|
|
1576
|
-
tableFullColumn: [],
|
|
1577
|
-
// 渲染所有列
|
|
1578
|
-
visibleColumn: [],
|
|
1579
|
-
// 全量数据集(包括当前和已删除)
|
|
1580
|
-
fullAllDataRowIdData: {},
|
|
1581
|
-
// 数据集(仅当前)
|
|
1582
|
-
fullDataRowIdData: {},
|
|
1583
|
-
// 数据集(仅可视)
|
|
1584
|
-
visibleDataRowIdData: {},
|
|
1585
|
-
// 渲染中缓存数据
|
|
1586
|
-
sourceDataRowIdData: {},
|
|
1587
|
-
fullColumnIdData: {},
|
|
1588
|
-
fullColumnFieldData: {},
|
|
1589
|
-
|
|
1590
|
-
// 合并单元格的数据
|
|
1591
|
-
mergeBodyList: [],
|
|
1592
|
-
mergeBodyMaps: {},
|
|
1593
|
-
// 合并表尾的数据
|
|
1594
|
-
mergeFooterList: [],
|
|
1595
|
-
mergeFooterMaps: {},
|
|
1596
|
-
// 已合并单元格数据集合
|
|
1597
|
-
mergeBodyCellMaps: {},
|
|
1598
|
-
// 已合并表尾数据集合
|
|
1599
|
-
mergeFooterCellMaps: {},
|
|
1600
|
-
// 已展开的行集合
|
|
1601
|
-
rowExpandedMaps: {},
|
|
1602
|
-
// 懒加载中的展开行的集合
|
|
1603
|
-
rowExpandLazyLoadedMaps: {},
|
|
1604
|
-
// 已展开的分组行
|
|
1605
|
-
rowGroupExpandedMaps: {},
|
|
1606
|
-
// 已展开树节点集合
|
|
1607
|
-
treeExpandedMaps: {},
|
|
1608
|
-
// 懒加载中的树节点的集合
|
|
1609
|
-
treeExpandLazyLoadedMaps: {},
|
|
1610
|
-
// 复选框属性,已选中的行集合
|
|
1611
|
-
selectCheckboxMaps: {},
|
|
1612
|
-
// 已标记的对象集
|
|
1613
|
-
pendingRowMaps: {},
|
|
1614
|
-
// 已新增的临时行
|
|
1615
|
-
insertRowMaps: {},
|
|
1616
|
-
// 已删除行
|
|
1617
|
-
removeRowMaps: {},
|
|
1618
|
-
|
|
1619
|
-
cvCacheMaps: {},
|
|
1620
|
-
|
|
1621
|
-
swYSize: 0,
|
|
1622
|
-
swYInterval: 0,
|
|
1623
|
-
swYTotal: 0
|
|
1624
|
-
})
|
|
1512
|
+
XEUtils.assign(internalData, createInternalData())
|
|
1625
1513
|
|
|
1626
1514
|
handleKeyField($xeTable)
|
|
1627
1515
|
|
|
@@ -1976,25 +1864,16 @@ export default {
|
|
|
1976
1864
|
},
|
|
1977
1865
|
beforeDestroy () {
|
|
1978
1866
|
const $xeTable = this
|
|
1979
|
-
const internalData = $xeTable as unknown as TableInternalData
|
|
1980
1867
|
|
|
1981
1868
|
const tableViewportEl = $xeTable.$refs.refTableViewportElem as HTMLDivElement
|
|
1982
1869
|
if (tableViewportEl) {
|
|
1983
1870
|
tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent)
|
|
1984
1871
|
}
|
|
1985
|
-
internalData.cvCacheMaps = {}
|
|
1986
|
-
internalData.prevDragRow = null
|
|
1987
|
-
internalData.prevDragCol = null
|
|
1988
1872
|
if (this.$resize) {
|
|
1989
1873
|
this.$resize.disconnect()
|
|
1990
1874
|
}
|
|
1991
1875
|
this.closeFilter()
|
|
1992
1876
|
this.closeMenu()
|
|
1993
|
-
this.preventEvent(null, 'beforeDestroy')
|
|
1994
|
-
},
|
|
1995
|
-
destroyed () {
|
|
1996
|
-
const $xeTable = this
|
|
1997
|
-
|
|
1998
1877
|
globalEvents.off($xeTable, 'paste')
|
|
1999
1878
|
globalEvents.off($xeTable, 'copy')
|
|
2000
1879
|
globalEvents.off($xeTable, 'cut')
|
|
@@ -2004,7 +1883,14 @@ export default {
|
|
|
2004
1883
|
globalEvents.off($xeTable, 'keydown')
|
|
2005
1884
|
globalEvents.off($xeTable, 'resize')
|
|
2006
1885
|
globalEvents.off($xeTable, 'contextmenu')
|
|
1886
|
+
this.preventEvent(null, 'beforeDestroy')
|
|
1887
|
+
},
|
|
1888
|
+
destroyed () {
|
|
1889
|
+
const $xeTable = this
|
|
1890
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
1891
|
+
|
|
2007
1892
|
this.preventEvent(null, 'destroyed')
|
|
1893
|
+
XEUtils.assign(internalData, createInternalData())
|
|
2008
1894
|
},
|
|
2009
1895
|
render (h: CreateElement) {
|
|
2010
1896
|
// 使用已安装的组件,如果未安装则不渲染
|
|
@@ -6,6 +6,126 @@ import { eqEmptyValue } from '../../ui/src/utils'
|
|
|
6
6
|
|
|
7
7
|
import type { VxeTableDefines, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePrivateMethods, VxeTablePropTypes } from '../../../types'
|
|
8
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
|
+
}
|
|
128
|
+
|
|
9
129
|
const getAllConvertColumns = (columns: any, parentColumn?: any) => {
|
|
10
130
|
const result: any[] = []
|
|
11
131
|
columns.forEach((column: any) => {
|
|
@@ -10,6 +10,12 @@ import type { VxeGridConstructor, GridPrivateMethods, ToolbarInternalData, VxeTa
|
|
|
10
10
|
|
|
11
11
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, globalMixins, renderEmptyElement } = VxeUI
|
|
12
12
|
|
|
13
|
+
function createInternalData (): ToolbarInternalData {
|
|
14
|
+
return {
|
|
15
|
+
connectTable: null
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
14
20
|
name: 'VxeToolbar',
|
|
15
21
|
mixins: [
|
|
@@ -59,9 +65,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
59
65
|
connectFlag: 0,
|
|
60
66
|
columns: []
|
|
61
67
|
}
|
|
62
|
-
const internalData
|
|
63
|
-
connectTable: null
|
|
64
|
-
}
|
|
68
|
+
const internalData = createInternalData()
|
|
65
69
|
return {
|
|
66
70
|
xID,
|
|
67
71
|
reactData,
|
|
@@ -852,6 +856,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
852
856
|
}
|
|
853
857
|
}
|
|
854
858
|
},
|
|
859
|
+
destroyed () {
|
|
860
|
+
const $xeToolbar = this
|
|
861
|
+
const internalData = $xeToolbar.internalData
|
|
862
|
+
|
|
863
|
+
XEUtils.assign(internalData, createInternalData())
|
|
864
|
+
},
|
|
855
865
|
render (this: any, h) {
|
|
856
866
|
return this.renderVN(h)
|
|
857
867
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|