vxe-table 3.20.13 → 3.21.0-beta.1

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.
Files changed (61) hide show
  1. package/es/style.css +1 -1
  2. package/es/table/module/edit/mixin.js +33 -12
  3. package/es/table/module/keyboard/mixin.js +2 -2
  4. package/es/table/src/cell.js +3 -3
  5. package/es/table/src/column.js +10 -5
  6. package/es/table/src/group.js +10 -5
  7. package/es/table/src/methods.js +382 -169
  8. package/es/table/src/props.js +2 -2
  9. package/es/table/src/table.js +13 -6
  10. package/es/table/src/util.js +12 -3
  11. package/es/toolbar/src/toolbar.js +3 -2
  12. package/es/ui/index.js +3 -3
  13. package/es/ui/src/dom.js +4 -0
  14. package/es/ui/src/log.js +1 -1
  15. package/lib/index.umd.js +377 -310
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/style.css +1 -1
  18. package/lib/table/module/edit/mixin.js +39 -12
  19. package/lib/table/module/edit/mixin.min.js +1 -1
  20. package/lib/table/module/keyboard/mixin.js +2 -2
  21. package/lib/table/module/keyboard/mixin.min.js +1 -1
  22. package/lib/table/src/cell.js +3 -3
  23. package/lib/table/src/column.js +10 -5
  24. package/lib/table/src/column.min.js +1 -1
  25. package/lib/table/src/group.js +10 -5
  26. package/lib/table/src/group.min.js +1 -1
  27. package/lib/table/src/methods.js +37 -31
  28. package/lib/table/src/methods.min.js +1 -1
  29. package/lib/table/src/props.js +2 -2
  30. package/lib/table/src/props.min.js +1 -1
  31. package/lib/table/src/table.js +15 -6
  32. package/lib/table/src/table.min.js +1 -1
  33. package/lib/table/src/util.js +12 -3
  34. package/lib/table/src/util.min.js +1 -1
  35. package/lib/toolbar/src/toolbar.js +3 -2
  36. package/lib/toolbar/src/toolbar.min.js +1 -1
  37. package/lib/ui/index.js +3 -3
  38. package/lib/ui/index.min.js +1 -1
  39. package/lib/ui/src/dom.js +5 -0
  40. package/lib/ui/src/dom.min.js +1 -1
  41. package/lib/ui/src/log.js +1 -1
  42. package/lib/ui/src/log.min.js +1 -1
  43. package/package.json +3 -3
  44. package/packages/table/module/edit/mixin.ts +47 -12
  45. package/packages/table/module/keyboard/mixin.ts +2 -2
  46. package/packages/table/src/cell.ts +5 -5
  47. package/packages/table/src/column.ts +16 -9
  48. package/packages/table/src/group.ts +16 -8
  49. package/packages/table/src/methods.ts +397 -167
  50. package/packages/table/src/props.ts +3 -3
  51. package/packages/table/src/table.ts +13 -6
  52. package/packages/table/src/util.ts +16 -6
  53. package/packages/toolbar/src/toolbar.ts +4 -2
  54. package/packages/ui/index.ts +2 -2
  55. package/packages/ui/src/dom.ts +5 -0
  56. /package/es/{iconfont.1776926445391.ttf → iconfont.1778035421318.ttf} +0 -0
  57. /package/es/{iconfont.1776926445391.woff → iconfont.1778035421318.woff} +0 -0
  58. /package/es/{iconfont.1776926445391.woff2 → iconfont.1778035421318.woff2} +0 -0
  59. /package/lib/{iconfont.1776926445391.ttf → iconfont.1778035421318.ttf} +0 -0
  60. /package/lib/{iconfont.1776926445391.woff → iconfont.1778035421318.woff} +0 -0
  61. /package/lib/{iconfont.1776926445391.woff2 → iconfont.1778035421318.woff2} +0 -0
@@ -1,5 +1,5 @@
1
1
  import XEUtils from 'xe-utils'
2
- import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLeftTo, wheelScrollTopTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement } from '../../ui/src/dom'
2
+ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLeftTo, wheelScrollTopTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement, hasEventInputTarget } from '../../ui/src/dom'
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'
@@ -12,7 +12,7 @@ import { getCrossTableDragRowInfo } from './store'
12
12
  import type { VxeTooltipInstance, ValueOf } from 'vxe-pc-ui'
13
13
  import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, TableReactData, VxeTableConstructor, VxeToolbarConstructor, VxeToolbarInstance, TableInternalData, VxeGridConstructor, VxeTablePrivateMethods, VxeTablePropTypes, VxeGridPrivateMethods } from '../../../types'
14
14
 
15
- const { getConfig, getI18n, renderer, formats, interceptor, createEvent } = VxeUI
15
+ const { getConfig, getI18n, renderer, formats, interceptor, createEvent, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI
16
16
 
17
17
  const browseObj = XEUtils.browse()
18
18
 
@@ -395,7 +395,7 @@ function cacheColumnMap ($xeTable: VxeTableConstructor & VxeTablePrivateMethods)
395
395
  errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand'])
396
396
  }
397
397
  if (expandOpts.mode !== 'inside' && (treeConfig && !treeOpts.transform)) {
398
- errLog('vxe.error.notConflictProp', ['tree-config.transform=false', 'expand-config.mode=fixed'])
398
+ errLog('vxe.error.notConflictProp', ['tree-config.transform=false', 'expand-config.mode=inside'])
399
399
  }
400
400
  if (props.spanMethod) {
401
401
  warnLog('vxe.error.notSupportProp', ['column.type=expand', 'span-method', 'span-method=null'])
@@ -3501,6 +3501,7 @@ function loadTableData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
3501
3501
  }
