vxe-table 4.23.17 → 4.23.18
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/dist/all.esm.js +143 -98
- package/dist/all.esm.min.js +3 -3
- package/es/grid/src/grid.js +0 -8
- package/es/table/module/edit/hook.js +83 -81
- package/es/table/src/table.js +58 -7
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +0 -8
- package/lib/index.umd.js +143 -98
- package/lib/index.umd.min.js +3 -3
- package/lib/table/module/edit/hook.js +83 -81
- package/lib/table/src/table.js +58 -7
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +0 -9
- package/packages/table/module/edit/hook.ts +95 -84
- package/packages/table/src/table.ts +64 -10
- /package/dist/{iconfont.1794294436168.ttf → iconfont.1794366305845.ttf} +0 -0
- /package/dist/{iconfont.1794294436168.woff → iconfont.1794366305845.woff} +0 -0
- /package/dist/{iconfont.1794294436168.woff2 → iconfont.1794366305845.woff2} +0 -0
- /package/es/{iconfont.1794294436168.ttf → iconfont.1794366305845.ttf} +0 -0
- /package/es/{iconfont.1794294436168.woff → iconfont.1794366305845.woff} +0 -0
- /package/es/{iconfont.1794294436168.woff2 → iconfont.1794366305845.woff2} +0 -0
- /package/lib/{iconfont.1794294436168.ttf → iconfont.1794366305845.ttf} +0 -0
- /package/lib/{iconfont.1794294436168.woff → iconfont.1794366305845.woff} +0 -0
- /package/lib/{iconfont.1794294436168.woff2 → iconfont.1794366305845.woff2} +0 -0
|
@@ -9104,7 +9104,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9104
9104
|
const operArrow = isLeftArrow || isUpArrow || isRightArrow || isDwArrow
|
|
9105
9105
|
const operCtxMenu = isContentMenu && ctxMenuStore.visible && (isEnter || isSpacebar || operArrow)
|
|
9106
9106
|
const isEditStatus = isEnableConf(editConfig) && actived.column && actived.row
|
|
9107
|
-
const
|
|
9107
|
+
const beforeEditFn = editOpts.beforeEditMethod || editOpts.activeMethod
|
|
9108
|
+
const beforeEditAsyncFn = editOpts.beforeEditAsyncMethod
|
|
9108
9109
|
const selectRow = selected.row
|
|
9109
9110
|
const selectColumn = selected.column
|
|
9110
9111
|
if (operCtxMenu) {
|
|
@@ -9355,8 +9356,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9355
9356
|
$grid: $xeGrid,
|
|
9356
9357
|
$gantt: $xeGantt
|
|
9357
9358
|
}
|
|
9358
|
-
|
|
9359
|
-
|
|
9359
|
+
|
|
9360
|
+
const handleEdit = () => {
|
|
9360
9361
|
if (delMethod) {
|
|
9361
9362
|
delMethod(params)
|
|
9362
9363
|
} else {
|
|
@@ -9370,6 +9371,21 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9370
9371
|
$xeTable.updateFooter()
|
|
9371
9372
|
dispatchEvent('cell-delete-value', params, evnt)
|
|
9372
9373
|
}
|
|
9374
|
+
|
|
9375
|
+
// 是否被禁用
|
|
9376
|
+
if (beforeEditFn) {
|
|
9377
|
+
if (beforeEditFn(params)) {
|
|
9378
|
+
handleEdit()
|
|
9379
|
+
}
|
|
9380
|
+
} else if (beforeEditAsyncFn) {
|
|
9381
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
9382
|
+
if (status) {
|
|
9383
|
+
handleEdit()
|
|
9384
|
+
}
|
|
9385
|
+
}).catch(() => {})
|
|
9386
|
+
} else {
|
|
9387
|
+
handleEdit()
|
|
9388
|
+
}
|
|
9373
9389
|
}
|
|
9374
9390
|
} else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
9375
9391
|
if (!isEditStatus) {
|
|
@@ -9389,8 +9405,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9389
9405
|
$grid: $xeGrid,
|
|
9390
9406
|
$gantt: $xeGantt
|
|
9391
9407
|
}
|
|
9392
|
-
|
|
9393
|
-
|
|
9408
|
+
|
|
9409
|
+
const handleEdit = () => {
|
|
9394
9410
|
if (backMethod) {
|
|
9395
9411
|
backMethod(params)
|
|
9396
9412
|
} else {
|
|
@@ -9400,6 +9416,21 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9400
9416
|
}
|
|
9401
9417
|
dispatchEvent('cell-backspace-value', params, evnt)
|
|
9402
9418
|
}
|
|
9419
|
+
|
|
9420
|
+
// 是否被禁用
|
|
9421
|
+
if (beforeEditFn) {
|
|
9422
|
+
if (beforeEditFn(params)) {
|
|
9423
|
+
handleEdit()
|
|
9424
|
+
}
|
|
9425
|
+
} else if (beforeEditAsyncFn) {
|
|
9426
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
9427
|
+
if (status) {
|
|
9428
|
+
handleEdit()
|
|
9429
|
+
}
|
|
9430
|
+
}).catch(() => {})
|
|
9431
|
+
} else {
|
|
9432
|
+
handleEdit()
|
|
9433
|
+
}
|
|
9403
9434
|
}
|
|
9404
9435
|
}
|
|
9405
9436
|
} else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
@@ -9446,7 +9477,6 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9446
9477
|
// }
|
|
9447
9478
|
// 如果是按下非功能键之外允许直接编辑
|
|
9448
9479
|
if (selectColumn && selectRow && isEnableConf(selectColumn.editRender)) {
|
|
9449
|
-
const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod
|
|
9450
9480
|
const params = {
|
|
9451
9481
|
row: selectRow,
|
|
9452
9482
|
rowIndex: $xeTable.getRowIndex(selectRow),
|
|
@@ -9460,7 +9490,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9460
9490
|
$grid: $xeGrid,
|
|
9461
9491
|
$gantt: $xeGantt
|
|
9462
9492
|
}
|
|
9463
|
-
|
|
9493
|
+
|
|
9494
|
+
const handleEdit = () => {
|
|
9464
9495
|
if (editMethod) {
|
|
9465
9496
|
editMethod(params)
|
|
9466
9497
|
} else {
|
|
@@ -9474,6 +9505,21 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9474
9505
|
})
|
|
9475
9506
|
}
|
|
9476
9507
|
}
|
|
9508
|
+
|
|
9509
|
+
// 是否被禁用
|
|
9510
|
+
if (beforeEditFn) {
|
|
9511
|
+
if (beforeEditFn(params)) {
|
|
9512
|
+
handleEdit()
|
|
9513
|
+
}
|
|
9514
|
+
} else if (beforeEditAsyncFn) {
|
|
9515
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
9516
|
+
if (status) {
|
|
9517
|
+
handleEdit()
|
|
9518
|
+
}
|
|
9519
|
+
}).catch(() => {})
|
|
9520
|
+
} else {
|
|
9521
|
+
handleEdit()
|
|
9522
|
+
}
|
|
9477
9523
|
}
|
|
9478
9524
|
}
|
|
9479
9525
|
dispatchEvent('keydown', {}, evnt)
|
|
@@ -15659,7 +15705,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
15659
15705
|
const importOpts = computeImportOpts.value
|
|
15660
15706
|
// const currentRowOpts = computeCurrentRowOpts.value
|
|
15661
15707
|
// const currentColumnOpts = computeCurrentColumnOpts.value
|
|
15662
|
-
|
|
15708
|
+
const keyboardOpts = computeKeyboardOpts.value
|
|
15663
15709
|
const rowDragOpts = computeRowDragOpts.value
|
|
15664
15710
|
const areaOpts = computeAreaOpts.value
|
|
15665
15711
|
const sortOpts = computeSortOpts.value
|
|
@@ -15845,8 +15891,16 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
15845
15891
|
if (mouseOpts.area && props.treeConfig && !treeOpts.transform) {
|
|
15846
15892
|
errLog('vxe.error.notSupportProp', ['mouse-config.area', 'tree-config.transform=false', 'tree-config.transform=true'])
|
|
15847
15893
|
}
|
|
15848
|
-
if (props.editConfig
|
|
15849
|
-
|
|
15894
|
+
if (props.editConfig) {
|
|
15895
|
+
if (editOpts.activeMethod) {
|
|
15896
|
+
warnLog('vxe.error.delProp', ['edit-config.activeMethod', 'edit-config.beforeEditMethod'])
|
|
15897
|
+
}
|
|
15898
|
+
if (editOpts.beforeEditMethod && editOpts.beforeEditAsyncMethod) {
|
|
15899
|
+
errLog('vxe.error.errConflicts', ['edit-config.beforeEditMethod', 'edit-config.beforeEditAsyncMethod'])
|
|
15900
|
+
}
|
|
15901
|
+
if (keyboardOpts.isEdit && editOpts.beforeEditAsyncMethod) {
|
|
15902
|
+
warnLog('vxe.error.errConflicts', ['keyboard-config.isEdit', 'edit-config.beforeEditAsyncMethod'])
|
|
15903
|
+
}
|
|
15850
15904
|
}
|
|
15851
15905
|
if (checkboxOpts.halfField) {
|
|
15852
15906
|
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField'])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|