vxe-table 3.20.0-beta.8 → 3.20.0
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/grid/src/grid.js +23 -18
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +6 -0
- package/es/locale/lang/de-DE.js +6 -0
- package/es/locale/lang/en-US.js +6 -0
- package/es/locale/lang/es-ES.js +6 -0
- package/es/locale/lang/fr-FR.js +6 -0
- package/es/locale/lang/hu-HU.js +6 -0
- package/es/locale/lang/hy-AM.js +6 -0
- package/es/locale/lang/id-ID.js +6 -0
- package/es/locale/lang/it-IT.js +6 -0
- package/es/locale/lang/ja-JP.js +6 -0
- package/es/locale/lang/ko-KR.js +6 -0
- package/es/locale/lang/ms-MY.js +6 -0
- package/es/locale/lang/nb-NO.js +6 -0
- package/es/locale/lang/pt-BR.js +6 -0
- package/es/locale/lang/ru-RU.js +6 -0
- package/es/locale/lang/th-TH.js +6 -0
- package/es/locale/lang/ug-CN.js +6 -0
- package/es/locale/lang/uk-UA.js +6 -0
- package/es/locale/lang/uz-UZ.js +6 -0
- package/es/locale/lang/vi-VN.js +6 -0
- package/es/locale/lang/zh-CHT.js +6 -0
- package/es/locale/lang/zh-CN.js +6 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/mixin.js +15 -1
- package/es/table/module/keyboard/mixin.js +18 -8
- package/es/table/module/validator/mixin.js +7 -6
- package/es/table/render/index.js +11 -0
- package/es/table/src/body.js +12 -5
- package/es/table/src/columnInfo.js +2 -0
- package/es/table/src/methods.js +199 -73
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +68 -7
- package/es/table/src/util.js +38 -20
- package/es/table/style.css +11 -17
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +10 -5
- package/es/ui/index.js +7 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +11 -17
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +23 -18
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +275 -100
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +6 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +6 -0
- package/lib/locale/lang/de-DE.js +6 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +6 -0
- package/lib/locale/lang/en-US.js +6 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +6 -0
- package/lib/locale/lang/es-ES.js +6 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +6 -0
- package/lib/locale/lang/fr-FR.js +6 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +6 -0
- package/lib/locale/lang/hu-HU.js +6 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +6 -0
- package/lib/locale/lang/hy-AM.js +6 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +6 -0
- package/lib/locale/lang/id-ID.js +6 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +6 -0
- package/lib/locale/lang/it-IT.js +6 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +6 -0
- package/lib/locale/lang/ja-JP.js +6 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +6 -0
- package/lib/locale/lang/ko-KR.js +6 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +6 -0
- package/lib/locale/lang/ms-MY.js +6 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +6 -0
- package/lib/locale/lang/nb-NO.js +6 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +6 -0
- package/lib/locale/lang/pt-BR.js +6 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +6 -0
- package/lib/locale/lang/ru-RU.js +6 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +6 -0
- package/lib/locale/lang/th-TH.js +6 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +6 -0
- package/lib/locale/lang/ug-CN.js +6 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +6 -0
- package/lib/locale/lang/uk-UA.js +6 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +6 -0
- package/lib/locale/lang/uz-UZ.js +6 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +6 -0
- package/lib/locale/lang/vi-VN.js +6 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +6 -0
- package/lib/locale/lang/zh-CHT.js +6 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +6 -0
- package/lib/locale/lang/zh-CN.js +6 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +6 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/mixin.js +18 -6
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +18 -4
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +8 -6
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +15 -0
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +13 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +2 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +806 -14157
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +4 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +78 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +41 -21
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +11 -17
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +10 -5
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +7 -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/lib/vxe-table/style/style.css +11 -17
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +23 -18
- package/packages/locale/lang/ar-EG.ts +6 -0
- package/packages/locale/lang/de-DE.ts +6 -0
- package/packages/locale/lang/en-US.ts +6 -0
- package/packages/locale/lang/es-ES.ts +6 -0
- package/packages/locale/lang/fr-FR.ts +6 -0
- package/packages/locale/lang/hu-HU.ts +6 -0
- package/packages/locale/lang/hy-AM.ts +6 -0
- package/packages/locale/lang/id-ID.ts +6 -0
- package/packages/locale/lang/it-IT.ts +6 -0
- package/packages/locale/lang/ja-JP.ts +6 -0
- package/packages/locale/lang/ko-KR.ts +6 -0
- package/packages/locale/lang/ms-MY.ts +6 -0
- package/packages/locale/lang/nb-NO.ts +6 -0
- package/packages/locale/lang/pt-BR.ts +6 -0
- package/packages/locale/lang/ru-RU.ts +6 -0
- package/packages/locale/lang/th-TH.ts +6 -0
- package/packages/locale/lang/ug-CN.ts +6 -0
- package/packages/locale/lang/uk-UA.ts +6 -0
- package/packages/locale/lang/uz-UZ.ts +6 -0
- package/packages/locale/lang/vi-VN.ts +6 -0
- package/packages/locale/lang/zh-CHT.ts +6 -0
- package/packages/locale/lang/zh-CN.ts +6 -0
- package/packages/table/module/export/mixin.ts +13 -1
- package/packages/table/module/keyboard/mixin.ts +21 -12
- package/packages/table/module/validator/mixin.ts +7 -6
- package/packages/table/render/index.ts +12 -0
- package/packages/table/src/body.ts +12 -5
- package/packages/table/src/columnInfo.ts +2 -0
- package/packages/table/src/methods.ts +192 -72
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +75 -8
- package/packages/table/src/util.ts +43 -19
- package/packages/toolbar/src/toolbar.ts +11 -5
- package/packages/ui/index.ts +6 -0
- package/styles/components/table-module/filter.scss +1 -1
- package/styles/components/table-module/menu.scss +4 -9
- package/styles/components/table.scss +8 -2
- package/styles/theme/base.scss +0 -1
- /package/es/{iconfont.1768463274097.ttf → iconfont.1773027250443.ttf} +0 -0
- /package/es/{iconfont.1768463274097.woff → iconfont.1773027250443.woff} +0 -0
- /package/es/{iconfont.1768463274097.woff2 → iconfont.1773027250443.woff2} +0 -0
- /package/lib/{iconfont.1768463274097.ttf → iconfont.1773027250443.ttf} +0 -0
- /package/lib/{iconfont.1768463274097.woff → iconfont.1773027250443.woff} +0 -0
- /package/lib/{iconfont.1768463274097.woff2 → iconfont.1773027250443.woff2} +0 -0
|
@@ -3,7 +3,7 @@ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, scrollTopTo,
|
|
|
3
3
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils'
|
|
4
4
|
import { VxeUI } from '../../ui'
|
|
5
5
|
import Cell from './cell'
|
|
6
|
-
import { getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn } from './util'
|
|
6
|
+
import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn } from './util'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime'
|
|
9
9
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
@@ -230,6 +230,7 @@ function handleCustomRestore ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
230
230
|
const newCollectCols = XEUtils.toArrayTree(XEUtils.orderBy(allCols, 'renderSortNumber'), { key: 'id', parentKey: 'parentId', children: 'children' })
|
|
231
231
|
internalData.collectColumn = newCollectCols
|
|
232
232
|
internalData.tableFullColumn = getColumnList(newCollectCols)
|
|
233
|
+
reactData.updateColFlag++
|
|
233
234
|
}
|
|
234
235
|
reactData.isCustomStatus = true
|
|
235
236
|
} else {
|
|
@@ -386,14 +387,19 @@ function cacheColumnMap ($xeTable: VxeTableConstructor & VxeTablePrivateMethods)
|
|
|
386
387
|
tableFullColumn.forEach(handleFunc)
|
|
387
388
|
}
|
|
388
389
|
|
|
389
|
-
if (expandColumn
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
390
|
+
if (expandColumn) {
|
|
391
|
+
if (expandOpts.mode !== 'fixed' && virtualYOpts.enabled) {
|
|
392
|
+
warnLog('vxe.error.notConflictProp', ['column.type="expand', 'virtual-y-config.enabled=false'])
|
|
393
|
+
}
|
|
394
|
+
if ((expandOpts.mode !== 'fixed') && mouseOpts.area) {
|
|
395
|
+
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand'])
|
|
396
|
+
}
|
|
397
|
+
if (expandOpts.mode !== 'inside' && (treeConfig && !treeOpts.transform)) {
|
|
398
|
+
errLog('vxe.error.notConflictProp', ['tree-config.transform=false', 'expand-config.mode=fixed'])
|
|
399
|
+
}
|
|
400
|
+
if (props.spanMethod) {
|
|
401
|
+
warnLog('vxe.error.notSupportProp', ['column.type=expand', 'span-method', 'span-method=null'])
|
|
402
|
+
}
|
|
397
403
|
}
|
|
398
404
|
|
|
399
405
|
if (htmlColumn) {
|
|
@@ -2917,13 +2923,13 @@ function handleTooltip ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
|
|
|
2917
2923
|
return $xeTable.$nextTick()
|
|
2918
2924
|
}
|
|
2919
2925
|
|
|
2920
|
-
function handleScrollToRowColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, fieldOrColumn: string | VxeTableDefines.ColumnInfo | null, row?:
|
|
2926
|
+
function handleScrollToRowColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, fieldOrColumn: string | VxeTableDefines.ColumnInfo | null, row: any, options?: VxeTableDefines.ScrollToRowConfig) {
|
|
2921
2927
|
const internalData = $xeTable as unknown as TableInternalData
|
|
2922
2928
|
|
|
2923
2929
|
const { fullColumnIdData } = internalData
|
|
2924
2930
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
2925
2931
|
if (column && fullColumnIdData[column.id]) {
|
|
2926
|
-
return colToVisible($xeTable, column, row)
|
|
2932
|
+
return colToVisible($xeTable, options ? options.colAlign !== false : true, column, row)
|
|
2927
2933
|
}
|
|
2928
2934
|
return $xeTable.$nextTick()
|
|
2929
2935
|
}
|
|
@@ -3302,6 +3308,7 @@ function handleGroupData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods
|
|
|
3302
3308
|
if (rowGroups) {
|
|
3303
3309
|
const aggregateOpts = $xeTable.computeAggregateOpts
|
|
3304
3310
|
const { rowField, parentField, childrenField, mapChildrenField } = aggregateOpts
|
|
3311
|
+
const rowOpts = $xeTable.computeRowOpts
|
|
3305
3312
|
const checkboxOpts = $xeTable.computeCheckboxOpts
|
|
3306
3313
|
const { checkField } = checkboxOpts
|
|
3307
3314
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField
|
|
@@ -3337,10 +3344,10 @@ function handleGroupData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods
|
|
|
3337
3344
|
childCount: 0,
|
|
3338
3345
|
[rowField]: getRowUniqueId(),
|
|
3339
3346
|
[parentField]: null,
|
|
3340
|
-
[rowkey]: getRowUniqueId(),
|
|
3341
3347
|
[childrenField]: childTreeData,
|
|
3342
3348
|
[mapChildrenField]: childTreeData
|
|
3343
3349
|
}
|
|
3350
|
+
aggRow[rowkey] = createRowId(rowOpts, aggRow, rowkey)
|
|
3344
3351
|
if (checkField) {
|
|
3345
3352
|
aggRow[checkField] = false
|
|
3346
3353
|
}
|
|
@@ -3633,12 +3640,14 @@ function handleTableColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMetho
|
|
|
3633
3640
|
}
|
|
3634
3641
|
|
|
3635
3642
|
function handleUpdateColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
3643
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
3636
3644
|
const internalData = $xeTable as unknown as TableInternalData
|
|
3637
3645
|
|
|
3638
3646
|
const columnList = XEUtils.orderBy(internalData.collectColumn, 'renderSortNumber')
|
|
3639
3647
|
internalData.collectColumn = columnList
|
|
3640
|
-
const
|
|
3641
|
-
internalData.tableFullColumn =
|
|
3648
|
+
const tFullColumn = getColumnList(columnList)
|
|
3649
|
+
internalData.tableFullColumn = tFullColumn
|
|
3650
|
+
reactData.updateColFlag++
|
|
3642
3651
|
cacheColumnMap($xeTable)
|
|
3643
3652
|
}
|
|
3644
3653
|
|
|
@@ -3830,8 +3839,9 @@ function handleInitColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
3830
3839
|
|
|
3831
3840
|
const expandOpts = $xeTable.computeExpandOpts
|
|
3832
3841
|
internalData.collectColumn = collectColumn
|
|
3833
|
-
const
|
|
3834
|
-
internalData.tableFullColumn =
|
|
3842
|
+
const tFullColumn = getColumnList(collectColumn)
|
|
3843
|
+
internalData.tableFullColumn = tFullColumn
|
|
3844
|
+
reactData.updateColFlag++
|
|
3835
3845
|
reactData.isColLoading = true
|
|
3836
3846
|
initColumnHierarchy($xeTable)
|
|
3837
3847
|
return Promise.resolve(
|
|
@@ -4242,7 +4252,7 @@ function updateRowExpandStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
4242
4252
|
const rowid = expandEl.getAttribute('rowid') || ''
|
|
4243
4253
|
const rowRest = fullAllDataRowIdData[rowid]
|
|
4244
4254
|
if (rowRest) {
|
|
4245
|
-
const expandHeight = expandEl.offsetHeight
|
|
4255
|
+
const expandHeight = expandEl.offsetHeight
|
|
4246
4256
|
const trEl = bodyScrollElem.querySelector(`.vxe-body--row[rowid="${rowid}"]`) as HTMLTableCellElement
|
|
4247
4257
|
let offsetTop = 0
|
|
4248
4258
|
if (scrollYLoad) {
|
|
@@ -5028,6 +5038,7 @@ const tableMethods: any = {
|
|
|
5028
5038
|
const expandOpts = $xeTable.computeExpandOpts
|
|
5029
5039
|
const treeOpts = $xeTable.computeTreeOpts
|
|
5030
5040
|
const radioOpts = $xeTable.computeRadioOpts
|
|
5041
|
+
const rowOpts = $xeTable.computeRowOpts
|
|
5031
5042
|
const checkboxOpts = $xeTable.computeCheckboxOpts
|
|
5032
5043
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
5033
5044
|
const rowkey = getRowkey($xeTable)
|
|
@@ -5061,7 +5072,7 @@ const tableMethods: any = {
|
|
|
5061
5072
|
}
|
|
5062
5073
|
// 必须有行数据的唯一主键,可以自行设置;也可以默认生成一个随机数
|
|
5063
5074
|
if (eqEmptyValue(XEUtils.get(record, rowkey))) {
|
|
5064
|
-
XEUtils.set(record, rowkey,
|
|
5075
|
+
XEUtils.set(record, rowkey, createRowId(rowOpts, record, rowkey))
|
|
5065
5076
|
}
|
|
5066
5077
|
return record
|
|
5067
5078
|
})
|
|
@@ -5407,9 +5418,10 @@ const tableMethods: any = {
|
|
|
5407
5418
|
const props = $xeTable
|
|
5408
5419
|
const internalData = $xeTable as unknown as TableInternalData
|
|
5409
5420
|
|
|
5410
|
-
const { keepSource } = props
|
|
5411
|
-
const {
|
|
5412
|
-
|
|
5421
|
+
const { keepSource, editConfig } = props
|
|
5422
|
+
const { fullDataRowIdData, sourceDataRowIdData } = internalData
|
|
5423
|
+
const keepFields = $xeTable.computeKeepFields
|
|
5424
|
+
if (keepSource && editConfig) {
|
|
5413
5425
|
const rowid = XEUtils.isString(rowOrId) || XEUtils.isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId)
|
|
5414
5426
|
const rowRest = fullDataRowIdData[rowid]
|
|
5415
5427
|
// 新增的数据不需要检测
|
|
@@ -5422,9 +5434,8 @@ const tableMethods: any = {
|
|
|
5422
5434
|
if (arguments.length > 1) {
|
|
5423
5435
|
return !eqCellValue(oRow, row, field as string)
|
|
5424
5436
|
}
|
|
5425
|
-
for (let
|
|
5426
|
-
|
|
5427
|
-
if (property && !eqCellValue(oRow, row, property)) {
|
|
5437
|
+
for (let i = 0; i < keepFields.length; i++) {
|
|
5438
|
+
if (!eqCellValue(oRow, row, keepFields[i])) {
|
|
5428
5439
|
return true
|
|
5429
5440
|
}
|
|
5430
5441
|
}
|
|
@@ -7020,13 +7031,15 @@ const tableMethods: any = {
|
|
|
7020
7031
|
if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
|
|
7021
7032
|
$xeTable.closeMenu()
|
|
7022
7033
|
}
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7034
|
+
if (!(actived.row && getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag)) {
|
|
7035
|
+
const isActivated = getEventTargetNode(evnt, ($xeGGWrapper || $xeTable).$el).flag
|
|
7036
|
+
// 如果存在校验,点击了表格之外则清除
|
|
7037
|
+
if (!isActivated && editRules && validOpts.autoClear) {
|
|
7038
|
+
reactData.validErrorMaps = {}
|
|
7039
|
+
}
|
|
7040
|
+
// 最后激活的表格
|
|
7041
|
+
internalData.isActivated = isActivated
|
|
7027
7042
|
}
|
|
7028
|
-
// 最后激活的表格
|
|
7029
|
-
internalData.isActivated = isActivated
|
|
7030
7043
|
},
|
|
7031
7044
|
/**
|
|
7032
7045
|
* 窗口失焦事件处理
|
|
@@ -7104,7 +7117,7 @@ const tableMethods: any = {
|
|
|
7104
7117
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
7105
7118
|
const { mouseConfig, keyboardConfig, treeConfig, editConfig, highlightCurrentRow, highlightCurrentColumn } = props
|
|
7106
7119
|
const { ctxMenuStore, editStore, currentRow } = reactData
|
|
7107
|
-
const { afterFullData } = internalData
|
|
7120
|
+
const { afterFullData, visibleColumn } = internalData
|
|
7108
7121
|
const isContentMenu = $xeTable.computeIsContentMenu
|
|
7109
7122
|
const bodyMenu = $xeTable.computeBodyMenu
|
|
7110
7123
|
const keyboardOpts = $xeTable.computeKeyboardOpts
|
|
@@ -7114,6 +7127,7 @@ const tableMethods: any = {
|
|
|
7114
7127
|
const menuList = $xeTable.computeMenuList
|
|
7115
7128
|
const rowOpts = $xeTable.computeRowOpts
|
|
7116
7129
|
const columnOpts = $xeTable.computeColumnOpts
|
|
7130
|
+
const { isLastEnterAppendRow, beforeEnterMethod, enterMethod, isLastTabAppendRow, beforeTabMethod, tabMethod } = keyboardOpts
|
|
7117
7131
|
const { selected, actived } = editStore
|
|
7118
7132
|
const { keyCode } = evnt
|
|
7119
7133
|
const hasBackspaceKey = keyCode === 8
|
|
@@ -7188,7 +7202,6 @@ const tableMethods: any = {
|
|
|
7188
7202
|
internalData._keyCtx = false
|
|
7189
7203
|
}, 1000)
|
|
7190
7204
|
} else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
7191
|
-
const { isLastEnterAppendRow, beforeEnterMethod, enterMethod } = keyboardOpts
|
|
7192
7205
|
// 退出选中
|
|
7193
7206
|
if (isControlKey) {
|
|
7194
7207
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -7203,6 +7216,8 @@ const tableMethods: any = {
|
|
|
7203
7216
|
} else {
|
|
7204
7217
|
// 如果是激活状态,退则出到上一行/下一行
|
|
7205
7218
|
if (selected.row || actived.row) {
|
|
7219
|
+
const activeRow = selected.row || actived.row
|
|
7220
|
+
const activeColumn = selected.column || actived.column
|
|
7206
7221
|
const activeParams = selected.row ? selected.args : actived.args
|
|
7207
7222
|
if (hasShiftKey) {
|
|
7208
7223
|
if (keyboardOpts.enterToTab) {
|
|
@@ -7211,12 +7226,44 @@ const tableMethods: any = {
|
|
|
7211
7226
|
$xeTable.moveEnterSelected(activeParams, isLeftArrow, true, isRightArrow, false, evnt)
|
|
7212
7227
|
}
|
|
7213
7228
|
} else {
|
|
7229
|
+
const _rowIndex = $xeTable.getVTRowIndex(activeRow)
|
|
7230
|
+
const _columnIndex = $xeTable.getVTColumnIndex(activeColumn)
|
|
7214
7231
|
if (keyboardOpts.enterToTab) {
|
|
7215
|
-
|
|
7232
|
+
const ttrParams = {
|
|
7233
|
+
row: activeRow,
|
|
7234
|
+
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
7235
|
+
$rowIndex: $xeTable.getVMRowIndex(activeRow),
|
|
7236
|
+
_rowIndex,
|
|
7237
|
+
column: activeColumn,
|
|
7238
|
+
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7239
|
+
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7240
|
+
_columnIndex,
|
|
7241
|
+
$table: $xeTable
|
|
7242
|
+
}
|
|
7243
|
+
if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
|
|
7244
|
+
evnt.preventDefault()
|
|
7245
|
+
// 最后一行按下Tab键,自动追加一行
|
|
7246
|
+
if (isLastTabAppendRow) {
|
|
7247
|
+
const newColumn = visibleColumn[0]
|
|
7248
|
+
if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
|
|
7249
|
+
if (actived.row) {
|
|
7250
|
+
$xeTable.handleClearEdit(evnt)
|
|
7251
|
+
}
|
|
7252
|
+
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
7253
|
+
$xeTable.scrollToRow(newRow, newColumn)
|
|
7254
|
+
$xeTable.handleSelected({ ...activeParams, row: newRow, column: newColumn }, evnt)
|
|
7255
|
+
})
|
|
7256
|
+
$xeTable.dispatchEvent('tab-append-row', ttrParams, evnt)
|
|
7257
|
+
return
|
|
7258
|
+
}
|
|
7259
|
+
}
|
|
7260
|
+
if (tabMethod) {
|
|
7261
|
+
tabMethod(ttrParams)
|
|
7262
|
+
} else {
|
|
7263
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt)
|
|
7264
|
+
}
|
|
7265
|
+
}
|
|
7216
7266
|
} else {
|
|
7217
|
-
const activeRow = selected.row || actived.row
|
|
7218
|
-
const activeColumn = selected.column || actived.column
|
|
7219
|
-
const _rowIndex = $xeTable.getVTRowIndex(activeRow)
|
|
7220
7267
|
const etrParams = {
|
|
7221
7268
|
row: activeRow,
|
|
7222
7269
|
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
@@ -7225,10 +7272,11 @@ const tableMethods: any = {
|
|
|
7225
7272
|
column: activeColumn,
|
|
7226
7273
|
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7227
7274
|
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7228
|
-
_columnIndex
|
|
7275
|
+
_columnIndex,
|
|
7229
7276
|
$table: $xeTable
|
|
7230
7277
|
}
|
|
7231
7278
|
if (!beforeEnterMethod || beforeEnterMethod(etrParams) !== false) {
|
|
7279
|
+
evnt.preventDefault()
|
|
7232
7280
|
// 最后一行按下回车键,自动追加一行
|
|
7233
7281
|
if (isLastEnterAppendRow) {
|
|
7234
7282
|
if (_rowIndex >= afterFullData.length - 1) {
|
|
@@ -7240,9 +7288,13 @@ const tableMethods: any = {
|
|
|
7240
7288
|
return
|
|
7241
7289
|
}
|
|
7242
7290
|
}
|
|
7243
|
-
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt)
|
|
7244
7291
|
if (enterMethod) {
|
|
7245
7292
|
enterMethod(etrParams)
|
|
7293
|
+
} else {
|
|
7294
|
+
if (actived.row) {
|
|
7295
|
+
$xeTable.handleClearEdit(evnt)
|
|
7296
|
+
}
|
|
7297
|
+
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt)
|
|
7246
7298
|
}
|
|
7247
7299
|
}
|
|
7248
7300
|
}
|
|
@@ -7283,10 +7335,49 @@ const tableMethods: any = {
|
|
|
7283
7335
|
}
|
|
7284
7336
|
} else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
7285
7337
|
// 如果按下了 Tab 键切换
|
|
7286
|
-
if (selected.row ||
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7338
|
+
if (selected.row || actived.row) {
|
|
7339
|
+
const activeRow = selected.row || actived.row
|
|
7340
|
+
const activeColumn = selected.column || actived.column
|
|
7341
|
+
const activeParams = selected.row ? selected.args : actived.args
|
|
7342
|
+
const _rowIndex = $xeTable.getVTRowIndex(activeRow)
|
|
7343
|
+
const _columnIndex = $xeTable.getVTColumnIndex(activeColumn)
|
|
7344
|
+
const ttrParams = {
|
|
7345
|
+
row: activeRow,
|
|
7346
|
+
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
7347
|
+
$rowIndex: $xeTable.getVMRowIndex(activeRow),
|
|
7348
|
+
_rowIndex,
|
|
7349
|
+
column: activeColumn,
|
|
7350
|
+
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7351
|
+
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7352
|
+
_columnIndex,
|
|
7353
|
+
$table: $xeTable
|
|
7354
|
+
}
|
|
7355
|
+
if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
|
|
7356
|
+
evnt.preventDefault()
|
|
7357
|
+
// 最后一行按下Tab键,自动追加一行
|
|
7358
|
+
if (isLastTabAppendRow) {
|
|
7359
|
+
const newColumn = visibleColumn[0]
|
|
7360
|
+
if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
|
|
7361
|
+
if (actived.row) {
|
|
7362
|
+
$xeTable.handleClearEdit(evnt)
|
|
7363
|
+
}
|
|
7364
|
+
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
7365
|
+
$xeTable.scrollToRow(newRow, newColumn)
|
|
7366
|
+
$xeTable.handleSelected({ ...activeParams, row: newRow, column: newColumn }, evnt)
|
|
7367
|
+
})
|
|
7368
|
+
$xeTable.dispatchEvent('tab-append-row', ttrParams, evnt)
|
|
7369
|
+
return
|
|
7370
|
+
}
|
|
7371
|
+
}
|
|
7372
|
+
if (tabMethod) {
|
|
7373
|
+
tabMethod(ttrParams)
|
|
7374
|
+
} else {
|
|
7375
|
+
if (actived.row) {
|
|
7376
|
+
$xeTable.handleClearEdit(evnt)
|
|
7377
|
+
}
|
|
7378
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt)
|
|
7379
|
+
}
|
|
7380
|
+
}
|
|
7290
7381
|
}
|
|
7291
7382
|
} else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selected.row || selected.column)) {
|
|
7292
7383
|
// 如果是删除键
|
|
@@ -8404,7 +8495,7 @@ const tableMethods: any = {
|
|
|
8404
8495
|
const { selectRadioRow: oldValue } = reactData
|
|
8405
8496
|
const { row } = params
|
|
8406
8497
|
const radioOpts = $xeTable.computeRadioOpts
|
|
8407
|
-
const { trigger, checkMethod } = radioOpts
|
|
8498
|
+
const { trigger, strict, checkMethod } = radioOpts
|
|
8408
8499
|
if (trigger === 'manual') {
|
|
8409
8500
|
return
|
|
8410
8501
|
}
|
|
@@ -8414,7 +8505,7 @@ const tableMethods: any = {
|
|
|
8414
8505
|
let isChange = oldValue !== newValue
|
|
8415
8506
|
if (isChange) {
|
|
8416
8507
|
handleCheckedRadioRow($xeTable, newValue)
|
|
8417
|
-
} else if (!
|
|
8508
|
+
} else if (!strict) {
|
|
8418
8509
|
isChange = oldValue === newValue
|
|
8419
8510
|
if (isChange) {
|
|
8420
8511
|
newValue = null
|
|
@@ -8437,13 +8528,23 @@ const tableMethods: any = {
|
|
|
8437
8528
|
const currentColumnOpts = $xeTable.computeCurrentColumnOpts
|
|
8438
8529
|
const beforeRowMethod = currentColumnOpts.beforeSelectMethod || columnOpts.currentMethod as any
|
|
8439
8530
|
const { column: newValue } = params
|
|
8440
|
-
const { trigger } = currentColumnOpts
|
|
8531
|
+
const { trigger, strict } = currentColumnOpts
|
|
8441
8532
|
if (trigger === 'manual') {
|
|
8442
8533
|
return
|
|
8443
8534
|
}
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8535
|
+
let isChange = oldValue !== newValue
|
|
8536
|
+
const selected = !isChange
|
|
8537
|
+
if (!beforeRowMethod || beforeRowMethod({ column: newValue, selected, $table: $xeTable })) {
|
|
8538
|
+
if (strict) {
|
|
8539
|
+
$xeTable.setCurrentColumn(newValue)
|
|
8540
|
+
} else {
|
|
8541
|
+
isChange = true
|
|
8542
|
+
if (selected) {
|
|
8543
|
+
$xeTable.clearCurrentColumn()
|
|
8544
|
+
} else {
|
|
8545
|
+
$xeTable.setCurrentColumn(newValue)
|
|
8546
|
+
}
|
|
8547
|
+
}
|
|
8447
8548
|
if (isChange) {
|
|
8448
8549
|
$xeTable.dispatchEvent('current-column-change', { oldValue, newValue, ...params }, evnt)
|
|
8449
8550
|
}
|
|
@@ -8460,13 +8561,23 @@ const tableMethods: any = {
|
|
|
8460
8561
|
const currentRowOpts = $xeTable.computeCurrentRowOpts
|
|
8461
8562
|
const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod as any
|
|
8462
8563
|
const { row: newValue } = params
|
|
8463
|
-
const { trigger } = currentRowOpts
|
|
8564
|
+
const { trigger, strict } = currentRowOpts
|
|
8464
8565
|
if (trigger === 'manual') {
|
|
8465
8566
|
return
|
|
8466
8567
|
}
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8568
|
+
let isChange = oldValue !== newValue
|
|
8569
|
+
const selected = !isChange
|
|
8570
|
+
if (!beforeRowMethod || beforeRowMethod({ row: newValue, selected, $table: $xeTable })) {
|
|
8571
|
+
if (strict) {
|
|
8572
|
+
$xeTable.setCurrentRow(newValue)
|
|
8573
|
+
} else {
|
|
8574
|
+
isChange = true
|
|
8575
|
+
if (selected) {
|
|
8576
|
+
$xeTable.clearCurrentRow()
|
|
8577
|
+
} else {
|
|
8578
|
+
$xeTable.setCurrentRow(newValue)
|
|
8579
|
+
}
|
|
8580
|
+
}
|
|
8470
8581
|
if (isChange) {
|
|
8471
8582
|
$xeTable.dispatchEvent('current-row-change', { oldValue, newValue, ...params }, evnt)
|
|
8472
8583
|
// 已废弃
|
|
@@ -9126,11 +9237,13 @@ const tableMethods: any = {
|
|
|
9126
9237
|
if (isPeerDrag && !isCrossDrag) {
|
|
9127
9238
|
if (oldRest.row[parentField] !== newRest.row[parentField]) {
|
|
9128
9239
|
// 非同级
|
|
9129
|
-
|
|
9240
|
+
handleRowDragEndClearStatus($xeTable)
|
|
9241
|
+
return Promise.resolve(errRest)
|
|
9130
9242
|
}
|
|
9131
9243
|
} else {
|
|
9132
9244
|
if (!isCrossDrag) {
|
|
9133
|
-
|
|
9245
|
+
handleRowDragEndClearStatus($xeTable)
|
|
9246
|
+
return Promise.resolve(errRest)
|
|
9134
9247
|
}
|
|
9135
9248
|
if (oldAllMaps[newRowid]) {
|
|
9136
9249
|
isSelfToChildStatus = true
|
|
@@ -9141,7 +9254,8 @@ const tableMethods: any = {
|
|
|
9141
9254
|
content: getI18n('vxe.error.treeDragChild')
|
|
9142
9255
|
})
|
|
9143
9256
|
}
|
|
9144
|
-
|
|
9257
|
+
handleRowDragEndClearStatus($xeTable)
|
|
9258
|
+
return Promise.resolve(errRest)
|
|
9145
9259
|
}
|
|
9146
9260
|
}
|
|
9147
9261
|
}
|
|
@@ -9149,13 +9263,15 @@ const tableMethods: any = {
|
|
|
9149
9263
|
// 子到根
|
|
9150
9264
|
|
|
9151
9265
|
if (!isCrossDrag) {
|
|
9152
|
-
|
|
9266
|
+
handleRowDragEndClearStatus($xeTable)
|
|
9267
|
+
return Promise.resolve(errRest)
|
|
9153
9268
|
}
|
|
9154
9269
|
} else if (newLevel) {
|
|
9155
9270
|
// 根到子
|
|
9156
9271
|
|
|
9157
9272
|
if (!isCrossDrag) {
|
|
9158
|
-
|
|
9273
|
+
handleRowDragEndClearStatus($xeTable)
|
|
9274
|
+
return Promise.resolve(errRest)
|
|
9159
9275
|
}
|
|
9160
9276
|
if (oldAllMaps[newRowid]) {
|
|
9161
9277
|
isSelfToChildStatus = true
|
|
@@ -9166,7 +9282,8 @@ const tableMethods: any = {
|
|
|
9166
9282
|
content: getI18n('vxe.error.treeDragChild')
|
|
9167
9283
|
})
|
|
9168
9284
|
}
|
|
9169
|
-
|
|
9285
|
+
handleRowDragEndClearStatus($xeTable)
|
|
9286
|
+
return Promise.resolve(errRest)
|
|
9170
9287
|
}
|
|
9171
9288
|
}
|
|
9172
9289
|
} else {
|
|
@@ -9188,6 +9305,7 @@ const tableMethods: any = {
|
|
|
9188
9305
|
// 移出源位置
|
|
9189
9306
|
if (oldRest && newRest) {
|
|
9190
9307
|
const fullList = XEUtils.toTreeArray(internalData.afterTreeFullData, {
|
|
9308
|
+
updated: false,
|
|
9191
9309
|
key: rowField,
|
|
9192
9310
|
parentKey: parentField,
|
|
9193
9311
|
children: mapChildrenField
|
|
@@ -11056,8 +11174,8 @@ const tableMethods: any = {
|
|
|
11056
11174
|
XEUtils.each(fullAllDataRowIdData, (rowRest) => {
|
|
11057
11175
|
rowRest.treeLoaded = false
|
|
11058
11176
|
})
|
|
11177
|
+
internalData.treeExpandedMaps = {}
|
|
11059
11178
|
}
|
|
11060
|
-
internalData.treeExpandedMaps = {}
|
|
11061
11179
|
if (transform) {
|
|
11062
11180
|
handleVirtualTreeToList($xeTable)
|
|
11063
11181
|
$xeTable.handleTableData()
|
|
@@ -12176,7 +12294,7 @@ const tableMethods: any = {
|
|
|
12176
12294
|
* @param {Row} row 行对象
|
|
12177
12295
|
* @param {ColumnInfo} column 列配置
|
|
12178
12296
|
*/
|
|
12179
|
-
scrollToRow (row: any, fieldOrColumn?: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo) {
|
|
12297
|
+
scrollToRow (row: any, fieldOrColumn?: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo, options?: VxeTableDefines.ScrollToRowConfig) {
|
|
12180
12298
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
12181
12299
|
const props = $xeTable
|
|
12182
12300
|
const reactData = $xeTable as unknown as TableReactData
|
|
@@ -12191,7 +12309,7 @@ const tableMethods: any = {
|
|
|
12191
12309
|
}
|
|
12192
12310
|
}
|
|
12193
12311
|
if (fieldOrColumn) {
|
|
12194
|
-
rest.push(handleScrollToRowColumn($xeTable, fieldOrColumn, row))
|
|
12312
|
+
rest.push(handleScrollToRowColumn($xeTable, fieldOrColumn, row, options))
|
|
12195
12313
|
}
|
|
12196
12314
|
return Promise.all(rest).then(() => {
|
|
12197
12315
|
if (row) {
|
|
@@ -12206,51 +12324,51 @@ const tableMethods: any = {
|
|
|
12206
12324
|
/**
|
|
12207
12325
|
* 如果有滚动条,则滚动到第一行
|
|
12208
12326
|
*/
|
|
12209
|
-
scrollToStartRow (fieldOrColumn?: string | VxeTableDefines.ColumnInfo) {
|
|
12327
|
+
scrollToStartRow (fieldOrColumn?: string | VxeTableDefines.ColumnInfo, options?: VxeTableDefines.ScrollToRowConfig) {
|
|
12210
12328
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
12211
12329
|
const internalData = $xeTable as unknown as TableInternalData
|
|
12212
12330
|
|
|
12213
12331
|
const { afterFullData } = internalData
|
|
12214
|
-
return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn)
|
|
12332
|
+
return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn, options)
|
|
12215
12333
|
},
|
|
12216
12334
|
/**
|
|
12217
12335
|
* 如果有滚动条,则滚动到最后一行
|
|
12218
12336
|
*/
|
|
12219
|
-
scrollToEndRow (fieldOrColumn?: string | VxeTableDefines.ColumnInfo) {
|
|
12337
|
+
scrollToEndRow (fieldOrColumn?: string | VxeTableDefines.ColumnInfo, options?: VxeTableDefines.ScrollToRowConfig) {
|
|
12220
12338
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
12221
12339
|
const internalData = $xeTable as unknown as TableInternalData
|
|
12222
12340
|
|
|
12223
12341
|
const { afterFullData } = internalData
|
|
12224
|
-
return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn)
|
|
12342
|
+
return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn, options)
|
|
12225
12343
|
},
|
|
12226
12344
|
/**
|
|
12227
12345
|
* 如果有滚动条,则滚动到对应的列
|
|
12228
12346
|
* @param {ColumnInfo} column 列配置
|
|
12229
12347
|
*/
|
|
12230
|
-
scrollToColumn (fieldOrColumn: any) {
|
|
12348
|
+
scrollToColumn (fieldOrColumn: any, options?: VxeTableDefines.ScrollToColumnConfig) {
|
|
12231
12349
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
12232
12350
|
|
|
12233
|
-
return handleScrollToRowColumn($xeTable, fieldOrColumn)
|
|
12351
|
+
return handleScrollToRowColumn($xeTable, null, fieldOrColumn, options)
|
|
12234
12352
|
},
|
|
12235
12353
|
/**
|
|
12236
12354
|
* 如果有滚动条,则滚动到第一列
|
|
12237
12355
|
*/
|
|
12238
|
-
scrollToStartColumn () {
|
|
12356
|
+
scrollToStartColumn (options?: VxeTableDefines.ScrollToColumnConfig) {
|
|
12239
12357
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
12240
12358
|
const internalData = $xeTable as unknown as TableInternalData
|
|
12241
12359
|
|
|
12242
12360
|
const { visibleColumn } = internalData
|
|
12243
|
-
return $xeTable.scrollToColumn(visibleColumn[0])
|
|
12361
|
+
return $xeTable.scrollToColumn(visibleColumn[0], options)
|
|
12244
12362
|
},
|
|
12245
12363
|
/**
|
|
12246
12364
|
* 如果有滚动条,则滚动到最后一列
|
|
12247
12365
|
*/
|
|
12248
|
-
scrollToEndColumn () {
|
|
12366
|
+
scrollToEndColumn (options?: VxeTableDefines.ScrollToColumnConfig) {
|
|
12249
12367
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
12250
12368
|
const internalData = $xeTable as unknown as TableInternalData
|
|
12251
12369
|
|
|
12252
12370
|
const { visibleColumn } = internalData
|
|
12253
|
-
return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1])
|
|
12371
|
+
return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1], options)
|
|
12254
12372
|
},
|
|
12255
12373
|
/**
|
|
12256
12374
|
* 对于树形结构中,可以直接滚动到指定深层节点中
|
|
@@ -12361,10 +12479,12 @@ const tableMethods: any = {
|
|
|
12361
12479
|
updateStatus (slotParams: any, cellValue: any) {
|
|
12362
12480
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
12363
12481
|
const props = $xeTable
|
|
12482
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
12364
12483
|
|
|
12365
12484
|
return this.$nextTick().then(() => {
|
|
12366
12485
|
const { editRules } = props
|
|
12367
|
-
|
|
12486
|
+
const { isActivated } = internalData
|
|
12487
|
+
if (isActivated && slotParams && editRules) {
|
|
12368
12488
|
return $xeTable.handleCellRuleUpdateStatus('change', slotParams, cellValue)
|
|
12369
12489
|
}
|
|
12370
12490
|
})
|
|
@@ -205,6 +205,8 @@ export const tableProps = {
|
|
|
205
205
|
rowConfig: Object as PropType<VxeTablePropTypes.RowConfig>,
|
|
206
206
|
// 数据聚合配置项
|
|
207
207
|
aggregateConfig: Object as PropType<VxeTablePropTypes.AggregateConfig>,
|
|
208
|
+
// 聚合函数计算精度配置项
|
|
209
|
+
aggregateAccuracyConfig: Object as PropType<VxeTablePropTypes.AggregateAccuracyConfig>,
|
|
208
210
|
/**
|
|
209
211
|
* 已废弃,被 aggregateConfig 替换
|
|
210
212
|
* @deprecated
|
|
@@ -270,6 +272,8 @@ export const tableProps = {
|
|
|
270
272
|
fnrConfig: Object,
|
|
271
273
|
// 编辑配置项
|
|
272
274
|
editConfig: [Boolean, Object] as PropType<VxeTablePropTypes.EditConfig>,
|
|
275
|
+
// 数据状态监听配置项
|
|
276
|
+
editDirtyConfig: Object as PropType<VxeTablePropTypes.EditDirtyConfig>,
|
|
273
277
|
// 校验配置项
|
|
274
278
|
validConfig: Object as PropType<VxeTablePropTypes.ValidConfig>,
|
|
275
279
|
// 校验规则配置项
|