3502
3502
  $xeTable.clearMergeCells()
3503
3503
  $xeTable.clearMergeFooterItems()
3504
+ $xeTable.handleClearStack()
3504
3505
  $xeTable.handleTableData(true)
3505
3506
  $xeTable.updateFooter()
3506
3507
  $xeTable.handleUpdateBodyMerge()
@@ -4477,6 +4478,113 @@ function reUpdateCustomStyleEvent ($xeTable: VxeTableConstructor & VxeTablePriva
4477
4478
  }
4478
4479
  }
4479
4480
 
4481
+ function truncateStackHistory ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
4482
+ const internalData = $xeTable as unknown as TableInternalData
4483
+
4484
+ const { stackHistoryStore } = internalData
4485
+ const { undoStacks } = stackHistoryStore
4486
+ const undoRedoHistoryOpts = $xeTable.computeUndoRedoHistoryOpts
4487
+ const { stackSize } = undoRedoHistoryOpts
4488
+ if (undoStacks.length > XEUtils.toNumber(stackSize)) {
4489
+ undoStacks.shift()
4490
+ }
4491
+ }
4492
+
4493
+ /**
4494
+ * 生成快照数据
4495
+ */
4496
+ function getSnapshotStackData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
4497
+ const reactData = $xeTable as unknown as TableReactData
4498
+ const internalData = $xeTable as unknown as TableInternalData
4499
+
4500
+ const { editStore } = reactData
4501
+ const { afterFullData, elemStore } = internalData
4502
+ const { selected, actived } = editStore
4503
+ const { row: selectRow, column: selectColumn } = selected
4504
+ const { row: editRow, column: editColumn } = actived
4505
+ const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
4506
+ const stackObj: VxeTableDefines.HistoryStackObj = {
4507
+ selectActiveInfo: selectRow && selectColumn
4508
+ ? {
4509
+ rowid: getRowid($xeTable, selectRow),
4510
+ colid: selectColumn.id
4511
+ }
4512
+ : undefined,
4513
+ editActiveInfo: editRow && editColumn
4514
+ ? {
4515
+ rowid: getRowid($xeTable, editRow),
4516
+ colid: editColumn.id
4517
+ }
4518
+ : undefined,
4519
+ scrollInfo: {
4520
+ top: bodyScrollElem ? bodyScrollElem.scrollTop : 0,
4521
+ left: bodyScrollElem ? bodyScrollElem.scrollLeft : 0
4522
+ },
4523
+ visibleData: XEUtils.clone(afterFullData, true),
4524
+ visibleColumn: []
4525
+ }
4526
+ return $xeTable.getCellAreaPushStackObj ? $xeTable.getCellAreaPushStackObj(stackObj) : stackObj
4527
+ }
4528
+
4529
+ /**
4530
+ * 刷新栈视图
4531
+ */
4532
+ function handleUpdateSnapshotStackData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, stackObj: VxeTableDefines.HistoryStackObj | null | undefined) {
4533
+ const reactData = $xeTable as unknown as TableReactData
4534
+ const internalData = $xeTable as unknown as TableInternalData
4535
+
4536
+ const { editStore } = reactData
4537
+ const { fullAllDataRowIdData, fullColumnIdData } = internalData
4538
+ if (!stackObj) {
4539
+ return
4540
+ }
4541
+ const { visibleData, editActiveInfo, selectActiveInfo, scrollInfo } = stackObj
4542
+ const afterFullList = visibleData.map(item => {
4543
+ const rowid = getRowid($xeTable, item)
4544
+ const rest = fullAllDataRowIdData[rowid]
4545
+ let row = item
4546
+ if (rest) {
4547
+ row = rest.row
4548
+ Object.assign(row, item)
4549
+ }
4550
+ return row
4551
+ })
4552
+
4553
+ internalData.afterFullData = afterFullList
4554
+ if ($xeTable.handleCellAreaSnapshotStackData) {
4555
+ $xeTable.handleCellAreaSnapshotStackData(stackObj)
4556
+ } else {
4557
+ const { selected } = editStore
4558
+ const mouseOpts = $xeTable.computeMouseOpts
4559
+ let selectRowid = ''
4560
+ let selectColid = ''
4561
+ if (editActiveInfo) {
4562
+ selectRowid = editActiveInfo.rowid
4563
+ selectColid = editActiveInfo.colid
4564
+ } else if (selectActiveInfo) {
4565
+ selectRowid = selectActiveInfo.rowid
4566
+ selectColid = selectActiveInfo.colid
4567
+ }
4568
+ if (selectRowid && selectColid && mouseOpts.selected) {
4569
+ const editRow = fullAllDataRowIdData[selectRowid] ? fullAllDataRowIdData[selectRowid].row : null
4570
+ const editColumn = fullColumnIdData[selectColid] ? fullColumnIdData[selectColid].column : null
4571
+ if (editRow && editColumn) {
4572
+ const params = {
4573
+ row: editRow,
4574
+ column: editColumn
4575
+ }
4576
+ selected.row = editRow
4577
+ selected.column = editColumn
4578
+ selected.args = params
4579
+ $xeTable.$nextTick(() => {
4580
+ $xeTable.addCellSelectedClass()
4581
+ $xeTable.scrollTo(scrollInfo)
4582
+ })
4583
+ }
4584
+ }
4585
+ }
4586
+ }
4587
+
4480
4588
  const tableMethods: any = {
4481
4589
  callSlot (slotFunc: any, params: any, h: any, vNodes: any) {
4482
4590
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
@@ -4560,7 +4668,9 @@ const tableMethods: any = {
4560
4668
  * 重置表格的一切数据状态
4561
4669
  */
4562
4670
  clearAll () {
4563
- return clearTableAllStatus(this)
4671
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
4672
+
4673
+ return clearTableAllStatus($xeTable)
4564
4674
  },
4565
4675
  handleUpdateRowGroup (groupFields: any[]) {
4566
4676
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
@@ -4781,7 +4891,7 @@ const tableMethods: any = {
4781
4891
  * 对于表格列需要重载、局部递增场景下可能会用到
4782
4892
  * @param {ColumnInfo} columns 列配置
4783
4893
  */
4784
- loadColumn (columns: any) {
4894
+ loadColumn (columns: (VxeTableDefines.ColumnInfo | VxeTableDefines.ColumnOptions)[]) {
4785
4895
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
4786
4896
  const internalData = $xeTable as unknown as TableInternalData
4787
4897
 
@@ -7283,18 +7393,20 @@ const tableMethods: any = {
7283
7393
  const { isLastEnterAppendRow, beforeEnterMethod, enterMethod, isLastTabAppendRow, beforeTabMethod, tabMethod } = keyboardOpts
7284
7394
  const { selected, actived } = editStore
7285
7395
  const { keyCode } = evnt
7286
- const hasBackspaceKey = keyCode === 8
7287
- const isTab = keyCode === 9
7288
- const isEnter = keyCode === 13
7289
- const isEsc = keyCode === 27
7290
- const isSpacebar = keyCode === 32
7291
- const isLeftArrow = keyCode === 37
7292
- const isUpArrow = keyCode === 38
7293
- const isRightArrow = keyCode === 39
7294
- const isDwArrow = keyCode === 40
7295
- const hasDeleteKey = keyCode === 46
7296
- const isF2 = keyCode === 113
7297
- const isContextMenu = keyCode === 93
7396
+ const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE)
7397
+ const hasBackspaceKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.BACKSPACE)
7398
+ const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB)
7399
+ const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER)
7400
+ const isSpacebar = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.SPACEBAR)
7401
+ const isLeftArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT)
7402
+ const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP)
7403
+ const isRightArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT)
7404
+ const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN)
7405
+ const hasDeleteKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE)
7406
+ const isY = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.Y)
7407
+ const isZ = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.Z)
7408
+ const isF2 = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.F2)
7409
+ const isContextMenu = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.CONTEXT_MENU)
7298
7410
  const isControlKey = hasControlKey(evnt)
