vxe-table 4.23.17 → 4.23.19
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 +163 -123
- package/dist/all.esm.min.js +3 -3
- package/es/grid/src/grid.js +0 -8
- package/es/table/module/edit/hook.js +85 -85
- package/es/table/module/export/export-panel.js +5 -5
- package/es/table/module/export/hook.js +8 -10
- package/es/table/module/export/import-panel.js +5 -5
- package/es/table/src/table.js +58 -8
- package/es/ui/index.d.ts +1 -0
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +0 -8
- package/lib/index.umd.js +163 -123
- package/lib/index.umd.min.js +3 -3
- package/lib/table/module/edit/hook.js +85 -85
- package/lib/table/module/export/export-panel.js +5 -5
- package/lib/table/module/export/hook.js +8 -10
- package/lib/table/module/export/import-panel.js +5 -5
- package/lib/table/src/table.js +58 -8
- package/lib/ui/index.d.ts +1 -0
- package/lib/ui/index.js +2 -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 +97 -89
- package/packages/table/module/export/export-panel.ts +5 -5
- package/packages/table/module/export/hook.ts +8 -10
- package/packages/table/module/export/import-panel.ts +5 -5
- package/packages/table/src/table.ts +64 -11
- package/packages/ui/index.ts +4 -0
- /package/dist/{iconfont.1794294436168.ttf → iconfont.1794474448348.ttf} +0 -0
- /package/dist/{iconfont.1794294436168.woff → iconfont.1794474448348.woff} +0 -0
- /package/dist/{iconfont.1794294436168.woff2 → iconfont.1794474448348.woff2} +0 -0
- /package/es/{iconfont.1794294436168.ttf → iconfont.1794474448348.ttf} +0 -0
- /package/es/{iconfont.1794294436168.woff → iconfont.1794474448348.woff} +0 -0
- /package/es/{iconfont.1794294436168.woff2 → iconfont.1794474448348.woff2} +0 -0
- /package/lib/{iconfont.1794294436168.ttf → iconfont.1794474448348.ttf} +0 -0
- /package/lib/{iconfont.1794294436168.woff → iconfont.1794474448348.woff} +0 -0
- /package/lib/{iconfont.1794294436168.woff2 → iconfont.1794474448348.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -264,14 +264,6 @@ var grid_default = (
|
|
|
264
264
|
return funcs;
|
|
265
265
|
};
|
|
266
266
|
const gridExtendTableMethods = extendTableMethods(tableComponentMethodKeys);
|
|
267
|
-
tableComponentMethodKeys.forEach((name) => {
|
|
268
|
-
gridExtendTableMethods[name] = (...args) => {
|
|
269
|
-
const $xeTable = refTable.value;
|
|
270
|
-
if ($xeTable && $xeTable[name]) {
|
|
271
|
-
return $xeTable && $xeTable[name](...args);
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
});
|
|
275
267
|
const computeProxyOpts = computed(() => {
|
|
276
268
|
return XEUtils.merge({}, XEUtils.clone(getConfig().grid.proxyConfig, true), props.proxyConfig);
|
|
277
269
|
});
|
|
@@ -43,8 +43,6 @@ hooks.add("tableEditModule", {
|
|
|
43
43
|
const { refElem } = $xeTable.getRefMaps();
|
|
44
44
|
const { computeMouseOpts, computeEditOpts, computeCheckboxOpts, computeTreeOpts, computeValidOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
45
45
|
const browseObj = XEUtils.browse();
|
|
46
|
-
let editMethods = {};
|
|
47
|
-
let editPrivateMethods = {};
|
|
48
46
|
const getEditColumnModel = (row, column) => {
|
|
49
47
|
const { model, editRender } = column;
|
|
50
48
|
if (editRender) {
|
|
@@ -404,76 +402,26 @@ hooks.add("tableEditModule", {
|
|
|
404
402
|
const { editRender } = column;
|
|
405
403
|
const { isFocus, isPos, isClear } = options;
|
|
406
404
|
const cell = params.cell || $xeTable.getCellElement(row, column);
|
|
407
|
-
const
|
|
405
|
+
const beforeEditFn = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
406
|
+
const beforeEditAsyncFn = editOpts.beforeEditAsyncMethod;
|
|
408
407
|
const editParams = { ...params, cell };
|
|
409
|
-
if (cell
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
column.renderHeight = cell.offsetHeight;
|
|
427
|
-
actived.args = editParams;
|
|
428
|
-
actived.row = row;
|
|
429
|
-
actived.column = column;
|
|
430
|
-
$xeTable.handlePushStack();
|
|
431
|
-
if (isClear) {
|
|
432
|
-
setCellValue(row, column, null);
|
|
433
|
-
}
|
|
434
|
-
if (mode === "row") {
|
|
435
|
-
tableColumn.forEach((column2) => getEditColumnModel(row, column2));
|
|
436
|
-
} else {
|
|
437
|
-
getEditColumnModel(row, column);
|
|
438
|
-
}
|
|
439
|
-
const afterEditMethod = editOpts.afterEditMethod;
|
|
440
|
-
nextTick(() => {
|
|
441
|
-
if (isFocus) {
|
|
442
|
-
$xeTable.handleFocus(editParams, evnt);
|
|
443
|
-
}
|
|
444
|
-
if (afterEditMethod) {
|
|
445
|
-
afterEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
446
|
-
}
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
$xeTable.dispatchEvent(
|
|
450
|
-
type,
|
|
451
|
-
{
|
|
452
|
-
row,
|
|
453
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
454
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
455
|
-
column,
|
|
456
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
457
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
458
|
-
},
|
|
459
|
-
evnt
|
|
460
|
-
);
|
|
461
|
-
if (type === "edit-activated") {
|
|
462
|
-
$xeTable.dispatchEvent(
|
|
463
|
-
"edit-actived",
|
|
464
|
-
{
|
|
465
|
-
row,
|
|
466
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
467
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
468
|
-
column,
|
|
469
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
470
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
471
|
-
},
|
|
472
|
-
evnt
|
|
473
|
-
);
|
|
474
|
-
}
|
|
475
|
-
} else {
|
|
476
|
-
const { column: oldColumn } = actived;
|
|
408
|
+
if (!cell || !isEnableConf(editConfig) || !isEnableConf(editRender)) {
|
|
409
|
+
return nextTick();
|
|
410
|
+
}
|
|
411
|
+
if ($xeTable.isPendingByRow(row) || $xeTable.isAggregateRecord(row)) {
|
|
412
|
+
return nextTick();
|
|
413
|
+
}
|
|
414
|
+
if (actived.row !== row || (mode === "cell" ? actived.column !== column : false)) {
|
|
415
|
+
const evntParams = {
|
|
416
|
+
row,
|
|
417
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
418
|
+
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
419
|
+
column,
|
|
420
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
421
|
+
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
422
|
+
};
|
|
423
|
+
const handleCellEdit = (status) => {
|
|
424
|
+
if (status) {
|
|
477
425
|
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
478
426
|
$xeTable.clearSelected();
|
|
479
427
|
if ($xeTable.clearCellAreas) {
|
|
@@ -481,29 +429,81 @@ hooks.add("tableEditModule", {
|
|
|
481
429
|
$xeTable.clearCopyCellArea();
|
|
482
430
|
}
|
|
483
431
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
setCellValue(row, oldColumn, oldModel.value);
|
|
488
|
-
}
|
|
489
|
-
if ($xeTable.clearValidate) {
|
|
490
|
-
$xeTable.clearValidate(row, column);
|
|
491
|
-
}
|
|
432
|
+
$xeTable.closeTooltip();
|
|
433
|
+
if (actived.column) {
|
|
434
|
+
handleClearEdit(evnt);
|
|
492
435
|
}
|
|
493
436
|
column.renderHeight = cell.offsetHeight;
|
|
494
437
|
actived.args = editParams;
|
|
438
|
+
actived.row = row;
|
|
495
439
|
actived.column = column;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
});
|
|
440
|
+
$xeTable.handlePushStack();
|
|
441
|
+
if (isClear) {
|
|
442
|
+
setCellValue(row, column, null);
|
|
500
443
|
}
|
|
444
|
+
if (mode === "row") {
|
|
445
|
+
tableColumn.forEach((column2) => getEditColumnModel(row, column2));
|
|
446
|
+
} else {
|
|
447
|
+
getEditColumnModel(row, column);
|
|
448
|
+
}
|
|
449
|
+
const afterEditMethod = editOpts.afterEditMethod;
|
|
450
|
+
nextTick(() => {
|
|
451
|
+
if (isFocus) {
|
|
452
|
+
$xeTable.handleFocus(editParams, evnt);
|
|
453
|
+
}
|
|
454
|
+
if (afterEditMethod) {
|
|
455
|
+
afterEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
$xeTable.dispatchEvent("edit-activated", evntParams, evnt);
|
|
459
|
+
$xeTable.dispatchEvent("edit-actived", evntParams, evnt);
|
|
460
|
+
} else {
|
|
461
|
+
$xeTable.dispatchEvent("edit-disabled", evntParams, evnt);
|
|
501
462
|
}
|
|
502
463
|
focused.column = null;
|
|
503
464
|
focused.row = null;
|
|
504
465
|
$xeTable.focus();
|
|
466
|
+
};
|
|
467
|
+
const eFnParams = { ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
|
|
468
|
+
if (beforeEditFn) {
|
|
469
|
+
handleCellEdit(!!beforeEditFn(eFnParams));
|
|
470
|
+
} else if (beforeEditAsyncFn) {
|
|
471
|
+
return Promise.resolve().then(() => beforeEditAsyncFn(eFnParams)).catch(() => false).then((status) => {
|
|
472
|
+
handleCellEdit(!!status);
|
|
473
|
+
});
|
|
474
|
+
} else {
|
|
475
|
+
handleCellEdit(true);
|
|
505
476
|
}
|
|
477
|
+
return nextTick();
|
|
506
478
|
}
|
|
479
|
+
const { column: oldColumn } = actived;
|
|
480
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
481
|
+
$xeTable.clearSelected();
|
|
482
|
+
if ($xeTable.clearCellAreas) {
|
|
483
|
+
$xeTable.clearCellAreas();
|
|
484
|
+
$xeTable.clearCopyCellArea();
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
if (oldColumn && oldColumn !== column) {
|
|
488
|
+
const { model: oldModel } = oldColumn;
|
|
489
|
+
if (oldModel.update) {
|
|
490
|
+
setCellValue(row, oldColumn, oldModel.value);
|
|
491
|
+
}
|
|
492
|
+
if ($xeTable.clearValidate) {
|
|
493
|
+
$xeTable.clearValidate(row, column);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
column.renderHeight = cell.offsetHeight;
|
|
497
|
+
actived.args = editParams;
|
|
498
|
+
actived.column = column;
|
|
499
|
+
if (isPos) {
|
|
500
|
+
setTimeout(() => {
|
|
501
|
+
$xeTable.handleFocus(editParams, evnt);
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
focused.column = null;
|
|
505
|
+
focused.row = null;
|
|
506
|
+
$xeTable.focus();
|
|
507
507
|
return nextTick();
|
|
508
508
|
};
|
|
509
509
|
const handleEditCell = (row, fieldOrColumn, options) => {
|
|
@@ -540,7 +540,7 @@ hooks.add("tableEditModule", {
|
|
|
540
540
|
}
|
|
541
541
|
return nextTick();
|
|
542
542
|
};
|
|
543
|
-
editMethods = {
|
|
543
|
+
const editMethods = {
|
|
544
544
|
/**
|
|
545
545
|
* 往表格中插入临时数据
|
|
546
546
|
*
|
|
@@ -988,7 +988,7 @@ hooks.add("tableEditModule", {
|
|
|
988
988
|
}
|
|
989
989
|
return null;
|
|
990
990
|
};
|
|
991
|
-
editPrivateMethods = {
|
|
991
|
+
const editPrivateMethods = {
|
|
992
992
|
/**
|
|
993
993
|
* 处理激活编辑
|
|
994
994
|
*/
|
|
@@ -226,17 +226,17 @@ var export_panel_default = (
|
|
|
226
226
|
{
|
|
227
227
|
id: "VXE_EXPORT_MODAL",
|
|
228
228
|
modelValue: storeData.visible,
|
|
229
|
-
title: modelOptions.title
|
|
230
|
-
className: "vxe-table-export-popup-wrapper",
|
|
229
|
+
title: getDefaultConfig(modelOptions.title, getI18n(isPrint ? "vxe.export.printTitle" : "vxe.export.expTitle")),
|
|
230
|
+
className: "vxe-table-export-popup-wrapper" + (modelOptions.className ? ` ${modelOptions.className}` : ""),
|
|
231
231
|
width: modelOptions.width || 660,
|
|
232
232
|
height: modelOptions.height,
|
|
233
233
|
minWidth: modelOptions.minWidth || 500,
|
|
234
234
|
minHeight: modelOptions.minHeight || 400,
|
|
235
235
|
mask: getDefaultConfig(modelOptions.mask, true),
|
|
236
236
|
lockView: getDefaultConfig(modelOptions.lockView, true),
|
|
237
|
-
showFooter: true,
|
|
238
|
-
escClosable: true,
|
|
239
|
-
maskClosable: true,
|
|
237
|
+
showFooter: getDefaultConfig(modelOptions.showFooter, true),
|
|
238
|
+
escClosable: getDefaultConfig(modelOptions.escClosable, true),
|
|
239
|
+
maskClosable: getDefaultConfig(modelOptions.maskClosable, true),
|
|
240
240
|
position: modelOptions.position,
|
|
241
241
|
fullscreen: modelOptions.fullscreen,
|
|
242
242
|
remember: modelOptions.remember,
|
|
@@ -1072,9 +1072,11 @@ hooks.add("tableExportModule", {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
});
|
|
1074
1074
|
});
|
|
1075
|
-
} else
|
|
1076
|
-
if (
|
|
1077
|
-
VxeUI.modal
|
|
1075
|
+
} else {
|
|
1076
|
+
if (opts.message !== false) {
|
|
1077
|
+
if (VxeUI.modal) {
|
|
1078
|
+
VxeUI.modal.message({ content: getI18n("vxe.error.impFields"), status: "error" });
|
|
1079
|
+
}
|
|
1078
1080
|
}
|
|
1079
1081
|
if (_importReject) {
|
|
1080
1082
|
_importReject({ status: false, msg: "field mismatching" });
|
|
@@ -1291,13 +1293,9 @@ hooks.add("tableExportModule", {
|
|
|
1291
1293
|
exportStore.isPrint = !!isPrint;
|
|
1292
1294
|
exportStore.hasColgroup = isGroup;
|
|
1293
1295
|
exportStore.visible = true;
|
|
1294
|
-
Object.assign(
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
mode: selectRecords.length ? "selected" : "current"
|
|
1298
|
-
},
|
|
1299
|
-
defOpts
|
|
1300
|
-
);
|
|
1296
|
+
Object.assign(exportParams, {
|
|
1297
|
+
mode: selectRecords.length ? "selected" : "current"
|
|
1298
|
+
}, defOpts);
|
|
1301
1299
|
const { filename, sheetName, mode, type } = exportParams;
|
|
1302
1300
|
if (filename) {
|
|
1303
1301
|
if (XEUtils.isFunction(filename)) {
|
|
@@ -106,17 +106,17 @@ var import_panel_default = (
|
|
|
106
106
|
{
|
|
107
107
|
id: "VXE_IMPORT_MODAL",
|
|
108
108
|
modelValue: storeData.visible,
|
|
109
|
-
title: modelOptions.title
|
|
110
|
-
className: "vxe-table-
|
|
109
|
+
title: getDefaultConfig(modelOptions.title, getI18n("vxe.import.impTitle")),
|
|
110
|
+
className: "vxe-table-import-popup-wrapper" + (modelOptions.className ? ` ${modelOptions.className}` : ""),
|
|
111
111
|
width: modelOptions.width || 540,
|
|
112
112
|
height: modelOptions.height,
|
|
113
113
|
minWidth: modelOptions.minWidth || 360,
|
|
114
114
|
minHeight: modelOptions.minHeight || 240,
|
|
115
115
|
mask: getDefaultConfig(modelOptions.mask, true),
|
|
116
116
|
lockView: getDefaultConfig(modelOptions.lockView, true),
|
|
117
|
-
showFooter: true,
|
|
118
|
-
escClosable: true,
|
|
119
|
-
maskClosable: true,
|
|
117
|
+
showFooter: getDefaultConfig(modelOptions.showFooter, true),
|
|
118
|
+
escClosable: getDefaultConfig(modelOptions.escClosable, true),
|
|
119
|
+
maskClosable: getDefaultConfig(modelOptions.maskClosable, true),
|
|
120
120
|
position: modelOptions.position,
|
|
121
121
|
fullscreen: modelOptions.fullscreen,
|
|
122
122
|
remember: modelOptions.remember,
|
package/es/table/src/table.js
CHANGED
|
@@ -8249,7 +8249,8 @@ var table_default = (
|
|
|
8249
8249
|
const operArrow = isLeftArrow || isUpArrow || isRightArrow || isDwArrow;
|
|
8250
8250
|
const operCtxMenu = isContentMenu && ctxMenuStore.visible && (isEnter || isSpacebar || operArrow);
|
|
8251
8251
|
const isEditStatus = isEnableConf(editConfig) && actived.column && actived.row;
|
|
8252
|
-
const
|
|
8252
|
+
const beforeEditFn = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
8253
|
+
const beforeEditAsyncFn = editOpts.beforeEditAsyncMethod;
|
|
8253
8254
|
const selectRow = selected.row;
|
|
8254
8255
|
const selectColumn = selected.column;
|
|
8255
8256
|
if (operCtxMenu) {
|
|
@@ -8477,7 +8478,7 @@ var table_default = (
|
|
|
8477
8478
|
$grid: $xeGrid,
|
|
8478
8479
|
$gantt: $xeGantt
|
|
8479
8480
|
};
|
|
8480
|
-
|
|
8481
|
+
const handleEdit = () => {
|
|
8481
8482
|
if (delMethod) {
|
|
8482
8483
|
delMethod(params);
|
|
8483
8484
|
} else {
|
|
@@ -8489,6 +8490,20 @@ var table_default = (
|
|
|
8489
8490
|
}
|
|
8490
8491
|
$xeTable.updateFooter();
|
|
8491
8492
|
dispatchEvent("cell-delete-value", params, evnt);
|
|
8493
|
+
};
|
|
8494
|
+
if (beforeEditFn) {
|
|
8495
|
+
if (beforeEditFn(params)) {
|
|
8496
|
+
handleEdit();
|
|
8497
|
+
}
|
|
8498
|
+
} else if (beforeEditAsyncFn) {
|
|
8499
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
8500
|
+
if (status) {
|
|
8501
|
+
handleEdit();
|
|
8502
|
+
}
|
|
8503
|
+
}).catch(() => {
|
|
8504
|
+
});
|
|
8505
|
+
} else {
|
|
8506
|
+
handleEdit();
|
|
8492
8507
|
}
|
|
8493
8508
|
}
|
|
8494
8509
|
} else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
@@ -8508,7 +8523,7 @@ var table_default = (
|
|
|
8508
8523
|
$grid: $xeGrid,
|
|
8509
8524
|
$gantt: $xeGantt
|
|
8510
8525
|
};
|
|
8511
|
-
|
|
8526
|
+
const handleEdit = () => {
|
|
8512
8527
|
if (backMethod) {
|
|
8513
8528
|
backMethod(params);
|
|
8514
8529
|
} else {
|
|
@@ -8517,6 +8532,20 @@ var table_default = (
|
|
|
8517
8532
|
});
|
|
8518
8533
|
}
|
|
8519
8534
|
dispatchEvent("cell-backspace-value", params, evnt);
|
|
8535
|
+
};
|
|
8536
|
+
if (beforeEditFn) {
|
|
8537
|
+
if (beforeEditFn(params)) {
|
|
8538
|
+
handleEdit();
|
|
8539
|
+
}
|
|
8540
|
+
} else if (beforeEditAsyncFn) {
|
|
8541
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
8542
|
+
if (status) {
|
|
8543
|
+
handleEdit();
|
|
8544
|
+
}
|
|
8545
|
+
}).catch(() => {
|
|
8546
|
+
});
|
|
8547
|
+
} else {
|
|
8548
|
+
handleEdit();
|
|
8520
8549
|
}
|
|
8521
8550
|
}
|
|
8522
8551
|
}
|
|
@@ -8547,7 +8576,6 @@ var table_default = (
|
|
|
8547
8576
|
} else if (hasEnableConf(keyboardConfig, keyboardOpts) && isEnableConf(editConfig) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || evnt.key === "Process" || keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90 || keyCode >= 96 && keyCode <= 111 || keyCode >= 186 && keyCode <= 192 || keyCode >= 219 && keyCode <= 222)) {
|
|
8548
8577
|
const { editMode, editMethod } = keyboardOpts;
|
|
8549
8578
|
if (selectColumn && selectRow && isEnableConf(selectColumn.editRender)) {
|
|
8550
|
-
const beforeEditMethod2 = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
8551
8579
|
const params = {
|
|
8552
8580
|
row: selectRow,
|
|
8553
8581
|
rowIndex: $xeTable.getRowIndex(selectRow),
|
|
@@ -8561,7 +8589,7 @@ var table_default = (
|
|
|
8561
8589
|
$grid: $xeGrid,
|
|
8562
8590
|
$gantt: $xeGantt
|
|
8563
8591
|
};
|
|
8564
|
-
|
|
8592
|
+
const handleEdit = () => {
|
|
8565
8593
|
if (editMethod) {
|
|
8566
8594
|
editMethod(params);
|
|
8567
8595
|
} else {
|
|
@@ -8573,6 +8601,20 @@ var table_default = (
|
|
|
8573
8601
|
isClear: isClearValue
|
|
8574
8602
|
});
|
|
8575
8603
|
}
|
|
8604
|
+
};
|
|
8605
|
+
if (beforeEditFn) {
|
|
8606
|
+
if (beforeEditFn(params)) {
|
|
8607
|
+
handleEdit();
|
|
8608
|
+
}
|
|
8609
|
+
} else if (beforeEditAsyncFn) {
|
|
8610
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
8611
|
+
if (status) {
|
|
8612
|
+
handleEdit();
|
|
8613
|
+
}
|
|
8614
|
+
}).catch(() => {
|
|
8615
|
+
});
|
|
8616
|
+
} else {
|
|
8617
|
+
handleEdit();
|
|
8576
8618
|
}
|
|
8577
8619
|
}
|
|
8578
8620
|
}
|
|
@@ -9270,7 +9312,6 @@ var table_default = (
|
|
|
9270
9312
|
if (rowExpandedMaps[rowid]) {
|
|
9271
9313
|
rowExpandedMaps[rowid] = row;
|
|
9272
9314
|
}
|
|
9273
|
-
rowNum++;
|
|
9274
9315
|
idMaps[rowid] = true;
|
|
9275
9316
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
9276
9317
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
@@ -14338,6 +14379,7 @@ var table_default = (
|
|
|
14338
14379
|
const mouseOpts = computeMouseOpts.value;
|
|
14339
14380
|
const exportOpts = computeExportOpts.value;
|
|
14340
14381
|
const importOpts = computeImportOpts.value;
|
|
14382
|
+
const keyboardOpts = computeKeyboardOpts.value;
|
|
14341
14383
|
const rowDragOpts = computeRowDragOpts.value;
|
|
14342
14384
|
const areaOpts = computeAreaOpts.value;
|
|
14343
14385
|
const sortOpts = computeSortOpts.value;
|
|
@@ -14496,8 +14538,16 @@ var table_default = (
|
|
|
14496
14538
|
if (mouseOpts.area && props.treeConfig && !treeOpts.transform) {
|
|
14497
14539
|
errLog("vxe.error.notSupportProp", ["mouse-config.area", "tree-config.transform=false", "tree-config.transform=true"]);
|
|
14498
14540
|
}
|
|
14499
|
-
if (props.editConfig
|
|
14500
|
-
|
|
14541
|
+
if (props.editConfig) {
|
|
14542
|
+
if (editOpts.activeMethod) {
|
|
14543
|
+
warnLog("vxe.error.delProp", ["edit-config.activeMethod", "edit-config.beforeEditMethod"]);
|
|
14544
|
+
}
|
|
14545
|
+
if (editOpts.beforeEditMethod && editOpts.beforeEditAsyncMethod) {
|
|
14546
|
+
errLog("vxe.error.errConflicts", ["edit-config.beforeEditMethod", "edit-config.beforeEditAsyncMethod"]);
|
|
14547
|
+
}
|
|
14548
|
+
if (keyboardOpts.isEdit && editOpts.beforeEditAsyncMethod) {
|
|
14549
|
+
warnLog("vxe.error.errConflicts", ["keyboard-config.isEdit", "edit-config.beforeEditAsyncMethod"]);
|
|
14550
|
+
}
|
|
14501
14551
|
}
|
|
14502
14552
|
if (checkboxOpts.halfField) {
|
|
14503
14553
|
warnLog("vxe.error.delProp", ["checkbox-config.halfField", "checkbox-config.indeterminateField"]);
|
package/es/ui/index.d.ts
CHANGED
package/es/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from "@vxe-ui/core";
|
|
2
2
|
import { getFuncText } from "./src/utils";
|
|
3
|
-
const version = "4.23.
|
|
3
|
+
const version = "4.23.18";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -470,6 +470,7 @@ const modal = {
|
|
|
470
470
|
var ui_default = VxeUI;
|
|
471
471
|
export {
|
|
472
472
|
VXETable,
|
|
473
|
+
VxeUI,
|
|
473
474
|
_t,
|
|
474
475
|
config,
|
|
475
476
|
ui_default as default,
|
package/es/ui/src/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from "@vxe-ui/core";
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const tableVersion = `table v${"4.23.
|
|
3
|
+
const tableVersion = `table v${"4.23.18"}`;
|
|
4
4
|
function createComponentLog(name) {
|
|
5
5
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : "";
|
|
6
6
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : "";
|
package/lib/grid/src/grid.js
CHANGED
|
@@ -297,14 +297,6 @@ var grid_default = (
|
|
|
297
297
|
return funcs;
|
|
298
298
|
};
|
|
299
299
|
const gridExtendTableMethods = extendTableMethods(tableComponentMethodKeys);
|
|
300
|
-
tableComponentMethodKeys.forEach((name) => {
|
|
301
|
-
gridExtendTableMethods[name] = (...args) => {
|
|
302
|
-
const $xeTable = refTable.value;
|
|
303
|
-
if ($xeTable && $xeTable[name]) {
|
|
304
|
-
return $xeTable && $xeTable[name](...args);
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
});
|
|
308
300
|
const computeProxyOpts = (0, import_vue.computed)(() => {
|
|
309
301
|
return import_xe_utils.default.merge({}, import_xe_utils.default.clone(getConfig().grid.proxyConfig, true), props.proxyConfig);
|
|
310
302
|
});
|