vxe-table 4.14.12 → 4.14.14
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/ar-EG.js +3 -1
- package/es/locale/lang/de-DE.js +82 -80
- package/es/locale/lang/en-US.js +3 -1
- package/es/locale/lang/es-ES.js +81 -79
- package/es/locale/lang/fr-FR.js +3 -1
- package/es/locale/lang/hu-HU.js +3 -1
- package/es/locale/lang/hy-AM.js +3 -1
- package/es/locale/lang/id-ID.js +3 -1
- package/es/locale/lang/it-IT.js +3 -1
- package/es/locale/lang/ja-JP.js +84 -82
- package/es/locale/lang/ko-KR.js +90 -88
- package/es/locale/lang/ms-MY.js +3 -1
- package/es/locale/lang/nb-NO.js +3 -1
- package/es/locale/lang/pt-BR.js +3 -1
- package/es/locale/lang/ru-RU.js +86 -84
- package/es/locale/lang/th-TH.js +3 -1
- package/es/locale/lang/ug-CN.js +3 -1
- package/es/locale/lang/uk-UA.js +3 -1
- package/es/locale/lang/uz-UZ.js +3 -1
- package/es/locale/lang/vi-VN.js +81 -79
- package/es/locale/lang/zh-CHT.js +23 -21
- package/es/locale/lang/zh-CN.js +3 -1
- package/es/style.css +1 -1
- package/es/table/src/table.js +65 -121
- 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 +131 -48
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +3 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +3 -1
- package/lib/locale/lang/de-DE.js +82 -80
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +82 -80
- package/lib/locale/lang/en-US.js +3 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -1
- package/lib/locale/lang/es-ES.js +81 -79
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +81 -79
- package/lib/locale/lang/fr-FR.js +3 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +3 -1
- package/lib/locale/lang/hu-HU.js +3 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +3 -1
- package/lib/locale/lang/hy-AM.js +3 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +3 -1
- package/lib/locale/lang/id-ID.js +3 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +3 -1
- package/lib/locale/lang/it-IT.js +3 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +3 -1
- package/lib/locale/lang/ja-JP.js +84 -82
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +84 -82
- package/lib/locale/lang/ko-KR.js +90 -88
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +90 -88
- package/lib/locale/lang/ms-MY.js +3 -1
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +3 -1
- package/lib/locale/lang/nb-NO.js +3 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +3 -1
- package/lib/locale/lang/pt-BR.js +3 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +3 -1
- package/lib/locale/lang/ru-RU.js +86 -84
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +86 -84
- package/lib/locale/lang/th-TH.js +3 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +3 -1
- package/lib/locale/lang/ug-CN.js +3 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +3 -1
- package/lib/locale/lang/uk-UA.js +3 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +3 -1
- package/lib/locale/lang/uz-UZ.js +3 -1
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +3 -1
- package/lib/locale/lang/vi-VN.js +81 -79
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +81 -79
- package/lib/locale/lang/zh-CHT.js +23 -21
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +23 -21
- package/lib/locale/lang/zh-CN.js +3 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +3 -1
- package/lib/style.css +1 -1
- package/lib/table/src/table.js +10 -45
- 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/ar-EG.ts +3 -1
- package/packages/locale/lang/de-DE.ts +82 -80
- package/packages/locale/lang/en-US.ts +3 -1
- package/packages/locale/lang/es-ES.ts +81 -79
- package/packages/locale/lang/fr-FR.ts +3 -1
- package/packages/locale/lang/hu-HU.ts +3 -1
- package/packages/locale/lang/hy-AM.ts +3 -1
- package/packages/locale/lang/id-ID.ts +3 -1
- package/packages/locale/lang/it-IT.ts +3 -1
- package/packages/locale/lang/ja-JP.ts +84 -82
- package/packages/locale/lang/ko-KR.ts +90 -88
- package/packages/locale/lang/ms-MY.ts +3 -1
- package/packages/locale/lang/nb-NO.ts +3 -1
- package/packages/locale/lang/pt-BR.ts +3 -1
- package/packages/locale/lang/ru-RU.ts +86 -84
- package/packages/locale/lang/th-TH.ts +3 -1
- package/packages/locale/lang/ug-CN.ts +3 -1
- package/packages/locale/lang/uk-UA.ts +3 -1
- package/packages/locale/lang/uz-UZ.ts +3 -1
- package/packages/locale/lang/vi-VN.ts +81 -79
- package/packages/locale/lang/zh-CHT.ts +23 -21
- package/packages/locale/lang/zh-CN.ts +3 -1
- package/packages/table/src/table.ts +66 -126
- package/packages/table/src/util.ts +121 -1
- /package/es/{iconfont.1754381597724.ttf → iconfont.1755650311186.ttf} +0 -0
- /package/es/{iconfont.1754381597724.woff → iconfont.1755650311186.woff} +0 -0
- /package/es/{iconfont.1754381597724.woff2 → iconfont.1755650311186.woff2} +0 -0
- /package/lib/{iconfont.1754381597724.ttf → iconfont.1755650311186.ttf} +0 -0
- /package/lib/{iconfont.1754381597724.woff → iconfont.1755650311186.woff} +0 -0
- /package/lib/{iconfont.1754381597724.woff2 → iconfont.1755650311186.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, 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, 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
|
|
@@ -3510,6 +3394,7 @@ export default defineVxeComponent({
|
|
|
3510
3394
|
}).then(() => {
|
|
3511
3395
|
computeScrollLoad()
|
|
3512
3396
|
}).then(() => {
|
|
3397
|
+
const virtualYOpts = computeVirtualYOpts.value
|
|
3513
3398
|
// 是否启用了虚拟滚动
|
|
3514
3399
|
if (sYLoad) {
|
|
3515
3400
|
scrollYStore.endIndex = scrollYStore.visibleSize
|
|
@@ -3519,6 +3404,9 @@ export default defineVxeComponent({
|
|
|
3519
3404
|
if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
|
|
3520
3405
|
errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"'])
|
|
3521
3406
|
}
|
|
3407
|
+
if (virtualYOpts.mode === 'scroll' && expandOpts.mode === 'fixed') {
|
|
3408
|
+
warnLog('vxe.error.notConflictProp', ['virtual-y-config.mode=scroll', 'expand-config.mode=inside'])
|
|
3409
|
+
}
|
|
3522
3410
|
// if (showOverflow) {
|
|
3523
3411
|
// if (!rowOpts.height) {
|
|
3524
3412
|
// const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
|
|
@@ -5087,6 +4975,28 @@ export default defineVxeComponent({
|
|
|
5087
4975
|
}
|
|
5088
4976
|
return []
|
|
5089
4977
|
},
|
|
4978
|
+
/**
|
|
4979
|
+
* 只对 tree-config 有效,用于树形结构,获取指定行的层级
|
|
4980
|
+
*/
|
|
4981
|
+
getTreeRowLevel (rowOrRowid) {
|
|
4982
|
+
const { treeConfig } = props
|
|
4983
|
+
const { fullAllDataRowIdData } = internalData
|
|
4984
|
+
if (rowOrRowid && treeConfig) {
|
|
4985
|
+
let rowid
|
|
4986
|
+
if (XEUtils.isString(rowOrRowid)) {
|
|
4987
|
+
rowid = rowOrRowid
|
|
4988
|
+
} else {
|
|
4989
|
+
rowid = getRowid($xeTable, rowOrRowid)
|
|
4990
|
+
}
|
|
4991
|
+
if (rowid) {
|
|
4992
|
+
const rest = fullAllDataRowIdData[rowid]
|
|
4993
|
+
if (rest) {
|
|
4994
|
+
return rest.level
|
|
4995
|
+
}
|
|
4996
|
+
}
|
|
4997
|
+
}
|
|
4998
|
+
return -1
|
|
4999
|
+
},
|
|
5090
5000
|
/**
|
|
5091
5001
|
* 只对 tree-config 有效,获取行的父级
|
|
5092
5002
|
*/
|
|
@@ -5804,9 +5714,23 @@ export default defineVxeComponent({
|
|
|
5804
5714
|
/**
|
|
5805
5715
|
* 用于当前行,获取当前行的数据
|
|
5806
5716
|
*/
|
|
5807
|
-
getCurrentRecord () {
|
|
5717
|
+
getCurrentRecord (isFull) {
|
|
5718
|
+
const { currentRow } = reactData
|
|
5719
|
+
const { fullDataRowIdData, afterFullRowMaps } = internalData
|
|
5808
5720
|
const rowOpts = computeRowOpts.value
|
|
5809
|
-
|
|
5721
|
+
if (rowOpts.isCurrent || props.highlightCurrentRow) {
|
|
5722
|
+
const rowid = getRowid($xeTable, currentRow)
|
|
5723
|
+
if (isFull) {
|
|
5724
|
+
if (fullDataRowIdData[rowid]) {
|
|
5725
|
+
return currentRow
|
|
5726
|
+
}
|
|
5727
|
+
} else {
|
|
5728
|
+
if (afterFullRowMaps[rowid]) {
|
|
5729
|
+
return currentRow
|
|
5730
|
+
}
|
|
5731
|
+
}
|
|
5732
|
+
}
|
|
5733
|
+
return null
|
|
5810
5734
|
},
|
|
5811
5735
|
/**
|
|
5812
5736
|
* 用于单选行,获取当已选中的数据
|
|
@@ -11689,7 +11613,7 @@ export default defineVxeComponent({
|
|
|
11689
11613
|
if (value && value.length >= 50000) {
|
|
11690
11614
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)'])
|
|
11691
11615
|
}
|
|
11692
|
-
loadTableData(value,
|
|
11616
|
+
loadTableData(value, true).then(() => {
|
|
11693
11617
|
const { scrollXLoad, scrollYLoad, expandColumn } = reactData
|
|
11694
11618
|
const expandOpts = computeExpandOpts.value
|
|
11695
11619
|
internalData.inited = true
|
|
@@ -11950,6 +11874,12 @@ export default defineVxeComponent({
|
|
|
11950
11874
|
if (props.resizable) {
|
|
11951
11875
|
warnLog('vxe.error.delProp', ['resizable', 'column-config.resizable'])
|
|
11952
11876
|
}
|
|
11877
|
+
if (props.virtualXConfig && props.scrollX) {
|
|
11878
|
+
warnLog('vxe.error.notSupportProp', ['virtual-x-config', 'scroll-x', 'scroll-x=null'])
|
|
11879
|
+
}
|
|
11880
|
+
if (props.virtualYConfig && props.scrollY) {
|
|
11881
|
+
warnLog('vxe.error.notSupportProp', ['virtual-y-config', 'scroll-y', 'scroll-y=null'])
|
|
11882
|
+
}
|
|
11953
11883
|
// if (props.scrollY) {
|
|
11954
11884
|
// warnLog('vxe.error.delProp', ['scroll-y', 'virtual-y-config'])
|
|
11955
11885
|
// }
|
|
@@ -12040,6 +11970,15 @@ export default defineVxeComponent({
|
|
|
12040
11970
|
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField'])
|
|
12041
11971
|
}
|
|
12042
11972
|
|
|
11973
|
+
if (treeConfig) {
|
|
11974
|
+
XEUtils.arrayEach(['rowField', 'parentField', 'childrenField', 'hasChildField', 'mapChildrenField'], key => {
|
|
11975
|
+
const val = treeOpts[key as 'rowField']
|
|
11976
|
+
if (val && val.indexOf('.') > -1) {
|
|
11977
|
+
errLog('vxe.error.errProp', [`${key}=${val}`, `${key}=${val.split('.')[0]}`])
|
|
11978
|
+
}
|
|
11979
|
+
})
|
|
11980
|
+
}
|
|
11981
|
+
|
|
12043
11982
|
if (rowOpts.currentMethod) {
|
|
12044
11983
|
warnLog('vxe.error.delProp', ['row-config.currentMethod', 'current-row-config.beforeSelectMethod'])
|
|
12045
11984
|
}
|
|
@@ -12154,10 +12093,6 @@ export default defineVxeComponent({
|
|
|
12154
12093
|
if ($xeTable.closeMenu) {
|
|
12155
12094
|
$xeTable.closeMenu()
|
|
12156
12095
|
}
|
|
12157
|
-
tablePrivateMethods.preventEvent(null, 'beforeUnmount', { $table: $xeTable })
|
|
12158
|
-
})
|
|
12159
|
-
|
|
12160
|
-
onUnmounted(() => {
|
|
12161
12096
|
globalEvents.off($xeTable, 'paste')
|
|
12162
12097
|
globalEvents.off($xeTable, 'copy')
|
|
12163
12098
|
globalEvents.off($xeTable, 'cut')
|
|
@@ -12167,7 +12102,12 @@ export default defineVxeComponent({
|
|
|
12167
12102
|
globalEvents.off($xeTable, 'keydown')
|
|
12168
12103
|
globalEvents.off($xeTable, 'resize')
|
|
12169
12104
|
globalEvents.off($xeTable, 'contextmenu')
|
|
12105
|
+
tablePrivateMethods.preventEvent(null, 'beforeUnmount', { $table: $xeTable })
|
|
12106
|
+
})
|
|
12107
|
+
|
|
12108
|
+
onUnmounted(() => {
|
|
12170
12109
|
tablePrivateMethods.preventEvent(null, 'unmounted', { $table: $xeTable })
|
|
12110
|
+
XEUtils.assign(internalData, createInternalData())
|
|
12171
12111
|
})
|
|
12172
12112
|
|
|
12173
12113
|
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[] = []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|