7299
7411
  const hasShiftKey = evnt.shiftKey
7300
7412
  const hasAltKey = evnt.altKey
@@ -7303,6 +7415,7 @@ const tableMethods: any = {
7303
7415
  const isEditStatus = isEnableConf(editConfig) && actived.column && actived.row
7304
7416
  const childrenField = treeOpts.children || treeOpts.childrenField
7305
7417
  const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod
7418
+ const selectColumn = selected.column
7306
7419
  if (operCtxMenu) {
7307
7420
  // 如果配置了右键菜单; 支持方向键操作、回车
7308
7421
  evnt.preventDefault()
@@ -7330,10 +7443,10 @@ const tableMethods: any = {
7330
7443
  }
7331
7444
  }
7332
7445
  }
7333
- } else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
7446
+ } else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
7334
7447
  // 空格键支持选中复选框
7335
7448
  evnt.preventDefault()
7336
- if (selected.column.type === 'checkbox') {
7449
+ if (selectColumn.type === 'checkbox') {
7337
7450
  $xeTable.handleToggleCheckRowEvent(evnt, selected.args)
7338
7451
  } else {
7339
7452
  $xeTable.triggerRadioRowEvent(evnt, selected.args)
@@ -7341,15 +7454,14 @@ const tableMethods: any = {
7341
7454
  } else if (isF2 && isEnableConf(editConfig)) {
7342
7455
  if (!isEditStatus) {
7343
7456
  // 如果按下了 F2 键
7344
- if (selected.row && selected.column) {
7345
- evnt.stopPropagation()
7457
+ if (selected.row && selectColumn) {
7346
7458
  evnt.preventDefault()
7347
7459
  $xeTable.handleEdit(selected.args, evnt)
7348
7460
  }
7349
7461
  }
7350
7462
  } else if (isContextMenu) {
7351
7463
  // 如果按下上下文键
7352
- internalData._keyCtx = selected.row && selected.column && bodyMenu.length
7464
+ internalData._keyCtx = selected.row && selectColumn && bodyMenu.length
7353
7465
  clearTimeout(internalData.keyCtxTimeout)
7354
7466
  internalData.keyCtxTimeout = setTimeout(() => {
7355
7467
  internalData._keyCtx = false
@@ -7370,84 +7482,86 @@ const tableMethods: any = {
7370
7482
  // 如果是激活状态,退则出到上一行/下一行
7371
7483
  if (selected.row || actived.row) {
7372
7484
  const activeRow = selected.row || actived.row
7373
- const activeColumn = selected.column || actived.column
7374
- const activeParams = selected.row ? selected.args : actived.args
7375
- if (hasShiftKey) {
7376
- if (keyboardOpts.enterToTab) {
7377
- $xeTable.moveTabSelected(activeParams, hasShiftKey, evnt)
7378
- } else {
7379
- $xeTable.moveEnterSelected(activeParams, isLeftArrow, true, isRightArrow, false, evnt)
7380
- }
7381
- } else {
7382
- const _rowIndex = $xeTable.getVTRowIndex(activeRow)
7383
- const _columnIndex = $xeTable.getVTColumnIndex(activeColumn)
7384
- if (keyboardOpts.enterToTab) {
7385
- const ttrParams = {
7386
- row: activeRow,
7387
- rowIndex: $xeTable.getRowIndex(activeRow),
7388
- $rowIndex: $xeTable.getVMRowIndex(activeRow),
7389
- _rowIndex,
7390
- column: activeColumn,
7391
- columnIndex: $xeTable.getColumnIndex(activeColumn),
7392
- $columnIndex: $xeTable.getVMColumnIndex(activeColumn),
7393
- _columnIndex,
7394
- $table: $xeTable
7485
+ const activeColumn = selectColumn || actived.column
7486
+ if (activeColumn) {
7487
+ const activeParams = selected.row ? selected.args : actived.args
7488
+ if (hasShiftKey) {
7489
+ if (keyboardOpts.enterToTab) {
7490
+ $xeTable.moveTabSelected(activeParams, hasShiftKey, evnt)
7491
+ } else {
7492
+ $xeTable.moveEnterSelected(activeParams, isLeftArrow, true, isRightArrow, false, evnt)
7395
7493
  }
7396
- if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
7397
- evnt.preventDefault()
7398
- // 最后一行按下Tab键,自动追加一行
7399
- if (isLastTabAppendRow) {
7400
- const newColumn = visibleColumn[0]
7401
- if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
7402
- if (actived.row) {
7403
- $xeTable.handleClearEdit(evnt)
7494
+ } else {
7495
+ const _rowIndex = $xeTable.getVTRowIndex(activeRow)
7496
+ const _columnIndex = $xeTable.getVTColumnIndex(activeColumn)
7497
+ if (keyboardOpts.enterToTab) {
7498
+ const ttrParams = {
7499
+ row: activeRow,
7500
+ rowIndex: $xeTable.getRowIndex(activeRow),
7501
+ $rowIndex: $xeTable.getVMRowIndex(activeRow),
7502
+ _rowIndex,
7503
+ column: activeColumn,
7504
+ columnIndex: $xeTable.getColumnIndex(activeColumn),
7505
+ $columnIndex: $xeTable.getVMColumnIndex(activeColumn),
7506
+ _columnIndex,
7507
+ $table: $xeTable
7508
+ }
7509
+ if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
7510
+ evnt.preventDefault()
7511
+ // 最后一行按下Tab键,自动追加一行
7512
+ if (isLastTabAppendRow) {
7513
+ const newColumn = visibleColumn[0]
7514
+ if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
7515
+ if (actived.row) {
7516
+ $xeTable.handleClearEdit(evnt)
7517
+ }
7518
+ $xeTable.insertAt({}, -1).then(({ row: newRow }) => {
7519
+ $xeTable.scrollToRow(newRow, newColumn)
7520
+ $xeTable.handleSelected({ ...activeParams, row: newRow, column: newColumn }, evnt)
7521
+ })
7522
+ $xeTable.dispatchEvent('tab-append-row', ttrParams, evnt)
7523
+ return
7404
7524
  }
7405
- $xeTable.insertAt({}, -1).then(({ row: newRow }) => {
7406
- $xeTable.scrollToRow(newRow, newColumn)
7407
- $xeTable.handleSelected({ ...activeParams, row: newRow, column: newColumn }, evnt)
7408
- })
7409
- $xeTable.dispatchEvent('tab-append-row', ttrParams, evnt)
7410
- return
7525
+ }
7526
+ if (tabMethod) {
7527
+ tabMethod(ttrParams)
7528
+ } else {
7529
+ $xeTable.moveTabSelected(activeParams, hasShiftKey, evnt)
7411
7530
  }
7412
7531
  }
7413
- if (tabMethod) {
7414
- tabMethod(ttrParams)
7415
- } else {
7416
- $xeTable.moveTabSelected(activeParams, hasShiftKey, evnt)
7532
+ } else {
7533
+ const etrParams = {
7534
+ row: activeRow,
7535
+ rowIndex: $xeTable.getRowIndex(activeRow),
7536
+ $rowIndex: $xeTable.getVMRowIndex(activeRow),
7537
+ _rowIndex,
7538
+ column: activeColumn,
7539
+ columnIndex: $xeTable.getColumnIndex(activeColumn),
7540
+ $columnIndex: $xeTable.getVMColumnIndex(activeColumn),
7541
+ _columnIndex,
7542
+ $table: $xeTable
7417
7543
  }
7418
- }
7419
- } else {
7420
- const etrParams = {
7421
- row: activeRow,
7422
- rowIndex: $xeTable.getRowIndex(activeRow),
7423
- $rowIndex: $xeTable.getVMRowIndex(activeRow),
7424
- _rowIndex,
7425
- column: activeColumn,
7426
- columnIndex: $xeTable.getColumnIndex(activeColumn),
7427
- $columnIndex: $xeTable.getVMColumnIndex(activeColumn),
7428
- _columnIndex,
7429
- $table: $xeTable
7430
- }
7431
- if (!beforeEnterMethod || beforeEnterMethod(etrParams) !== false) {
7432
- evnt.preventDefault()
7433
- // 最后一行按下回车键,自动追加一行
7434
- if (isLastEnterAppendRow) {
7435
- if (_rowIndex >= afterFullData.length - 1) {
7436
- $xeTable.insertAt({}, -1).then(({ row: newRow }: any) => {
7437
- $xeTable.scrollToRow(newRow, selected.column)
7438
- $xeTable.handleSelected({ ...activeParams, row: newRow }, evnt)
7439
- })
7440
- $xeTable.dispatchEvent('enter-append-row', etrParams, evnt)
7441
- return
7544
+ if (!beforeEnterMethod || beforeEnterMethod(etrParams) !== false) {
7545
+ evnt.preventDefault()
7546
+ // 最后一行按下回车键,自动追加一行
7547
+ if (isLastEnterAppendRow) {
7548
+ if (_rowIndex >= afterFullData.length - 1) {
7549
+ $xeTable.insertAt({}, -1).then(({ row: newRow }: any) => {
7550
+ $xeTable.scrollToRow(newRow, selectColumn)
7551
+ $xeTable.handleSelected({ ...activeParams, row: newRow }, evnt)
7552
+ })
7553
+ $xeTable.dispatchEvent('enter-append-row', etrParams, evnt)
7554
+ return
7555
+ }
7442
7556
  }
7443
- }
7444
- if (enterMethod) {
7445
- enterMethod(etrParams)
7446
- } else {
7447
- if (actived.row) {
7448
- $xeTable.handleClearEdit(evnt)
7557
+ if (enterMethod) {
7558
+ enterMethod(etrParams)
7559
+ } else {
7560
+ if (actived.row) {
7561
+ $xeTable.handleClearEdit(evnt)
7562
+ }
7563
+ $xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt)
7449
7564
  }
7450
- $xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt)
7451
7565
  }
7452
7566
  }
7453
7567
  }
@@ -7473,7 +7587,7 @@ const tableMethods: any = {
7473
7587
  } else if (operArrow && keyboardConfig && keyboardOpts.isArrow) {
7474
7588
  if (!isEditStatus) {
7475
7589
  // 如果按下了方向键
7476
- if (mouseOpts.selected && selected.row && selected.column) {
7590
+ if (mouseOpts.selected && selected.row && selectColumn) {
7477
7591
  $xeTable.moveArrowSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt)
7478
7592
  } else {
7479
7593
  // 当前行按键上下移动
@@ -7490,57 +7604,59 @@ const tableMethods: any = {
7490
7604
  // 如果按下了 Tab 键切换
7491
7605
  if (selected.row || actived.row) {
7492
7606
  const activeRow = selected.row || actived.row
7493
- const activeColumn = selected.column || actived.column
7494
- const activeParams = selected.row ? selected.args : actived.args
7495
- const _rowIndex = $xeTable.getVTRowIndex(activeRow)
7496
- const _columnIndex = $xeTable.getVTColumnIndex(activeColumn)
7497
- const ttrParams = {
7498
- row: activeRow,
7499
- rowIndex: $xeTable.getRowIndex(activeRow),
7500
- $rowIndex: $xeTable.getVMRowIndex(activeRow),
7501
- _rowIndex,
7502
- column: activeColumn,
7503
- columnIndex: $xeTable.getColumnIndex(activeColumn),
7504
- $columnIndex: $xeTable.getVMColumnIndex(activeColumn),
7505
- _columnIndex,
7506
- $table: $xeTable
7507
- }
7508
- if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
7509
- evnt.preventDefault()
7510
- // 最后一行按下Tab键,自动追加一行
7511
- if (isLastTabAppendRow) {
7512
- const newColumn = visibleColumn[0]
7513
- if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
7607
+ const activeColumn = selectColumn || actived.column
7608
+ if (activeColumn) {
7609
+ const activeParams = selected.row ? selected.args : actived.args
7610
+ const _rowIndex = $xeTable.getVTRowIndex(activeRow)
7611
+ const _columnIndex = $xeTable.getVTColumnIndex(activeColumn)
7612
+ const ttrParams = {
7613
+ row: activeRow,
7614
+ rowIndex: $xeTable.getRowIndex(activeRow),
7615
+ $rowIndex: $xeTable.getVMRowIndex(activeRow),
7616
+ _rowIndex,
7617
+ column: activeColumn,
7618
+ columnIndex: $xeTable.getColumnIndex(activeColumn),
7619
+ $columnIndex: $xeTable.getVMColumnIndex(activeColumn),
7620
+ _columnIndex,
7621
+ $table: $xeTable
7622
+ }
7623
+ if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
7624
+ evnt.preventDefault()
7625
+ // 最后一行按下Tab键,自动追加一行
7626
+ if (isLastTabAppendRow) {
7627
+ const newColumn = visibleColumn[0]
7628
+ if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
7629
+ if (actived.row) {
7630
+ $xeTable.handleClearEdit(evnt)
7631
+ }
7632
+ $xeTable.insertAt({}, -1).then(({ row: newRow }) => {
7633
+ $xeTable.scrollToRow(newRow, newColumn)
7634
+ $xeTable.handleSelected({ ...activeParams, row: newRow, column: newColumn }, evnt)
7635
+ })
7636
+ $xeTable.dispatchEvent('tab-append-row', ttrParams, evnt)
7637
+ return
7638
+ }
7639
+ }
7640
+ if (tabMethod) {
7641
+ tabMethod(ttrParams)
7642
+ } else {
7514
7643
  if (actived.row) {
7515
7644
  $xeTable.handleClearEdit(evnt)
7516
7645
  }
7517
- $xeTable.insertAt({}, -1).then(({ row: newRow }) => {
7518
- $xeTable.scrollToRow(newRow, newColumn)
7519
- $xeTable.handleSelected({ ...activeParams, row: newRow, column: newColumn }, evnt)
7520
- })
7521
- $xeTable.dispatchEvent('tab-append-row', ttrParams, evnt)
7522
- return
7523
- }
7524
- }
7525
- if (tabMethod) {
7526
- tabMethod(ttrParams)
7527
- } else {
7528
- if (actived.row) {
7529
- $xeTable.handleClearEdit(evnt)
7646
+ $xeTable.moveTabSelected(activeParams, hasShiftKey, evnt)
7530
7647
  }
7531
- $xeTable.moveTabSelected(activeParams, hasShiftKey, evnt)
7532
7648
  }
7533
7649
  }
7534
7650
  }
7535
- } else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selected.row || selected.column)) {
7651
+ } else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selected.row || selectColumn)) {
7536
7652
  // 如果是删除键
7537
7653
  if (!isEditStatus) {
7538
7654
  const { delMethod } = keyboardOpts
7539
7655
  const params = {
7540
7656
  row: selected.row,
7541
7657
  rowIndex: $xeTable.getRowIndex(selected.row),
7542
- column: selected.column,
7543
- columnIndex: $xeTable.getColumnIndex(selected.column),
7658
+ column: selectColumn as VxeTableDefines.ColumnInfo,
7659
+ columnIndex: $xeTable.getColumnIndex(selectColumn),
7544
7660
  $table: $xeTable,
7545
7661
  $grid: $xeGrid,
7546
7662
  $gantt: $xeGantt
@@ -7550,23 +7666,27 @@ const tableMethods: any = {
7550
7666
  if (delMethod) {
7551
7667
  delMethod(params)
7552
7668
  } else {
7553
- setCellValue(selected.row, selected.column, null)
7669
+ const selectCellValue = getCellValue(selected.row, selectColumn)
7670
+ if (selectCellValue !== null) {
7671
+ $xeTable.handlePushStack()
7672
+ setCellValue(selected.row, selectColumn, null)
7673
+ }
7554
7674
  }
7555
7675
  // 如果按下 del 键,更新表尾数据
7556
7676
  $xeTable.updateFooter()
7557
7677
  $xeTable.dispatchEvent('cell-delete-value', params, evnt)
7558
7678
  }
7559
7679
  }
7560
- } else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selected.row || selected.column)) {
7680
+ } else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selected.row || selectColumn)) {
7561
7681
  if (!isEditStatus) {
7562
- const { editMode, backMethod } = keyboardOpts
7682
+ const { backMethod } = keyboardOpts
7563
7683
  // 如果是删除键
7564
- if (keyboardOpts.isDel && isEnableConf(editConfig) && (selected.row || selected.column)) {
7684
+ if (keyboardOpts.isDel && isEnableConf(editConfig) && (selected.row || selectColumn)) {
7565
7685
  const params = {
7566
7686
  row: selected.row,
7567
7687
  rowIndex: $xeTable.getRowIndex(selected.row),
7568
- column: selected.column,
7569
- columnIndex: $xeTable.getColumnIndex(selected.column),
7688
+ column: selectColumn as VxeTableDefines.ColumnInfo,
7689
+ columnIndex: $xeTable.getColumnIndex(selectColumn),
7570
7690
  $table: $xeTable,
7571
7691
  $grid: $xeGrid,
7572
7692
  $gantt: $xeGantt
@@ -7576,11 +7696,9 @@ const tableMethods: any = {
7576
7696
  if (backMethod) {
7577
7697
  backMethod(params)
7578
7698
  } else {
7579
- // 追加方式与覆盖式
7580
- if (editMode !== 'insert') {
7581
- setCellValue(selected.row, selected.column, null)
7582
- }
7583
- $xeTable.handleEdit(selected.args, evnt)
7699
+ $xeTable.handleEdit(params, evnt, {
7700
+ isClear: true
7701
+ })
7584
7702
  }
7585
7703
  $xeTable.dispatchEvent('cell-backspace-value', params, evnt)
7586
7704
  }
@@ -7603,20 +7721,30 @@ const tableMethods: any = {
7603
7721
  .then(() => $xeTable.scrollToRow(parentRow))
7604
7722
  .then(() => $xeTable.triggerCurrentRowEvent(evnt, params))
7605
7723
  }
7724
+ } else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasEventInputTarget(evnt.target)) {
7725
+ if (isY || (hasShiftKey && isZ)) {
7726
+ // 恢复被撤销的操作:Ctrl + Y 或 Ctrl + Shift + Z
7727
+ evnt.preventDefault()
7728
+ $xeTable.handleRedoStackEvent(evnt)
7729
+ } else if (isZ) {
7730
+ // ‌撤销上一步操作‌:Ctrl + Z
7731
+ evnt.preventDefault()
7732
+ $xeTable.handleUndoStackEvent(evnt)
7733
+ }
7606
7734
  } else if (keyboardConfig && keyboardOpts.isEdit && !isControlKey && (isSpacebar || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
7607
- const { editMethod } = keyboardOpts
7735
+ const { editMode, editMethod } = keyboardOpts
7608
7736
  // 启用编辑后,空格键功能将失效
7609
7737
  // if (isSpacebar) {
7610
7738
  // evnt.preventDefault()
7611
7739
  // }
7612
7740
  // 如果是按下非功能键之外允许直接编辑
7613
- if (selected.column && selected.row && isEnableConf(selected.column.editRender)) {
7741
+ if (selectColumn && selected.row && isEnableConf(selectColumn.editRender)) {
7614
7742
  const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod
7615
7743
  const params = {
7616
7744
  row: selected.row,
7617
7745
  rowIndex: $xeTable.getRowIndex(selected.row),
7618
- column: selected.column,
7619
- columnIndex: $xeTable.getColumnIndex(selected.column),
7746
+ column: selectColumn,
7747
+ columnIndex: $xeTable.getColumnIndex(selectColumn),
7620
7748
  $table: $xeTable,
7621
7749
  $grid: $xeGrid,
7622
7750
  $gantt: $xeGantt
@@ -7625,8 +7753,14 @@ const tableMethods: any = {
7625
7753
  if (editMethod) {
7626
7754
  editMethod(params)
7627
7755
  } else {
7628
- setCellValue(selected.row, selected.column, null)
7629
- $xeTable.handleEdit(selected.args, evnt)
7756
+ let isClearValue = false
7757
+ // 追加方式与覆盖式
7758
+ if (editMode !== 'insert') {
7759
+ isClearValue = true
7760
+ }
7761
+ $xeTable.handleEdit(params, evnt, {
7762
+ isClear: isClearValue
7763
+ })
7630
7764
  }
7631
7765
  }
7632
7766
  }
@@ -8464,7 +8598,7 @@ const tableMethods: any = {
8464
8598
  reactData.isIndeterminate = halfSelect
8465
8599
  },
8466
8600
  checkSelectionStatus () {
8467
- const $xeTable = this
8601
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
8468
8602
 
8469
8603
  $xeTable.updateCheckboxStatus()
8470
8604
  $xeTable.updateAllCheckboxStatus()
@@ -8473,23 +8607,30 @@ const tableMethods: any = {
8473
8607
  * 获取单选框保留选中的行
8474
8608
  */
8475
8609
  getRadioReserveRecord (isFull: any) {
8476
- const { fullDataRowIdData, radioReserveRow, radioOpts, afterFullData, treeConfig, treeOpts } = this
8610
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
8611
+ const props = $xeTable
8612
+ const internalData = $xeTable as unknown as TableInternalData
8613
+
8614
+ const { treeConfig } = props
8615
+ const { fullDataRowIdData, radioReserveRow, afterFullData } = internalData
8616
+ const radioOpts = $xeTable.computeRadioOpts
8617
+ const treeOpts = $xeTable.computeTreeOpts
8477
8618
  const childrenField = treeOpts.children || treeOpts.childrenField
8478
8619
  if (radioOpts.reserve && radioReserveRow) {
8479
- const rowid = getRowid(this, radioReserveRow)
8620
+ const rowid = getRowid($xeTable, radioReserveRow)
8480
8621
  if (isFull) {
8481
8622
  if (!fullDataRowIdData[rowid]) {
8482
8623
  return radioReserveRow
8483
8624
  }
8484
8625
  } else {
8485
- const rowkey = getRowkey(this)
8626
+ const rowkey = getRowkey($xeTable)
8486
8627
  if (treeConfig) {
8487
8628
  const matchObj = XEUtils.findTree(afterFullData, row => rowid === XEUtils.get(row, rowkey), { children: childrenField })
8488
8629
  if (matchObj) {
8489
8630
  return radioReserveRow
8490
8631
  }
8491
8632
  } else {
8492
- if (!afterFullData.some((row: any) => rowid === XEUtils.get(row, rowkey))) {
8633
+ if (!afterFullData.some((row) => rowid === XEUtils.get(row, rowkey))) {
8493
8634
  return radioReserveRow
8494
8635
  }
8495
8636
  }
@@ -9521,6 +9662,7 @@ const tableMethods: any = {
9521
9662
  tableFullData.splice(ntfIndex, 0, dragRow)
9522
9663
  }
9523
9664
 
9665
+ $xeTable.handleClearStack()
9524
9666
  $xeTable.handleTableData(treeConfig && transform)
9525
9667
  $xeTable.cacheRowMap(false)
9526
9668
  updateScrollYStatus($xeTable)
@@ -10236,6 +10378,7 @@ const tableMethods: any = {
10236
10378
  }
10237
10379
  })
10238
10380
 
10381
+ $xeTable.handleClearStack()
10239
10382
  if (mouseConfig) {
10240
10383
  if ($xeTable.clearSelected) {
10241
10384
  $xeTable.clearSelected()
@@ -12859,11 +13002,75 @@ const tableMethods: any = {
12859
13002
 
12860
13003
  return loadTableData($xeTable, internalData.tableSynchData, false, true)
12861
13004
  },
13005
+ handlePushStack () {
13006
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13007
+ const internalData = $xeTable as unknown as TableInternalData
13008
+
13009
+ const keyboardOpts = $xeTable.computeKeyboardOpts
13010
+ if (!keyboardOpts.isUndoRedo) {
13011
+ return
13012
+ }
13013
+ const { stackHistoryStore } = internalData
13014
+ const stackObj = getSnapshotStackData($xeTable)
13015
+ stackHistoryStore.undoStacks.push(stackObj)
13016
+ stackHistoryStore.redoStacks = []
13017
+ truncateStackHistory($xeTable)
13018
+ },
13019
+ handleUndoStackEvent (evnt: KeyboardEvent) {
13020
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13021
+ const internalData = $xeTable as unknown as TableInternalData
13022
+
13023
+ const { stackHistoryStore } = internalData
13024
+ const { undoStacks, redoStacks } = stackHistoryStore
13025
+ if (undoStacks.length) {
13026
+ const stackObj = getSnapshotStackData($xeTable)
13027
+ redoStacks.push(stackObj)
13028
+ handleUpdateSnapshotStackData($xeTable, undoStacks.pop())
13029
+ if (evnt) {
13030
+ $xeTable.dispatchEvent('undo', {}, evnt)
13031
+ }
13032
+ return $xeTable.$nextTick(() => {
13033
+ return { status: true }
13034
+ })
13035
+ }
13036
+ return Promise.resolve({ status: false })
13037
+ },
13038
+ handleRedoStackEvent (evnt: KeyboardEvent) {
13039
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13040
+ const internalData = $xeTable as unknown as TableInternalData
13041
+
13042
+ const { stackHistoryStore } = internalData
13043
+ const { undoStacks, redoStacks } = stackHistoryStore
13044
+ if (redoStacks.length) {
13045
+ const stackObj = getSnapshotStackData($xeTable)
13046
+ undoStacks.push(stackObj)
13047
+ handleUpdateSnapshotStackData($xeTable, redoStacks.pop())
13048
+ if (evnt) {
13049
+ $xeTable.dispatchEvent('redo', {}, evnt)
13050
+ }
13051
+ return $xeTable.$nextTick(() => {
13052
+ return { status: true }
13053
+ })
13054
+ }
13055
+ return Promise.resolve({ status: false })
13056
+ },
13057
+ handleClearStack () {
13058
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13059
+ const internalData = $xeTable as unknown as TableInternalData
13060
+
13061
+ const { stackHistoryStore } = internalData
13062
+ stackHistoryStore.undoStacks = []
13063
+ stackHistoryStore.redoStacks = []
13064
+ },
12862
13065
  updateZindex () {
12863
- if (this.zIndex) {
12864
- this.tZindex = this.zIndex
12865
- } else if (this.tZindex < getLastZIndex()) {
12866
- this.tZindex = nextZIndex()
13066
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13067
+ const props = $xeTable
13068
+ const internalData = $xeTable as unknown as TableInternalData
13069
+
13070
+ if (props.zIndex) {
13071
+ internalData.tZindex = props.zIndex
13072
+ } else if (internalData.tZindex < getLastZIndex()) {
13073
+ internalData.tZindex = nextZIndex()
12867
13074
  }
12868
13075
  },
12869
13076
  updateCellAreas () {
@@ -12877,6 +13084,16 @@ const tableMethods: any = {
12877
13084
  }
12878
13085
  return $xeTable.$nextTick()
12879
13086
  },
13087
+ undo () {
13088
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13089
+
13090
+ return $xeTable.handleUndoStackEvent(null)
13091
+ },
13092
+ redo () {
13093
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13094
+
13095
+ return $xeTable.handleRedoStackEvent(null)
13096
+ },
12880
13097
  dispatchEvent (type: ValueOf<VxeTableEmits>, params: Record<string, any>, evnt: Event | null) {
12881
13098
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
12882
13099
  const $xeGrid = $xeTable.$xeGrid
@@ -12891,19 +13108,27 @@ const tableMethods: any = {
12891
13108
  $xeTable.dispatchEvent(type, params, evnt)
12892
13109
  },
12893
13110
  focus () {
12894
- this.isActivated = true
12895
- return this.$nextTick()
13111
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13112
+ const internalData = $xeTable as unknown as TableInternalData
13113
+
13114
+ internalData.isActivated = true
13115
+ return $xeTable.$nextTick()
12896
13116
  },
12897
13117
  blur () {
12898
- this.isActivated = false
12899
- return this.$nextTick()
13118
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13119
+ const internalData = $xeTable as unknown as TableInternalData
13120
+
13121
+ internalData.isActivated = false
13122
+ return $xeTable.$nextTick()
12900
13123
  },
12901
13124
  /**
12902
13125
  * 已废弃,被 connectToolbar 替换
12903
13126
  * @deprecated
12904
13127
  */
12905
13128
  connect ($toolbar: VxeToolbarConstructor | VxeToolbarInstance) {
12906
- return this.connectToolbar($toolbar)
13129
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13130
+
13131
+ return $xeTable.connectToolbar($toolbar)
12907
13132
  },
12908
13133
  /**
12909
13134
  * 连接工具栏
@@ -12911,14 +13136,15 @@ const tableMethods: any = {
12911
13136
  */
12912
13137
  connectToolbar ($toolbar: VxeToolbarConstructor | VxeToolbarInstance) {
12913
13138
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13139
+ const internalData = $xeTable as unknown as TableInternalData
12914
13140
 
12915
13141
  if ($toolbar && $toolbar.syncUpdate) {
12916
- $toolbar.syncUpdate({ collectColumn: this.collectColumn, $table: $xeTable })
13142
+ $toolbar.syncUpdate({ collectColumn: internalData.collectColumn, $table: $xeTable })
12917
13143
  this.$toolbar = $toolbar
12918
13144
  } else {
12919
13145
  errLog('vxe.error.barUnableLink')
12920
13146
  }
12921
- return this.$nextTick()
13147
+ return $xeTable.$nextTick()
12922
13148
  },
12923
13149
  handleConnectGanttView ($ganttView: any) {
12924
13150
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
@@ -12939,17 +13165,21 @@ const tableMethods: any = {
12939
13165
  * @deprecated
12940
13166
  */
12941
13167
  getCell (row: any, column: any) {
12942
- return this.getCellElement(row, column)
13168
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13169
+
13170
+ return $xeTable.getCellElement(row, column)
12943
13171
  },
12944
13172
  findRowIndexOf (list: any, row: any) {
12945
13173
  return row ? XEUtils.findIndexOf(list, item => this.eqRow(item, row)) : -1
12946
13174
  },
12947
13175
  eqRow (row1: any, row2: any) {
13176
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
13177
+
12948
13178
  if (row1 && row2) {
12949
13179
  if (row1 === row2) {
12950
13180
  return true
12951
13181
  }
12952
- return getRowid(this, row1) === getRowid(this, row2)
13182
+ return getRowid($xeTable, row1) === getRowid($xeTable, row2)
12953
13183
  }
12954
13184
  return false
12955
13185
  },