vxe-table 3.15.26 → 3.15.28
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/style.css +1 -1
- package/es/table/index.js +11 -3
- package/es/table/module/filter/mixin.js +19 -8
- package/es/table/src/cell.js +3 -1
- package/es/table/src/methods.js +97 -9
- package/es/table/src/table.js +36 -4
- package/es/table/src/util.js +21 -17
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +226 -45
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/index.js +10 -3
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/filter/mixin.js +25 -8
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/src/cell.js +3 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +114 -9
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +40 -5
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +33 -17
- 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/table/index.ts +10 -3
- package/packages/table/module/filter/mixin.ts +26 -12
- package/packages/table/src/cell.ts +3 -1
- package/packages/table/src/methods.ts +96 -10
- package/packages/table/src/table.ts +47 -10
- package/packages/table/src/util.ts +24 -19
- /package/es/{iconfont.1747024909816.ttf → iconfont.1747176212818.ttf} +0 -0
- /package/es/{iconfont.1747024909816.woff → iconfont.1747176212818.woff} +0 -0
- /package/es/{iconfont.1747024909816.woff2 → iconfont.1747176212818.woff2} +0 -0
- /package/lib/{iconfont.1747024909816.ttf → iconfont.1747176212818.ttf} +0 -0
- /package/lib/{iconfont.1747024909816.woff → iconfont.1747176212818.woff} +0 -0
- /package/lib/{iconfont.1747024909816.woff2 → iconfont.1747176212818.woff2} +0 -0
|
@@ -4347,7 +4347,6 @@ const Methods = {
|
|
|
4347
4347
|
},
|
|
4348
4348
|
/**
|
|
4349
4349
|
* 检查是否为临时行数据
|
|
4350
|
-
* @param {Row} row 行对象
|
|
4351
4350
|
*/
|
|
4352
4351
|
isInsertByRow (row: any) {
|
|
4353
4352
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
@@ -4367,19 +4366,16 @@ const Methods = {
|
|
|
4367
4366
|
},
|
|
4368
4367
|
/**
|
|
4369
4368
|
* 删除所有新增的临时数据
|
|
4370
|
-
* @returns
|
|
4371
4369
|
*/
|
|
4372
4370
|
removeInsertRow () {
|
|
4373
4371
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
4374
4372
|
const internalData = $xeTable as unknown as TableInternalData
|
|
4375
4373
|
|
|
4376
|
-
|
|
4377
|
-
return $xeTable.remove(
|
|
4374
|
+
const { insertRowMaps } = internalData
|
|
4375
|
+
return $xeTable.remove(XEUtils.values(insertRowMaps))
|
|
4378
4376
|
},
|
|
4379
4377
|
/**
|
|
4380
4378
|
* 检查行或列数据是否发生改变
|
|
4381
|
-
* @param {Row} rowOrId 行对象
|
|
4382
|
-
* @param {String} field 字段名
|
|
4383
4379
|
*/
|
|
4384
4380
|
isUpdateByRow (rowOrId: any, field?: string | null) {
|
|
4385
4381
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
@@ -6429,7 +6425,12 @@ const Methods = {
|
|
|
6429
6425
|
}
|
|
6430
6426
|
}
|
|
6431
6427
|
if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) {
|
|
6432
|
-
|
|
6428
|
+
const ctEl = tdEl.querySelector<HTMLElement>('.vxe-cell--wrapper')
|
|
6429
|
+
let ovEl = null
|
|
6430
|
+
if (column.treeNode) {
|
|
6431
|
+
ovEl = tdEl.querySelector<HTMLElement>('.vxe-tree-cell')
|
|
6432
|
+
}
|
|
6433
|
+
handleTooltip($xeTable, evnt, tdEl, ovEl || ctEl, tdEl.querySelector<HTMLElement>('.vxe-cell--label') || tdEl.querySelector<HTMLElement>('.vxe-cell--wrapper'), params)
|
|
6433
6434
|
}
|
|
6434
6435
|
},
|
|
6435
6436
|
/**
|
|
@@ -7588,12 +7589,15 @@ const Methods = {
|
|
|
7588
7589
|
|
|
7589
7590
|
const { mouseConfig } = props
|
|
7590
7591
|
const mouseOpts = $xeTable.computeMouseOpts
|
|
7591
|
-
const { field, sortable } = column
|
|
7592
|
+
const { field, sortable, order } = column
|
|
7592
7593
|
if (sortable) {
|
|
7593
|
-
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order
|
|
7594
|
+
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList: $xeTable.getSortColumns(), sortTime: column.sortTime }
|
|
7594
7595
|
if (mouseConfig && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
7595
7596
|
$xeTable.handleSortEvent(evnt, params)
|
|
7596
7597
|
}
|
|
7598
|
+
if (!order) {
|
|
7599
|
+
$xeTable.dispatchEvent('clear-sort', params, evnt)
|
|
7600
|
+
}
|
|
7597
7601
|
$xeTable.dispatchEvent('sort-change', params, evnt)
|
|
7598
7602
|
}
|
|
7599
7603
|
},
|
|
@@ -8589,6 +8593,43 @@ const Methods = {
|
|
|
8589
8593
|
return updateStyle($xeTable)
|
|
8590
8594
|
})
|
|
8591
8595
|
},
|
|
8596
|
+
clearSortByEvent (evnt: Event, fieldOrColumn?: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | null) {
|
|
8597
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8598
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
8599
|
+
|
|
8600
|
+
const { tableFullColumn } = internalData
|
|
8601
|
+
const sortOpts = $xeTable.computeSortOpts
|
|
8602
|
+
const sortCols: VxeTableDefines.ColumnInfo[] = []
|
|
8603
|
+
let column: VxeTableDefines.ColumnInfo<any> | null = null
|
|
8604
|
+
if (evnt) {
|
|
8605
|
+
if (fieldOrColumn) {
|
|
8606
|
+
column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
8607
|
+
if (column) {
|
|
8608
|
+
column.order = null
|
|
8609
|
+
}
|
|
8610
|
+
} else {
|
|
8611
|
+
tableFullColumn.forEach((column) => {
|
|
8612
|
+
if (column.order) {
|
|
8613
|
+
column.order = null
|
|
8614
|
+
sortCols.push(column)
|
|
8615
|
+
}
|
|
8616
|
+
})
|
|
8617
|
+
}
|
|
8618
|
+
if (!sortOpts.remote) {
|
|
8619
|
+
$xeTable.handleTableData(true)
|
|
8620
|
+
}
|
|
8621
|
+
if (sortCols.length) {
|
|
8622
|
+
const params = { $table: $xeTable, $event: evnt, cols: sortCols, sortList: [] }
|
|
8623
|
+
$xeTable.dispatchEvent('clear-all-sort', params, evnt)
|
|
8624
|
+
} else if (column) {
|
|
8625
|
+
$xeTable.handleColumnSortEvent(evnt, column)
|
|
8626
|
+
}
|
|
8627
|
+
}
|
|
8628
|
+
return $xeTable.$nextTick().then(() => {
|
|
8629
|
+
updateRowOffsetTop($xeTable)
|
|
8630
|
+
return updateStyle($xeTable)
|
|
8631
|
+
})
|
|
8632
|
+
},
|
|
8592
8633
|
// 在 v3 中废弃
|
|
8593
8634
|
getSortColumn () {
|
|
8594
8635
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
@@ -8657,6 +8698,51 @@ const Methods = {
|
|
|
8657
8698
|
isFilter (fieldOrColumn: any) {
|
|
8658
8699
|
return this.isActiveFilterByColumn(fieldOrColumn)
|
|
8659
8700
|
},
|
|
8701
|
+
clearFilterByEvent (evnt: Event, fieldOrColumn?: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | null) {
|
|
8702
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8703
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
8704
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
8705
|
+
|
|
8706
|
+
const { filterStore } = reactData
|
|
8707
|
+
const { tableFullColumn } = internalData
|
|
8708
|
+
const filterOpts = $xeTable.computeFilterOpts
|
|
8709
|
+
const filterCols: VxeTableDefines.ColumnInfo[] = []
|
|
8710
|
+
let column: VxeTableDefines.ColumnInfo<any> | null = null
|
|
8711
|
+
if (fieldOrColumn) {
|
|
8712
|
+
column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
8713
|
+
if (column) {
|
|
8714
|
+
$xeTable.handleClearFilter(column)
|
|
8715
|
+
}
|
|
8716
|
+
} else {
|
|
8717
|
+
tableFullColumn.forEach(column => {
|
|
8718
|
+
if (column.filters) {
|
|
8719
|
+
filterCols.push(column)
|
|
8720
|
+
$xeTable.handleClearFilter(column)
|
|
8721
|
+
}
|
|
8722
|
+
})
|
|
8723
|
+
}
|
|
8724
|
+
if (!fieldOrColumn || column !== filterStore.column) {
|
|
8725
|
+
Object.assign(filterStore, {
|
|
8726
|
+
isAllSelected: false,
|
|
8727
|
+
isIndeterminate: false,
|
|
8728
|
+
style: null,
|
|
8729
|
+
options: [],
|
|
8730
|
+
column: null,
|
|
8731
|
+
multiple: false,
|
|
8732
|
+
visible: false
|
|
8733
|
+
})
|
|
8734
|
+
}
|
|
8735
|
+
if (!filterOpts.remote) {
|
|
8736
|
+
$xeTable.updateData()
|
|
8737
|
+
}
|
|
8738
|
+
if (filterCols.length) {
|
|
8739
|
+
const params = { $table: $xeTable, $event: evnt, cols: filterCols, filterList: [] }
|
|
8740
|
+
$xeTable.dispatchEvent('clear-all-filter', params, evnt)
|
|
8741
|
+
} else if (column) {
|
|
8742
|
+
$xeTable.dispatchEvent('clear-filter', { filterList: () => $xeTable.getCheckedFilters() }, evnt)
|
|
8743
|
+
}
|
|
8744
|
+
return $xeTable.$nextTick()
|
|
8745
|
+
},
|
|
8660
8746
|
/**
|
|
8661
8747
|
* 判断展开行是否懒加载完成
|
|
8662
8748
|
* @param {Row} row 行对象
|
|
@@ -8669,7 +8755,7 @@ const Methods = {
|
|
|
8669
8755
|
return rowRest && !!rowRest.expandLoaded
|
|
8670
8756
|
},
|
|
8671
8757
|
clearRowExpandLoaded (row: any) {
|
|
8672
|
-
const $xeTable = this as VxeTableConstructor
|
|
8758
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8673
8759
|
const reactData = $xeTable as unknown as TableReactData
|
|
8674
8760
|
const internalData = $xeTable as unknown as TableInternalData
|
|
8675
8761
|
|
|
@@ -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 } from './util'
|
|
5
|
+
import { createHandleGetRowId, getCellHeight, hasDeepKey } from './util'
|
|
6
6
|
import { VxeUI } from '../../ui'
|
|
7
7
|
import methods from './methods'
|
|
8
8
|
import TableBodyComponent from './body'
|
|
@@ -30,6 +30,14 @@ import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData, Ta
|
|
|
30
30
|
|
|
31
31
|
const { getConfig, getIcon, getI18n, renderer, globalResize, globalEvents, globalMixins, renderEmptyElement } = VxeUI
|
|
32
32
|
|
|
33
|
+
function handleKeyField ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
34
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
35
|
+
|
|
36
|
+
const keyField = $xeTable.computeRowField
|
|
37
|
+
internalData.currKeyField = keyField
|
|
38
|
+
internalData.isCurrDeepKey = hasDeepKey(keyField)
|
|
39
|
+
}
|
|
40
|
+
|
|
33
41
|
/**
|
|
34
42
|
* 渲染浮固定列
|
|
35
43
|
* 分别渲染左边固定列和右边固定列
|
|
@@ -730,6 +738,13 @@ export default {
|
|
|
730
738
|
}
|
|
731
739
|
return ''
|
|
732
740
|
},
|
|
741
|
+
computeRowField () {
|
|
742
|
+
const $xeTable = this
|
|
743
|
+
const props = $xeTable
|
|
744
|
+
|
|
745
|
+
const rowOpts = $xeTable.computeRowOpts
|
|
746
|
+
return `${props.rowId || rowOpts.keyField || '_X_ROW_KEY'}`
|
|
747
|
+
},
|
|
733
748
|
validOpts () {
|
|
734
749
|
return this.computeValidOpts
|
|
735
750
|
},
|
|
@@ -1202,12 +1217,12 @@ export default {
|
|
|
1202
1217
|
return fixedSize
|
|
1203
1218
|
},
|
|
1204
1219
|
fixedColumnSize () {
|
|
1205
|
-
const $xeTable = this
|
|
1220
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1206
1221
|
|
|
1207
1222
|
return $xeTable.computeFixedColumnSize
|
|
1208
1223
|
},
|
|
1209
1224
|
computeIsMaxFixedColumn () {
|
|
1210
|
-
const $xeTable = this
|
|
1225
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1211
1226
|
|
|
1212
1227
|
const fixedColumnSize = $xeTable.computeFixedColumnSize
|
|
1213
1228
|
const columnOpts = $xeTable.columnOpts
|
|
@@ -1252,8 +1267,8 @@ export default {
|
|
|
1252
1267
|
return false
|
|
1253
1268
|
},
|
|
1254
1269
|
computeVirtualScrollBars () {
|
|
1255
|
-
const $xeTable = this
|
|
1256
|
-
const reactData = $xeTable
|
|
1270
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1271
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
1257
1272
|
|
|
1258
1273
|
const { overflowX, scrollXLoad, overflowY, scrollYLoad } = reactData
|
|
1259
1274
|
return {
|
|
@@ -1333,7 +1348,7 @@ export default {
|
|
|
1333
1348
|
this.reScrollFlag++
|
|
1334
1349
|
},
|
|
1335
1350
|
reScrollFlag () {
|
|
1336
|
-
const $xeTable = this
|
|
1351
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1337
1352
|
|
|
1338
1353
|
$xeTable.$nextTick(() => {
|
|
1339
1354
|
$xeTable.recalculate(true).then(() => $xeTable.refreshScroll())
|
|
@@ -1365,7 +1380,7 @@ export default {
|
|
|
1365
1380
|
this.footFlag++
|
|
1366
1381
|
},
|
|
1367
1382
|
footFlag () {
|
|
1368
|
-
const $xeTable = this
|
|
1383
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1369
1384
|
|
|
1370
1385
|
$xeTable.updateFooter()
|
|
1371
1386
|
},
|
|
@@ -1395,6 +1410,21 @@ export default {
|
|
|
1395
1410
|
const $xeTable = this
|
|
1396
1411
|
|
|
1397
1412
|
$xeTable.handleUpdateRowGroup(val)
|
|
1413
|
+
},
|
|
1414
|
+
computeRowField () {
|
|
1415
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1416
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
1417
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
1418
|
+
|
|
1419
|
+
// 行主键被改变,重载表格
|
|
1420
|
+
const { inited, tableFullData } = internalData
|
|
1421
|
+
if (inited) {
|
|
1422
|
+
handleKeyField($xeTable)
|
|
1423
|
+
reactData.tableData = []
|
|
1424
|
+
$xeTable.$nextTick(() => {
|
|
1425
|
+
$xeTable.reloadData(tableFullData)
|
|
1426
|
+
})
|
|
1427
|
+
}
|
|
1398
1428
|
}
|
|
1399
1429
|
} as any,
|
|
1400
1430
|
created () {
|
|
@@ -1404,6 +1434,8 @@ export default {
|
|
|
1404
1434
|
|
|
1405
1435
|
Object.assign($xeTable, {
|
|
1406
1436
|
tZindex: 0,
|
|
1437
|
+
currKeyField: '',
|
|
1438
|
+
isCurrDeepKey: false,
|
|
1407
1439
|
elemStore: {},
|
|
1408
1440
|
// 存放横向 X 虚拟滚动相关的信息
|
|
1409
1441
|
scrollXStore: {
|
|
@@ -1514,6 +1546,8 @@ export default {
|
|
|
1514
1546
|
swYTotal: 0
|
|
1515
1547
|
})
|
|
1516
1548
|
|
|
1549
|
+
handleKeyField($xeTable)
|
|
1550
|
+
|
|
1517
1551
|
const { data, exportConfig, importConfig, treeConfig, showOverflow, highlightCurrentRow, highlightCurrentColumn } = props
|
|
1518
1552
|
const { scrollXStore, scrollYStore } = internalData
|
|
1519
1553
|
const columnOpts = $xeTable.computeColumnOpts
|
|
@@ -1760,6 +1794,7 @@ export default {
|
|
|
1760
1794
|
const columnOpts = $xeTable.computeColumnOpts
|
|
1761
1795
|
const rowOpts = $xeTable.computeRowOpts
|
|
1762
1796
|
const customOpts = $xeTable.computeCustomOpts
|
|
1797
|
+
const virtualYOpts = $xeTable.computeVirtualYOpts
|
|
1763
1798
|
|
|
1764
1799
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
1765
1800
|
initTpImg()
|
|
@@ -1805,9 +1840,11 @@ export default {
|
|
|
1805
1840
|
this.$resize = resizeObserver
|
|
1806
1841
|
}
|
|
1807
1842
|
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
tableViewportEl
|
|
1843
|
+
if (virtualYOpts.mode !== 'scroll') {
|
|
1844
|
+
const tableViewportEl = $xeTable.$refs.refTableViewportElem as HTMLDivElement
|
|
1845
|
+
if (tableViewportEl) {
|
|
1846
|
+
tableViewportEl.addEventListener('wheel', $xeTable.triggerBodyWheelEvent, { passive: false })
|
|
1847
|
+
}
|
|
1811
1848
|
}
|
|
1812
1849
|
|
|
1813
1850
|
this.preventEvent(null, 'mounted')
|
|
@@ -97,39 +97,44 @@ export function getRowUniqueId () {
|
|
|
97
97
|
return XEUtils.uniqueId('row_')
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
export function hasDeepKey (rowKey: string) {
|
|
101
|
+
return rowKey.indexOf('.') > -1
|
|
102
|
+
}
|
|
103
|
+
|
|
100
104
|
// 行主键 key
|
|
101
105
|
export function getRowkey ($xeTable: VxeTableConstructor) {
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
return
|
|
106
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
107
|
+
const { currKeyField } = internalData
|
|
108
|
+
return currKeyField
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
// 行主键 value
|
|
108
112
|
export function getRowid ($xeTable: VxeTableConstructor, row: any) {
|
|
109
|
-
const
|
|
110
|
-
|
|
113
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
114
|
+
const { isCurrDeepKey, currKeyField } = internalData
|
|
115
|
+
return row ? encodeRowid((isCurrDeepKey ? getDeepRowIdByKey : getFastRowIdByKey)(row, currKeyField)) : ''
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
export function createHandleUpdateRowId ($xeTable: VxeTableConstructor) {
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
const updateRId =
|
|
119
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
120
|
+
const { isCurrDeepKey, currKeyField } = internalData
|
|
121
|
+
const updateRId = isCurrDeepKey ? updateDeepRowKey : updateFastRowKey
|
|
117
122
|
return {
|
|
118
|
-
rowKey,
|
|
123
|
+
rowKey: currKeyField,
|
|
119
124
|
handleUpdateRowId (row: any) {
|
|
120
|
-
return row ? updateRId(row,
|
|
125
|
+
return row ? updateRId(row, currKeyField) : ''
|
|
121
126
|
}
|
|
122
127
|
}
|
|
123
128
|
}
|
|
124
129
|
|
|
125
130
|
export function createHandleGetRowId ($xeTable: VxeTableConstructor) {
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
const getRId =
|
|
131
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
132
|
+
const { isCurrDeepKey, currKeyField } = internalData
|
|
133
|
+
const getRId = isCurrDeepKey ? getDeepRowIdByKey : getFastRowIdByKey
|
|
129
134
|
return {
|
|
130
|
-
rowKey,
|
|
135
|
+
rowKey: currKeyField,
|
|
131
136
|
handleGetRowId (row: any) {
|
|
132
|
-
return row ? getRId(row,
|
|
137
|
+
return row ? encodeRowid(getRId(row, currKeyField)) : ''
|
|
133
138
|
}
|
|
134
139
|
}
|
|
135
140
|
}
|
|
@@ -144,7 +149,7 @@ function getDeepRowIdByKey (row: any, rowKey: string) {
|
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
export function updateDeepRowKey (row: any, rowKey: string) {
|
|
147
|
-
let rowid = getDeepRowIdByKey(row, rowKey)
|
|
152
|
+
let rowid = encodeRowid(getDeepRowIdByKey(row, rowKey))
|
|
148
153
|
if (eqEmptyValue(rowid)) {
|
|
149
154
|
rowid = getRowUniqueId()
|
|
150
155
|
XEUtils.set(row, rowKey, rowid)
|
|
@@ -157,7 +162,7 @@ function getFastRowIdByKey (row: any, rowKey: string) {
|
|
|
157
162
|
}
|
|
158
163
|
|
|
159
164
|
export function updateFastRowKey (row: any, rowKey: string) {
|
|
160
|
-
let rowid = getFastRowIdByKey(row, rowKey)
|
|
165
|
+
let rowid = encodeRowid(getFastRowIdByKey(row, rowKey))
|
|
161
166
|
if (eqEmptyValue(rowid)) {
|
|
162
167
|
rowid = getRowUniqueId()
|
|
163
168
|
row[rowKey] = rowid
|
|
@@ -165,7 +170,7 @@ export function updateFastRowKey (row: any, rowKey: string) {
|
|
|
165
170
|
return rowid
|
|
166
171
|
}
|
|
167
172
|
|
|
168
|
-
function getPaddingLeftRightSize (elem:
|
|
173
|
+
function getPaddingLeftRightSize (elem: HTMLElement | null) {
|
|
169
174
|
if (elem) {
|
|
170
175
|
const computedStyle = getComputedStyle(elem)
|
|
171
176
|
const paddingLeft = XEUtils.toNumber(computedStyle.paddingLeft)
|
|
@@ -175,7 +180,7 @@ function getPaddingLeftRightSize (elem: any) {
|
|
|
175
180
|
return 0
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
function getElementMarginAndWidth (elem:
|
|
183
|
+
function getElementMarginAndWidth (elem: HTMLElement | null) {
|
|
179
184
|
if (elem) {
|
|
180
185
|
const computedStyle = getComputedStyle(elem)
|
|
181
186
|
const marginLeft = XEUtils.toNumber(computedStyle.marginLeft)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|