vxe-table 3.15.10 → 3.15.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/locale/lang/ar-EG.js +511 -511
- package/es/locale/lang/de-DE.js +280 -280
- package/es/locale/lang/en-US.js +206 -206
- package/es/locale/lang/es-ES.js +494 -501
- package/es/locale/lang/fr-FR.js +517 -517
- package/es/locale/lang/hu-HU.js +372 -372
- package/es/locale/lang/id-ID.js +529 -529
- package/es/locale/lang/it-IT.js +297 -297
- package/es/locale/lang/ja-JP.js +454 -454
- package/es/locale/lang/ko-KR.js +415 -415
- package/es/locale/lang/nb-NO.js +515 -515
- package/es/locale/lang/pt-BR.js +505 -505
- package/es/locale/lang/ru-RU.js +326 -326
- package/es/locale/lang/th-TH.js +255 -255
- package/es/locale/lang/uk-UA.js +450 -450
- package/es/locale/lang/vi-VN.js +528 -528
- package/es/locale/lang/zh-CHT.js +155 -155
- package/es/style.css +1 -1
- package/es/table/src/methods.js +48 -48
- package/es/table/src/util.js +12 -16
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +63 -75
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +511 -511
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +280 -280
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +206 -206
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +206 -206
- package/lib/locale/lang/es-ES.js +494 -501
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +494 -501
- package/lib/locale/lang/fr-FR.js +517 -517
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +372 -372
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +372 -372
- package/lib/locale/lang/id-ID.js +529 -529
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +297 -297
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +454 -454
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +454 -454
- package/lib/locale/lang/ko-KR.js +415 -415
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +415 -415
- package/lib/locale/lang/nb-NO.js +515 -515
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +505 -505
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +505 -505
- package/lib/locale/lang/ru-RU.js +326 -326
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +326 -326
- package/lib/locale/lang/th-TH.js +255 -255
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +450 -450
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +450 -450
- package/lib/locale/lang/vi-VN.js +528 -528
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +155 -155
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +155 -155
- package/lib/style.css +1 -1
- package/lib/table/src/methods.js +49 -57
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/util.js +12 -16
- 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 +2 -2
- package/packages/locale/lang/ar-EG.ts +511 -511
- package/packages/locale/lang/de-DE.ts +281 -282
- package/packages/locale/lang/en-US.ts +206 -206
- package/packages/locale/lang/es-ES.ts +494 -503
- package/packages/locale/lang/fr-FR.ts +517 -517
- package/packages/locale/lang/hu-HU.ts +372 -372
- package/packages/locale/lang/id-ID.ts +529 -529
- package/packages/locale/lang/it-IT.ts +297 -297
- package/packages/locale/lang/ja-JP.ts +454 -454
- package/packages/locale/lang/ko-KR.ts +415 -415
- package/packages/locale/lang/nb-NO.ts +515 -515
- package/packages/locale/lang/pt-BR.ts +505 -505
- package/packages/locale/lang/ru-RU.ts +326 -326
- package/packages/locale/lang/th-TH.ts +255 -255
- package/packages/locale/lang/uk-UA.ts +450 -450
- package/packages/locale/lang/vi-VN.ts +528 -528
- package/packages/locale/lang/zh-CHT.ts +155 -155
- package/packages/table/src/methods.ts +59 -55
- package/packages/table/src/util.ts +12 -17
- /package/es/{iconfont.1745546354510.ttf → iconfont.1745723938260.ttf} +0 -0
- /package/es/{iconfont.1745546354510.woff → iconfont.1745723938260.woff} +0 -0
- /package/es/{iconfont.1745546354510.woff2 → iconfont.1745723938260.woff2} +0 -0
- /package/lib/{iconfont.1745546354510.ttf → iconfont.1745723938260.ttf} +0 -0
- /package/lib/{iconfont.1745546354510.woff → iconfont.1745723938260.woff} +0 -0
- /package/lib/{iconfont.1745546354510.woff2 → iconfont.1745723938260.woff2} +0 -0
|
@@ -7463,9 +7463,9 @@ const Methods = {
|
|
|
7463
7463
|
* 如果是双击模式,则激活为编辑状态
|
|
7464
7464
|
*/
|
|
7465
7465
|
triggerCellDblclickEvent (evnt: MouseEvent, params: VxeTableDefines.CellRenderBodyParams) {
|
|
7466
|
-
const $xeTable = this
|
|
7466
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7467
7467
|
const props = $xeTable
|
|
7468
|
-
const reactData = $xeTable
|
|
7468
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
7469
7469
|
|
|
7470
7470
|
const { editConfig } = props
|
|
7471
7471
|
const { editStore, isDragResize } = reactData
|
|
@@ -7482,12 +7482,12 @@ const Methods = {
|
|
|
7482
7482
|
checkValidate($xeTable, 'blur')
|
|
7483
7483
|
.catch((e: any) => e)
|
|
7484
7484
|
.then(() => {
|
|
7485
|
-
|
|
7485
|
+
$xeTable.handleEdit(params, evnt)
|
|
7486
7486
|
.then(() => checkValidate($xeTable, 'change'))
|
|
7487
7487
|
.catch((e: any) => e)
|
|
7488
7488
|
})
|
|
7489
7489
|
} else if (editOpts.mode === 'cell') {
|
|
7490
|
-
|
|
7490
|
+
$xeTable.handleEdit(params, evnt)
|
|
7491
7491
|
.then(() => checkValidate($xeTable, 'change'))
|
|
7492
7492
|
.catch((e: any) => e)
|
|
7493
7493
|
}
|
|
@@ -7496,7 +7496,7 @@ const Methods = {
|
|
|
7496
7496
|
this.emitEvent('cell-dblclick', params, evnt)
|
|
7497
7497
|
},
|
|
7498
7498
|
handleColumnSortEvent (evnt: any, column: any) {
|
|
7499
|
-
const $xeTable = this
|
|
7499
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7500
7500
|
const props = $xeTable
|
|
7501
7501
|
|
|
7502
7502
|
const { mouseConfig } = props
|
|
@@ -7514,7 +7514,7 @@ const Methods = {
|
|
|
7514
7514
|
* 点击排序事件
|
|
7515
7515
|
*/
|
|
7516
7516
|
triggerSortEvent (evnt: Event, column: VxeTableDefines.ColumnInfo, order: VxeTablePropTypes.SortOrder) {
|
|
7517
|
-
const $xeTable = this
|
|
7517
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7518
7518
|
|
|
7519
7519
|
const sortOpts = $xeTable.computeSortOpts
|
|
7520
7520
|
const { multiple, allowClear } = sortOpts
|
|
@@ -7534,7 +7534,7 @@ const Methods = {
|
|
|
7534
7534
|
row: any
|
|
7535
7535
|
column: VxeTableDefines.ColumnInfo
|
|
7536
7536
|
}, cellValue?: any) {
|
|
7537
|
-
const $xeTable = this
|
|
7537
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7538
7538
|
const reactData = $xeTable as unknown as TableReactData
|
|
7539
7539
|
|
|
7540
7540
|
const { validStore } = reactData
|
|
@@ -7566,7 +7566,7 @@ const Methods = {
|
|
|
7566
7566
|
* 表头单元格按下事件
|
|
7567
7567
|
*/
|
|
7568
7568
|
triggerHeaderCellMousedownEvent (evnt: any, params: any) {
|
|
7569
|
-
const $xeTable = this
|
|
7569
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7570
7570
|
const props = $xeTable
|
|
7571
7571
|
|
|
7572
7572
|
const { mouseConfig } = props
|
|
@@ -7600,7 +7600,7 @@ const Methods = {
|
|
|
7600
7600
|
* 单元格按下事件
|
|
7601
7601
|
*/
|
|
7602
7602
|
triggerCellMousedownEvent (evnt: any, params: any) {
|
|
7603
|
-
const $xeTable = this
|
|
7603
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7604
7604
|
|
|
7605
7605
|
const { column } = params
|
|
7606
7606
|
const { type, treeNode } = column
|
|
@@ -8382,7 +8382,7 @@ const Methods = {
|
|
|
8382
8382
|
sort (sortConfs: any, sortOrder: any) {
|
|
8383
8383
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8384
8384
|
|
|
8385
|
-
const
|
|
8385
|
+
const sortOpts = $xeTable.computeSortOpts
|
|
8386
8386
|
const { multiple, remote, orders } = sortOpts
|
|
8387
8387
|
if (sortConfs) {
|
|
8388
8388
|
if (XEUtils.isString(sortConfs)) {
|
|
@@ -8397,20 +8397,20 @@ const Methods = {
|
|
|
8397
8397
|
if (sortConfs.length) {
|
|
8398
8398
|
let firstSortColumn: any
|
|
8399
8399
|
if (!multiple) {
|
|
8400
|
-
clearAllSort(
|
|
8400
|
+
clearAllSort($xeTable)
|
|
8401
8401
|
}
|
|
8402
8402
|
(multiple ? sortConfs : [sortConfs[0]]).forEach((confs: any, index: any) => {
|
|
8403
8403
|
let { field, order } = confs
|
|
8404
8404
|
let column = field
|
|
8405
8405
|
if (XEUtils.isString(field)) {
|
|
8406
|
-
column =
|
|
8406
|
+
column = $xeTable.getColumnByField(field)
|
|
8407
8407
|
}
|
|
8408
8408
|
if (column && (column.sortable || column.remoteSort)) {
|
|
8409
8409
|
if (!firstSortColumn) {
|
|
8410
8410
|
firstSortColumn = column
|
|
8411
8411
|
}
|
|
8412
|
-
if (orders.indexOf(order) === -1) {
|
|
8413
|
-
order = getNextSortOrder(
|
|
8412
|
+
if (orders && orders.indexOf(order) === -1) {
|
|
8413
|
+
order = getNextSortOrder($xeTable, column)
|
|
8414
8414
|
}
|
|
8415
8415
|
if (column.order !== order) {
|
|
8416
8416
|
column.order = order
|
|
@@ -8420,17 +8420,18 @@ const Methods = {
|
|
|
8420
8420
|
})
|
|
8421
8421
|
// 如果是服务端排序,则跳过本地排序处理
|
|
8422
8422
|
if (!remote || (firstSortColumn && firstSortColumn.remoteSort)) {
|
|
8423
|
-
|
|
8423
|
+
$xeTable.handleTableData(true)
|
|
8424
8424
|
}
|
|
8425
|
-
return
|
|
8426
|
-
|
|
8425
|
+
return $xeTable.$nextTick().then(() => {
|
|
8426
|
+
updateRowOffsetTop($xeTable)
|
|
8427
|
+
$xeTable.updateCellAreas()
|
|
8427
8428
|
return updateStyle($xeTable)
|
|
8428
8429
|
})
|
|
8429
8430
|
}
|
|
8430
|
-
return
|
|
8431
|
+
return $xeTable.$nextTick()
|
|
8431
8432
|
},
|
|
8432
8433
|
setSort (sortConfs: VxeTableDefines.SortConfs | VxeTableDefines.SortConfs[], isUpdate?: boolean) {
|
|
8433
|
-
const $xeTable = this
|
|
8434
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8434
8435
|
|
|
8435
8436
|
const sortOpts = $xeTable.computeSortOpts
|
|
8436
8437
|
const { multiple, remote, orders } = sortOpts
|
|
@@ -8453,7 +8454,7 @@ const Methods = {
|
|
|
8453
8454
|
firstColumn = column
|
|
8454
8455
|
}
|
|
8455
8456
|
if (column && column.sortable) {
|
|
8456
|
-
if (orders.indexOf(order) === -1) {
|
|
8457
|
+
if (orders && orders.indexOf(order) === -1) {
|
|
8457
8458
|
order = getNextSortOrder($xeTable, column)
|
|
8458
8459
|
}
|
|
8459
8460
|
if (column.order !== order) {
|
|
@@ -8469,6 +8470,7 @@ const Methods = {
|
|
|
8469
8470
|
$xeTable.handleColumnSortEvent(new Event('click'), firstColumn)
|
|
8470
8471
|
}
|
|
8471
8472
|
return $xeTable.$nextTick().then(() => {
|
|
8473
|
+
updateRowOffsetTop($xeTable)
|
|
8472
8474
|
$xeTable.updateCellAreas()
|
|
8473
8475
|
return updateStyle($xeTable)
|
|
8474
8476
|
})
|
|
@@ -8481,21 +8483,24 @@ const Methods = {
|
|
|
8481
8483
|
* @param {String} column 列或字段名
|
|
8482
8484
|
*/
|
|
8483
8485
|
clearSort (fieldOrColumn: any) {
|
|
8484
|
-
const $xeTable = this
|
|
8486
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8485
8487
|
|
|
8486
|
-
const
|
|
8488
|
+
const sortOpts = $xeTable.computeSortOpts
|
|
8487
8489
|
if (fieldOrColumn) {
|
|
8488
|
-
const column = handleFieldOrColumn(
|
|
8490
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
8489
8491
|
if (column) {
|
|
8490
8492
|
column.order = null
|
|
8491
8493
|
}
|
|
8492
8494
|
} else {
|
|
8493
|
-
clearAllSort(
|
|
8495
|
+
clearAllSort($xeTable)
|
|
8494
8496
|
}
|
|
8495
8497
|
if (!sortOpts.remote) {
|
|
8496
|
-
|
|
8498
|
+
$xeTable.handleTableData(true)
|
|
8497
8499
|
}
|
|
8498
|
-
return
|
|
8500
|
+
return $xeTable.$nextTick().then(() => {
|
|
8501
|
+
updateRowOffsetTop($xeTable)
|
|
8502
|
+
return updateStyle($xeTable)
|
|
8503
|
+
})
|
|
8499
8504
|
},
|
|
8500
8505
|
// 在 v3 中废弃
|
|
8501
8506
|
getSortColumn () {
|
|
@@ -9878,47 +9883,45 @@ const Methods = {
|
|
|
9878
9883
|
*/
|
|
9879
9884
|
scrollTo (scrollLeft: number | null, scrollTop?: number | null) {
|
|
9880
9885
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
9886
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
9881
9887
|
const internalData = $xeTable as unknown as TableInternalData
|
|
9882
9888
|
|
|
9883
|
-
const {
|
|
9884
|
-
const
|
|
9885
|
-
const
|
|
9886
|
-
const
|
|
9887
|
-
const
|
|
9888
|
-
const
|
|
9889
|
-
const
|
|
9889
|
+
const { elemStore } = internalData
|
|
9890
|
+
const headerScrollElem = getRefElem(elemStore['main-header-scroll'])
|
|
9891
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
|
|
9892
|
+
const footerScrollElem = getRefElem(elemStore['main-footer-scroll'])
|
|
9893
|
+
const leftScrollElem = getRefElem(elemStore['left-body-scroll'])
|
|
9894
|
+
const rightScrollElem = getRefElem(elemStore['right-body-scroll'])
|
|
9895
|
+
const xHandleEl = $xeTable.$refs.refScrollXHandleElem as HTMLDivElement
|
|
9896
|
+
const yHandleEl = $xeTable.$refs.refScrollYHandleElem as HTMLDivElement
|
|
9897
|
+
|
|
9890
9898
|
internalData.intoRunScroll = true
|
|
9899
|
+
|
|
9891
9900
|
if (XEUtils.isNumber(scrollLeft)) {
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
setScrollLeft(tableHeaderElem, scrollLeft)
|
|
9898
|
-
setScrollLeft(tableFooterElem, scrollLeft)
|
|
9899
|
-
}
|
|
9901
|
+
setScrollLeft(xHandleEl, scrollLeft)
|
|
9902
|
+
setScrollLeft(bodyScrollElem, scrollLeft)
|
|
9903
|
+
setScrollLeft(headerScrollElem, scrollLeft)
|
|
9904
|
+
setScrollLeft(footerScrollElem, scrollLeft)
|
|
9905
|
+
loadScrollXData($xeTable)
|
|
9900
9906
|
}
|
|
9901
9907
|
if (XEUtils.isNumber(scrollTop)) {
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
setScrollTop(leftBodyElem, scrollTop)
|
|
9908
|
-
setScrollTop(rightBodyElem, scrollTop)
|
|
9909
|
-
}
|
|
9908
|
+
setScrollTop(yHandleEl, scrollTop)
|
|
9909
|
+
setScrollTop(bodyScrollElem, scrollTop)
|
|
9910
|
+
setScrollTop(leftScrollElem, scrollTop)
|
|
9911
|
+
setScrollTop(rightScrollElem, scrollTop)
|
|
9912
|
+
loadScrollYData($xeTable)
|
|
9910
9913
|
}
|
|
9911
|
-
if (
|
|
9914
|
+
if (reactData.scrollXLoad || reactData.scrollYLoad) {
|
|
9912
9915
|
return new Promise<void>(resolve => {
|
|
9913
9916
|
setTimeout(() => {
|
|
9914
9917
|
$xeTable.$nextTick(() => {
|
|
9915
9918
|
internalData.intoRunScroll = false
|
|
9916
9919
|
resolve()
|
|
9917
9920
|
})
|
|
9918
|
-
})
|
|
9921
|
+
}, 30)
|
|
9919
9922
|
})
|
|
9920
9923
|
}
|
|
9921
|
-
return
|
|
9924
|
+
return $xeTable.$nextTick()
|
|
9922
9925
|
},
|
|
9923
9926
|
/**
|
|
9924
9927
|
* 如果有滚动条,则滚动到对应的行
|
|
@@ -9927,15 +9930,16 @@ const Methods = {
|
|
|
9927
9930
|
*/
|
|
9928
9931
|
scrollToRow (row: any, fieldOrColumn?: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo) {
|
|
9929
9932
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
9933
|
+
const props = $xeTable
|
|
9930
9934
|
const reactData = $xeTable as unknown as TableReactData
|
|
9931
9935
|
|
|
9932
9936
|
const { isAllOverflow, scrollYLoad, scrollXLoad } = reactData
|
|
9933
9937
|
const rest = []
|
|
9934
9938
|
if (row) {
|
|
9935
|
-
if (
|
|
9936
|
-
rest.push(
|
|
9939
|
+
if (props.treeConfig) {
|
|
9940
|
+
rest.push($xeTable.scrollToTreeRow(row))
|
|
9937
9941
|
} else {
|
|
9938
|
-
rest.push(rowToVisible(
|
|
9942
|
+
rest.push(rowToVisible($xeTable, row))
|
|
9939
9943
|
}
|
|
9940
9944
|
}
|
|
9941
9945
|
if (fieldOrColumn) {
|
|
@@ -72,23 +72,18 @@ export const convertHeaderColumnToRows = (originColumns: any) => {
|
|
|
72
72
|
export function restoreScrollLocation ($xeTable: VxeTableConstructor, scrollLeft: number, scrollTop: number) {
|
|
73
73
|
const internalData = $xeTable as unknown as TableInternalData
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
internalData.scrollRenderType = ''
|
|
88
|
-
// 还原滚动状态
|
|
89
|
-
return $xeTable.scrollTo(scrollLeft, scrollTop)
|
|
90
|
-
}
|
|
91
|
-
})
|
|
75
|
+
if (scrollLeft || scrollTop) {
|
|
76
|
+
internalData.intoRunScroll = false
|
|
77
|
+
internalData.inVirtualScroll = false
|
|
78
|
+
internalData.inWheelScroll = false
|
|
79
|
+
internalData.inHeaderScroll = false
|
|
80
|
+
internalData.inBodyScroll = false
|
|
81
|
+
internalData.inFooterScroll = false
|
|
82
|
+
internalData.scrollRenderType = ''
|
|
83
|
+
// 还原滚动状态
|
|
84
|
+
return $xeTable.scrollTo(scrollLeft, scrollTop)
|
|
85
|
+
}
|
|
86
|
+
return $xeTable.$nextTick()
|
|
92
87
|
}
|
|
93
88
|
|
|
94
89
|
export function toTreePathSeq (path: any) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|