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
|
@@ -66,8 +66,6 @@ hooks.add("tableEditModule", {
|
|
|
66
66
|
const { refElem } = $xeTable.getRefMaps();
|
|
67
67
|
const { computeMouseOpts, computeEditOpts, computeCheckboxOpts, computeTreeOpts, computeValidOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
68
68
|
const browseObj = import_xe_utils.default.browse();
|
|
69
|
-
let editMethods = {};
|
|
70
|
-
let editPrivateMethods = {};
|
|
71
69
|
const getEditColumnModel = (row, column) => {
|
|
72
70
|
const { model, editRender } = column;
|
|
73
71
|
if (editRender) {
|
|
@@ -427,76 +425,26 @@ hooks.add("tableEditModule", {
|
|
|
427
425
|
const { editRender } = column;
|
|
428
426
|
const { isFocus, isPos, isClear } = options;
|
|
429
427
|
const cell = params.cell || $xeTable.getCellElement(row, column);
|
|
430
|
-
const
|
|
428
|
+
const beforeEditFn = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
429
|
+
const beforeEditAsyncFn = editOpts.beforeEditAsyncMethod;
|
|
431
430
|
const editParams = { ...params, cell };
|
|
432
|
-
if (cell
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
column.renderHeight = cell.offsetHeight;
|
|
450
|
-
actived.args = editParams;
|
|
451
|
-
actived.row = row;
|
|
452
|
-
actived.column = column;
|
|
453
|
-
$xeTable.handlePushStack();
|
|
454
|
-
if (isClear) {
|
|
455
|
-
(0, import_util.setCellValue)(row, column, null);
|
|
456
|
-
}
|
|
457
|
-
if (mode === "row") {
|
|
458
|
-
tableColumn.forEach((column2) => getEditColumnModel(row, column2));
|
|
459
|
-
} else {
|
|
460
|
-
getEditColumnModel(row, column);
|
|
461
|
-
}
|
|
462
|
-
const afterEditMethod = editOpts.afterEditMethod;
|
|
463
|
-
(0, import_vue.nextTick)(() => {
|
|
464
|
-
if (isFocus) {
|
|
465
|
-
$xeTable.handleFocus(editParams, evnt);
|
|
466
|
-
}
|
|
467
|
-
if (afterEditMethod) {
|
|
468
|
-
afterEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
469
|
-
}
|
|
470
|
-
});
|
|
471
|
-
}
|
|
472
|
-
$xeTable.dispatchEvent(
|
|
473
|
-
type,
|
|
474
|
-
{
|
|
475
|
-
row,
|
|
476
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
477
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
478
|
-
column,
|
|
479
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
480
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
481
|
-
},
|
|
482
|
-
evnt
|
|
483
|
-
);
|
|
484
|
-
if (type === "edit-activated") {
|
|
485
|
-
$xeTable.dispatchEvent(
|
|
486
|
-
"edit-actived",
|
|
487
|
-
{
|
|
488
|
-
row,
|
|
489
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
490
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
491
|
-
column,
|
|
492
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
493
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
494
|
-
},
|
|
495
|
-
evnt
|
|
496
|
-
);
|
|
497
|
-
}
|
|
498
|
-
} else {
|
|
499
|
-
const { column: oldColumn } = actived;
|
|
431
|
+
if (!cell || !(0, import_utils.isEnableConf)(editConfig) || !(0, import_utils.isEnableConf)(editRender)) {
|
|
432
|
+
return (0, import_vue.nextTick)();
|
|
433
|
+
}
|
|
434
|
+
if ($xeTable.isPendingByRow(row) || $xeTable.isAggregateRecord(row)) {
|
|
435
|
+
return (0, import_vue.nextTick)();
|
|
436
|
+
}
|
|
437
|
+
if (actived.row !== row || (mode === "cell" ? actived.column !== column : false)) {
|
|
438
|
+
const evntParams = {
|
|
439
|
+
row,
|
|
440
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
441
|
+
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
442
|
+
column,
|
|
443
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
444
|
+
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
445
|
+
};
|
|
446
|
+
const handleCellEdit = (status) => {
|
|
447
|
+
if (status) {
|
|
500
448
|
if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
|
|
501
449
|
$xeTable.clearSelected();
|
|
502
450
|
if ($xeTable.clearCellAreas) {
|
|
@@ -504,29 +452,81 @@ hooks.add("tableEditModule", {
|
|
|
504
452
|
$xeTable.clearCopyCellArea();
|
|
505
453
|
}
|
|
506
454
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
(0, import_util.setCellValue)(row, oldColumn, oldModel.value);
|
|
511
|
-
}
|
|
512
|
-
if ($xeTable.clearValidate) {
|
|
513
|
-
$xeTable.clearValidate(row, column);
|
|
514
|
-
}
|
|
455
|
+
$xeTable.closeTooltip();
|
|
456
|
+
if (actived.column) {
|
|
457
|
+
handleClearEdit(evnt);
|
|
515
458
|
}
|
|
516
459
|
column.renderHeight = cell.offsetHeight;
|
|
517
460
|
actived.args = editParams;
|
|
461
|
+
actived.row = row;
|
|
518
462
|
actived.column = column;
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
});
|
|
463
|
+
$xeTable.handlePushStack();
|
|
464
|
+
if (isClear) {
|
|
465
|
+
(0, import_util.setCellValue)(row, column, null);
|
|
523
466
|
}
|
|
467
|
+
if (mode === "row") {
|
|
468
|
+
tableColumn.forEach((column2) => getEditColumnModel(row, column2));
|
|
469
|
+
} else {
|
|
470
|
+
getEditColumnModel(row, column);
|
|
471
|
+
}
|
|
472
|
+
const afterEditMethod = editOpts.afterEditMethod;
|
|
473
|
+
(0, import_vue.nextTick)(() => {
|
|
474
|
+
if (isFocus) {
|
|
475
|
+
$xeTable.handleFocus(editParams, evnt);
|
|
476
|
+
}
|
|
477
|
+
if (afterEditMethod) {
|
|
478
|
+
afterEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
$xeTable.dispatchEvent("edit-activated", evntParams, evnt);
|
|
482
|
+
$xeTable.dispatchEvent("edit-actived", evntParams, evnt);
|
|
483
|
+
} else {
|
|
484
|
+
$xeTable.dispatchEvent("edit-disabled", evntParams, evnt);
|
|
524
485
|
}
|
|
525
486
|
focused.column = null;
|
|
526
487
|
focused.row = null;
|
|
527
488
|
$xeTable.focus();
|
|
489
|
+
};
|
|
490
|
+
const eFnParams = { ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
|
|
491
|
+
if (beforeEditFn) {
|
|
492
|
+
handleCellEdit(!!beforeEditFn(eFnParams));
|
|
493
|
+
} else if (beforeEditAsyncFn) {
|
|
494
|
+
return Promise.resolve().then(() => beforeEditAsyncFn(eFnParams)).catch(() => false).then((status) => {
|
|
495
|
+
handleCellEdit(!!status);
|
|
496
|
+
});
|
|
497
|
+
} else {
|
|
498
|
+
handleCellEdit(true);
|
|
528
499
|
}
|
|
500
|
+
return (0, import_vue.nextTick)();
|
|
529
501
|
}
|
|
502
|
+
const { column: oldColumn } = actived;
|
|
503
|
+
if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
|
|
504
|
+
$xeTable.clearSelected();
|
|
505
|
+
if ($xeTable.clearCellAreas) {
|
|
506
|
+
$xeTable.clearCellAreas();
|
|
507
|
+
$xeTable.clearCopyCellArea();
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
if (oldColumn && oldColumn !== column) {
|
|
511
|
+
const { model: oldModel } = oldColumn;
|
|
512
|
+
if (oldModel.update) {
|
|
513
|
+
(0, import_util.setCellValue)(row, oldColumn, oldModel.value);
|
|
514
|
+
}
|
|
515
|
+
if ($xeTable.clearValidate) {
|
|
516
|
+
$xeTable.clearValidate(row, column);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
column.renderHeight = cell.offsetHeight;
|
|
520
|
+
actived.args = editParams;
|
|
521
|
+
actived.column = column;
|
|
522
|
+
if (isPos) {
|
|
523
|
+
setTimeout(() => {
|
|
524
|
+
$xeTable.handleFocus(editParams, evnt);
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
focused.column = null;
|
|
528
|
+
focused.row = null;
|
|
529
|
+
$xeTable.focus();
|
|
530
530
|
return (0, import_vue.nextTick)();
|
|
531
531
|
};
|
|
532
532
|
const handleEditCell = (row, fieldOrColumn, options) => {
|
|
@@ -563,7 +563,7 @@ hooks.add("tableEditModule", {
|
|
|
563
563
|
}
|
|
564
564
|
return (0, import_vue.nextTick)();
|
|
565
565
|
};
|
|
566
|
-
editMethods = {
|
|
566
|
+
const editMethods = {
|
|
567
567
|
/**
|
|
568
568
|
* 往表格中插入临时数据
|
|
569
569
|
*
|
|
@@ -1011,7 +1011,7 @@ hooks.add("tableEditModule", {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
return null;
|
|
1013
1013
|
};
|
|
1014
|
-
editPrivateMethods = {
|
|
1014
|
+
const editPrivateMethods = {
|
|
1015
1015
|
/**
|
|
1016
1016
|
* 处理激活编辑
|
|
1017
1017
|
*/
|
|
@@ -259,17 +259,17 @@ var export_panel_default = (
|
|
|
259
259
|
{
|
|
260
260
|
id: "VXE_EXPORT_MODAL",
|
|
261
261
|
modelValue: storeData.visible,
|
|
262
|
-
title: modelOptions.title
|
|
263
|
-
className: "vxe-table-export-popup-wrapper",
|
|
262
|
+
title: (0, import_utils.getDefaultConfig)(modelOptions.title, getI18n(isPrint ? "vxe.export.printTitle" : "vxe.export.expTitle")),
|
|
263
|
+
className: "vxe-table-export-popup-wrapper" + (modelOptions.className ? ` ${modelOptions.className}` : ""),
|
|
264
264
|
width: modelOptions.width || 660,
|
|
265
265
|
height: modelOptions.height,
|
|
266
266
|
minWidth: modelOptions.minWidth || 500,
|
|
267
267
|
minHeight: modelOptions.minHeight || 400,
|
|
268
268
|
mask: (0, import_utils.getDefaultConfig)(modelOptions.mask, true),
|
|
269
269
|
lockView: (0, import_utils.getDefaultConfig)(modelOptions.lockView, true),
|
|
270
|
-
showFooter: true,
|
|
271
|
-
escClosable: true,
|
|
272
|
-
maskClosable: true,
|
|
270
|
+
showFooter: (0, import_utils.getDefaultConfig)(modelOptions.showFooter, true),
|
|
271
|
+
escClosable: (0, import_utils.getDefaultConfig)(modelOptions.escClosable, true),
|
|
272
|
+
maskClosable: (0, import_utils.getDefaultConfig)(modelOptions.maskClosable, true),
|
|
273
273
|
position: modelOptions.position,
|
|
274
274
|
fullscreen: modelOptions.fullscreen,
|
|
275
275
|
remember: modelOptions.remember,
|
|
@@ -1095,9 +1095,11 @@ hooks.add("tableExportModule", {
|
|
|
1095
1095
|
}
|
|
1096
1096
|
});
|
|
1097
1097
|
});
|
|
1098
|
-
} else
|
|
1099
|
-
if (
|
|
1100
|
-
import_core.VxeUI.modal
|
|
1098
|
+
} else {
|
|
1099
|
+
if (opts.message !== false) {
|
|
1100
|
+
if (import_core.VxeUI.modal) {
|
|
1101
|
+
import_core.VxeUI.modal.message({ content: getI18n("vxe.error.impFields"), status: "error" });
|
|
1102
|
+
}
|
|
1101
1103
|
}
|
|
1102
1104
|
if (_importReject) {
|
|
1103
1105
|
_importReject({ status: false, msg: "field mismatching" });
|
|
@@ -1314,13 +1316,9 @@ hooks.add("tableExportModule", {
|
|
|
1314
1316
|
exportStore.isPrint = !!isPrint;
|
|
1315
1317
|
exportStore.hasColgroup = isGroup;
|
|
1316
1318
|
exportStore.visible = true;
|
|
1317
|
-
Object.assign(
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
mode: selectRecords.length ? "selected" : "current"
|
|
1321
|
-
},
|
|
1322
|
-
defOpts
|
|
1323
|
-
);
|
|
1319
|
+
Object.assign(exportParams, {
|
|
1320
|
+
mode: selectRecords.length ? "selected" : "current"
|
|
1321
|
+
}, defOpts);
|
|
1324
1322
|
const { filename, sheetName, mode, type } = exportParams;
|
|
1325
1323
|
if (filename) {
|
|
1326
1324
|
if (import_xe_utils.default.isFunction(filename)) {
|
|
@@ -139,17 +139,17 @@ var import_panel_default = (
|
|
|
139
139
|
{
|
|
140
140
|
id: "VXE_IMPORT_MODAL",
|
|
141
141
|
modelValue: storeData.visible,
|
|
142
|
-
title: modelOptions.title
|
|
143
|
-
className: "vxe-table-
|
|
142
|
+
title: (0, import_utils.getDefaultConfig)(modelOptions.title, getI18n("vxe.import.impTitle")),
|
|
143
|
+
className: "vxe-table-import-popup-wrapper" + (modelOptions.className ? ` ${modelOptions.className}` : ""),
|
|
144
144
|
width: modelOptions.width || 540,
|
|
145
145
|
height: modelOptions.height,
|
|
146
146
|
minWidth: modelOptions.minWidth || 360,
|
|
147
147
|
minHeight: modelOptions.minHeight || 240,
|
|
148
148
|
mask: (0, import_utils.getDefaultConfig)(modelOptions.mask, true),
|
|
149
149
|
lockView: (0, import_utils.getDefaultConfig)(modelOptions.lockView, true),
|
|
150
|
-
showFooter: true,
|
|
151
|
-
escClosable: true,
|
|
152
|
-
maskClosable: true,
|
|
150
|
+
showFooter: (0, import_utils.getDefaultConfig)(modelOptions.showFooter, true),
|
|
151
|
+
escClosable: (0, import_utils.getDefaultConfig)(modelOptions.escClosable, true),
|
|
152
|
+
maskClosable: (0, import_utils.getDefaultConfig)(modelOptions.maskClosable, true),
|
|
153
153
|
position: modelOptions.position,
|
|
154
154
|
fullscreen: modelOptions.fullscreen,
|
|
155
155
|
remember: modelOptions.remember,
|
package/lib/table/src/table.js
CHANGED
|
@@ -8251,7 +8251,8 @@ var table_default = (
|
|
|
8251
8251
|
const operArrow = isLeftArrow || isUpArrow || isRightArrow || isDwArrow;
|
|
8252
8252
|
const operCtxMenu = isContentMenu && ctxMenuStore.visible && (isEnter || isSpacebar || operArrow);
|
|
8253
8253
|
const isEditStatus = (0, import_utils.isEnableConf)(editConfig) && actived.column && actived.row;
|
|
8254
|
-
const
|
|
8254
|
+
const beforeEditFn = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
8255
|
+
const beforeEditAsyncFn = editOpts.beforeEditAsyncMethod;
|
|
8255
8256
|
const selectRow = selected.row;
|
|
8256
8257
|
const selectColumn = selected.column;
|
|
8257
8258
|
if (operCtxMenu) {
|
|
@@ -8479,7 +8480,7 @@ var table_default = (
|
|
|
8479
8480
|
$grid: $xeGrid,
|
|
8480
8481
|
$gantt: $xeGantt
|
|
8481
8482
|
};
|
|
8482
|
-
|
|
8483
|
+
const handleEdit = () => {
|
|
8483
8484
|
if (delMethod) {
|
|
8484
8485
|
delMethod(params);
|
|
8485
8486
|
} else {
|
|
@@ -8491,6 +8492,20 @@ var table_default = (
|
|
|
8491
8492
|
}
|
|
8492
8493
|
$xeTable.updateFooter();
|
|
8493
8494
|
dispatchEvent("cell-delete-value", params, evnt);
|
|
8495
|
+
};
|
|
8496
|
+
if (beforeEditFn) {
|
|
8497
|
+
if (beforeEditFn(params)) {
|
|
8498
|
+
handleEdit();
|
|
8499
|
+
}
|
|
8500
|
+
} else if (beforeEditAsyncFn) {
|
|
8501
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
8502
|
+
if (status) {
|
|
8503
|
+
handleEdit();
|
|
8504
|
+
}
|
|
8505
|
+
}).catch(() => {
|
|
8506
|
+
});
|
|
8507
|
+
} else {
|
|
8508
|
+
handleEdit();
|
|
8494
8509
|
}
|
|
8495
8510
|
}
|
|
8496
8511
|
} else if (hasBackspaceKey && (0, import_utils.hasEnableConf)(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && (0, import_utils.isEnableConf)(editConfig) && (selectRow || selectColumn)) {
|
|
@@ -8510,7 +8525,7 @@ var table_default = (
|
|
|
8510
8525
|
$grid: $xeGrid,
|
|
8511
8526
|
$gantt: $xeGantt
|
|
8512
8527
|
};
|
|
8513
|
-
|
|
8528
|
+
const handleEdit = () => {
|
|
8514
8529
|
if (backMethod) {
|
|
8515
8530
|
backMethod(params);
|
|
8516
8531
|
} else {
|
|
@@ -8519,6 +8534,20 @@ var table_default = (
|
|
|
8519
8534
|
});
|
|
8520
8535
|
}
|
|
8521
8536
|
dispatchEvent("cell-backspace-value", params, evnt);
|
|
8537
|
+
};
|
|
8538
|
+
if (beforeEditFn) {
|
|
8539
|
+
if (beforeEditFn(params)) {
|
|
8540
|
+
handleEdit();
|
|
8541
|
+
}
|
|
8542
|
+
} else if (beforeEditAsyncFn) {
|
|
8543
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
8544
|
+
if (status) {
|
|
8545
|
+
handleEdit();
|
|
8546
|
+
}
|
|
8547
|
+
}).catch(() => {
|
|
8548
|
+
});
|
|
8549
|
+
} else {
|
|
8550
|
+
handleEdit();
|
|
8522
8551
|
}
|
|
8523
8552
|
}
|
|
8524
8553
|
}
|
|
@@ -8549,7 +8578,6 @@ var table_default = (
|
|
|
8549
8578
|
} else if ((0, import_utils.hasEnableConf)(keyboardConfig, keyboardOpts) && (0, import_utils.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)) {
|
|
8550
8579
|
const { editMode, editMethod } = keyboardOpts;
|
|
8551
8580
|
if (selectColumn && selectRow && (0, import_utils.isEnableConf)(selectColumn.editRender)) {
|
|
8552
|
-
const beforeEditMethod2 = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
8553
8581
|
const params = {
|
|
8554
8582
|
row: selectRow,
|
|
8555
8583
|
rowIndex: $xeTable.getRowIndex(selectRow),
|
|
@@ -8563,7 +8591,7 @@ var table_default = (
|
|
|
8563
8591
|
$grid: $xeGrid,
|
|
8564
8592
|
$gantt: $xeGantt
|
|
8565
8593
|
};
|
|
8566
|
-
|
|
8594
|
+
const handleEdit = () => {
|
|
8567
8595
|
if (editMethod) {
|
|
8568
8596
|
editMethod(params);
|
|
8569
8597
|
} else {
|
|
@@ -8575,6 +8603,20 @@ var table_default = (
|
|
|
8575
8603
|
isClear: isClearValue
|
|
8576
8604
|
});
|
|
8577
8605
|
}
|
|
8606
|
+
};
|
|
8607
|
+
if (beforeEditFn) {
|
|
8608
|
+
if (beforeEditFn(params)) {
|
|
8609
|
+
handleEdit();
|
|
8610
|
+
}
|
|
8611
|
+
} else if (beforeEditAsyncFn) {
|
|
8612
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
8613
|
+
if (status) {
|
|
8614
|
+
handleEdit();
|
|
8615
|
+
}
|
|
8616
|
+
}).catch(() => {
|
|
8617
|
+
});
|
|
8618
|
+
} else {
|
|
8619
|
+
handleEdit();
|
|
8578
8620
|
}
|
|
8579
8621
|
}
|
|
8580
8622
|
}
|
|
@@ -9272,7 +9314,6 @@ var table_default = (
|
|
|
9272
9314
|
if (rowExpandedMaps[rowid]) {
|
|
9273
9315
|
rowExpandedMaps[rowid] = row;
|
|
9274
9316
|
}
|
|
9275
|
-
rowNum++;
|
|
9276
9317
|
idMaps[rowid] = true;
|
|
9277
9318
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
9278
9319
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
@@ -14340,6 +14381,7 @@ var table_default = (
|
|
|
14340
14381
|
const mouseOpts = computeMouseOpts.value;
|
|
14341
14382
|
const exportOpts = computeExportOpts.value;
|
|
14342
14383
|
const importOpts = computeImportOpts.value;
|
|
14384
|
+
const keyboardOpts = computeKeyboardOpts.value;
|
|
14343
14385
|
const rowDragOpts = computeRowDragOpts.value;
|
|
14344
14386
|
const areaOpts = computeAreaOpts.value;
|
|
14345
14387
|
const sortOpts = computeSortOpts.value;
|
|
@@ -14498,8 +14540,16 @@ var table_default = (
|
|
|
14498
14540
|
if (mouseOpts.area && props.treeConfig && !treeOpts.transform) {
|
|
14499
14541
|
errLog("vxe.error.notSupportProp", ["mouse-config.area", "tree-config.transform=false", "tree-config.transform=true"]);
|
|
14500
14542
|
}
|
|
14501
|
-
if (props.editConfig
|
|
14502
|
-
|
|
14543
|
+
if (props.editConfig) {
|
|
14544
|
+
if (editOpts.activeMethod) {
|
|
14545
|
+
warnLog("vxe.error.delProp", ["edit-config.activeMethod", "edit-config.beforeEditMethod"]);
|
|
14546
|
+
}
|
|
14547
|
+
if (editOpts.beforeEditMethod && editOpts.beforeEditAsyncMethod) {
|
|
14548
|
+
errLog("vxe.error.errConflicts", ["edit-config.beforeEditMethod", "edit-config.beforeEditAsyncMethod"]);
|
|
14549
|
+
}
|
|
14550
|
+
if (keyboardOpts.isEdit && editOpts.beforeEditAsyncMethod) {
|
|
14551
|
+
warnLog("vxe.error.errConflicts", ["keyboard-config.isEdit", "edit-config.beforeEditAsyncMethod"]);
|
|
14552
|
+
}
|
|
14503
14553
|
}
|
|
14504
14554
|
if (checkboxOpts.halfField) {
|
|
14505
14555
|
warnLog("vxe.error.delProp", ["checkbox-config.halfField", "checkbox-config.indeterminateField"]);
|
package/lib/ui/index.d.ts
CHANGED
package/lib/ui/index.js
CHANGED
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var ui_exports = {};
|
|
20
20
|
__export(ui_exports, {
|
|
21
21
|
VXETable: () => VXETable,
|
|
22
|
+
VxeUI: () => import_core.VxeUI,
|
|
22
23
|
_t: () => _t,
|
|
23
24
|
config: () => config,
|
|
24
25
|
default: () => ui_default,
|
|
@@ -33,7 +34,7 @@ __export(ui_exports, {
|
|
|
33
34
|
module.exports = __toCommonJS(ui_exports);
|
|
34
35
|
var import_core = require("@vxe-ui/core");
|
|
35
36
|
var import_utils = require("./src/utils");
|
|
36
|
-
const version = "4.23.
|
|
37
|
+
const version = "4.23.18";
|
|
37
38
|
import_core.VxeUI.version = version;
|
|
38
39
|
import_core.VxeUI.tableVersion = version;
|
|
39
40
|
import_core.VxeUI.setConfig({
|
package/lib/ui/src/log.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(log_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(log_exports);
|
|
26
26
|
var import_core = require("@vxe-ui/core");
|
|
27
27
|
const { log } = import_core.VxeUI;
|
|
28
|
-
const tableVersion = `table v${"4.23.
|
|
28
|
+
const tableVersion = `table v${"4.23.18"}`;
|
|
29
29
|
function createComponentLog(name) {
|
|
30
30
|
const uiVersion = import_core.VxeUI.uiVersion ? `ui v${import_core.VxeUI.uiVersion}` : "";
|
|
31
31
|
const ganttVersion = import_core.VxeUI.ganttVersion ? `gantt v${import_core.VxeUI.ganttVersion}` : "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.19",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"typescript": "~5.9.3",
|
|
76
76
|
"vue": "3.4.27",
|
|
77
77
|
"vue-router": "~4.5.1",
|
|
78
|
-
"vxe-pc-ui": "4.20.
|
|
78
|
+
"vxe-pc-ui": "4.20.42"
|
|
79
79
|
},
|
|
80
80
|
"allowScripts": {
|
|
81
81
|
"esbuild": true,
|
|
@@ -305,15 +305,6 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
305
305
|
|
|
306
306
|
const gridExtendTableMethods = extendTableMethods(tableComponentMethodKeys) as VxeTableMethods
|
|
307
307
|
|
|
308
|
-
tableComponentMethodKeys.forEach((name) => {
|
|
309
|
-
gridExtendTableMethods[name] = (...args: any[]) => {
|
|
310
|
-
const $xeTable: any = refTable.value
|
|
311
|
-
if ($xeTable && $xeTable[name]) {
|
|
312
|
-
return $xeTable && $xeTable[name](...args)
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
})
|
|
316
|
-
|
|
317
308
|
const computeProxyOpts = computed(() => {
|
|
318
309
|
return XEUtils.merge({}, XEUtils.clone(getConfig().grid.proxyConfig, true), props.proxyConfig)
|
|
319
310
|
})
|