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/lib/index.umd.js
CHANGED
|
@@ -318,7 +318,7 @@ function getDefaultConfig(val1, def1) {
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
// packages_temp/ui/index.ts
|
|
321
|
-
var version = "4.23.
|
|
321
|
+
var version = "4.23.18";
|
|
322
322
|
import_core2.VxeUI.version = version;
|
|
323
323
|
import_core2.VxeUI.tableVersion = version;
|
|
324
324
|
import_core2.VxeUI.setConfig({
|
|
@@ -1147,7 +1147,7 @@ function getPopupAppendElement(appendTo) {
|
|
|
1147
1147
|
// packages_temp/ui/src/log.ts
|
|
1148
1148
|
var import_core3 = require("@vxe-ui/core");
|
|
1149
1149
|
var { log } = import_core3.VxeUI;
|
|
1150
|
-
var tableVersion = `table v${"4.23.
|
|
1150
|
+
var tableVersion = `table v${"4.23.18"}`;
|
|
1151
1151
|
function createComponentLog(name) {
|
|
1152
1152
|
const uiVersion = import_core3.VxeUI.uiVersion ? `ui v${import_core3.VxeUI.uiVersion}` : "";
|
|
1153
1153
|
const ganttVersion = import_core3.VxeUI.ganttVersion ? `gantt v${import_core3.VxeUI.ganttVersion}` : "";
|
|
@@ -8880,17 +8880,17 @@ var import_panel_default = (
|
|
|
8880
8880
|
{
|
|
8881
8881
|
id: "VXE_IMPORT_MODAL",
|
|
8882
8882
|
modelValue: storeData2.visible,
|
|
8883
|
-
title: modelOptions.title
|
|
8884
|
-
className: "vxe-table-
|
|
8883
|
+
title: getDefaultConfig(modelOptions.title, getI18n6("vxe.import.impTitle")),
|
|
8884
|
+
className: "vxe-table-import-popup-wrapper" + (modelOptions.className ? ` ${modelOptions.className}` : ""),
|
|
8885
8885
|
width: modelOptions.width || 540,
|
|
8886
8886
|
height: modelOptions.height,
|
|
8887
8887
|
minWidth: modelOptions.minWidth || 360,
|
|
8888
8888
|
minHeight: modelOptions.minHeight || 240,
|
|
8889
8889
|
mask: getDefaultConfig(modelOptions.mask, true),
|
|
8890
8890
|
lockView: getDefaultConfig(modelOptions.lockView, true),
|
|
8891
|
-
showFooter: true,
|
|
8892
|
-
escClosable: true,
|
|
8893
|
-
maskClosable: true,
|
|
8891
|
+
showFooter: getDefaultConfig(modelOptions.showFooter, true),
|
|
8892
|
+
escClosable: getDefaultConfig(modelOptions.escClosable, true),
|
|
8893
|
+
maskClosable: getDefaultConfig(modelOptions.maskClosable, true),
|
|
8894
8894
|
position: modelOptions.position,
|
|
8895
8895
|
fullscreen: modelOptions.fullscreen,
|
|
8896
8896
|
remember: modelOptions.remember,
|
|
@@ -9276,17 +9276,17 @@ var export_panel_default = (
|
|
|
9276
9276
|
{
|
|
9277
9277
|
id: "VXE_EXPORT_MODAL",
|
|
9278
9278
|
modelValue: storeData2.visible,
|
|
9279
|
-
title: modelOptions.title
|
|
9280
|
-
className: "vxe-table-export-popup-wrapper",
|
|
9279
|
+
title: getDefaultConfig(modelOptions.title, getI18n7(isPrint ? "vxe.export.printTitle" : "vxe.export.expTitle")),
|
|
9280
|
+
className: "vxe-table-export-popup-wrapper" + (modelOptions.className ? ` ${modelOptions.className}` : ""),
|
|
9281
9281
|
width: modelOptions.width || 660,
|
|
9282
9282
|
height: modelOptions.height,
|
|
9283
9283
|
minWidth: modelOptions.minWidth || 500,
|
|
9284
9284
|
minHeight: modelOptions.minHeight || 400,
|
|
9285
9285
|
mask: getDefaultConfig(modelOptions.mask, true),
|
|
9286
9286
|
lockView: getDefaultConfig(modelOptions.lockView, true),
|
|
9287
|
-
showFooter: true,
|
|
9288
|
-
escClosable: true,
|
|
9289
|
-
maskClosable: true,
|
|
9287
|
+
showFooter: getDefaultConfig(modelOptions.showFooter, true),
|
|
9288
|
+
escClosable: getDefaultConfig(modelOptions.escClosable, true),
|
|
9289
|
+
maskClosable: getDefaultConfig(modelOptions.maskClosable, true),
|
|
9290
9290
|
position: modelOptions.position,
|
|
9291
9291
|
fullscreen: modelOptions.fullscreen,
|
|
9292
9292
|
remember: modelOptions.remember,
|
|
@@ -10725,8 +10725,6 @@ hooks3.add("tableEditModule", {
|
|
|
10725
10725
|
const { refElem } = $xeTable.getRefMaps();
|
|
10726
10726
|
const { computeMouseOpts, computeEditOpts, computeCheckboxOpts, computeTreeOpts, computeValidOpts, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
10727
10727
|
const browseObj = import_xe_utils18.default.browse();
|
|
10728
|
-
let editMethods = {};
|
|
10729
|
-
let editPrivateMethods = {};
|
|
10730
10728
|
const getEditColumnModel = (row, column) => {
|
|
10731
10729
|
const { model, editRender } = column;
|
|
10732
10730
|
if (editRender) {
|
|
@@ -11086,76 +11084,26 @@ hooks3.add("tableEditModule", {
|
|
|
11086
11084
|
const { editRender } = column;
|
|
11087
11085
|
const { isFocus, isPos, isClear } = options;
|
|
11088
11086
|
const cell = params.cell || $xeTable.getCellElement(row, column);
|
|
11089
|
-
const
|
|
11087
|
+
const beforeEditFn = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
11088
|
+
const beforeEditAsyncFn = editOpts.beforeEditAsyncMethod;
|
|
11090
11089
|
const editParams = { ...params, cell };
|
|
11091
|
-
if (cell
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
|
|
11100
|
-
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
column.renderHeight = cell.offsetHeight;
|
|
11109
|
-
actived.args = editParams;
|
|
11110
|
-
actived.row = row;
|
|
11111
|
-
actived.column = column;
|
|
11112
|
-
$xeTable.handlePushStack();
|
|
11113
|
-
if (isClear) {
|
|
11114
|
-
setCellValue(row, column, null);
|
|
11115
|
-
}
|
|
11116
|
-
if (mode === "row") {
|
|
11117
|
-
tableColumn.forEach((column2) => getEditColumnModel(row, column2));
|
|
11118
|
-
} else {
|
|
11119
|
-
getEditColumnModel(row, column);
|
|
11120
|
-
}
|
|
11121
|
-
const afterEditMethod = editOpts.afterEditMethod;
|
|
11122
|
-
(0, import_vue17.nextTick)(() => {
|
|
11123
|
-
if (isFocus) {
|
|
11124
|
-
$xeTable.handleFocus(editParams, evnt);
|
|
11125
|
-
}
|
|
11126
|
-
if (afterEditMethod) {
|
|
11127
|
-
afterEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
11128
|
-
}
|
|
11129
|
-
});
|
|
11130
|
-
}
|
|
11131
|
-
$xeTable.dispatchEvent(
|
|
11132
|
-
type,
|
|
11133
|
-
{
|
|
11134
|
-
row,
|
|
11135
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
11136
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
11137
|
-
column,
|
|
11138
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
11139
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
11140
|
-
},
|
|
11141
|
-
evnt
|
|
11142
|
-
);
|
|
11143
|
-
if (type === "edit-activated") {
|
|
11144
|
-
$xeTable.dispatchEvent(
|
|
11145
|
-
"edit-actived",
|
|
11146
|
-
{
|
|
11147
|
-
row,
|
|
11148
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
11149
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
11150
|
-
column,
|
|
11151
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
11152
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
11153
|
-
},
|
|
11154
|
-
evnt
|
|
11155
|
-
);
|
|
11156
|
-
}
|
|
11157
|
-
} else {
|
|
11158
|
-
const { column: oldColumn } = actived;
|
|
11090
|
+
if (!cell || !isEnableConf(editConfig) || !isEnableConf(editRender)) {
|
|
11091
|
+
return (0, import_vue17.nextTick)();
|
|
11092
|
+
}
|
|
11093
|
+
if ($xeTable.isPendingByRow(row) || $xeTable.isAggregateRecord(row)) {
|
|
11094
|
+
return (0, import_vue17.nextTick)();
|
|
11095
|
+
}
|
|
11096
|
+
if (actived.row !== row || (mode === "cell" ? actived.column !== column : false)) {
|
|
11097
|
+
const evntParams = {
|
|
11098
|
+
row,
|
|
11099
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
11100
|
+
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
11101
|
+
column,
|
|
11102
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
11103
|
+
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
11104
|
+
};
|
|
11105
|
+
const handleCellEdit = (status) => {
|
|
11106
|
+
if (status) {
|
|
11159
11107
|
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
11160
11108
|
$xeTable.clearSelected();
|
|
11161
11109
|
if ($xeTable.clearCellAreas) {
|
|
@@ -11163,29 +11111,81 @@ hooks3.add("tableEditModule", {
|
|
|
11163
11111
|
$xeTable.clearCopyCellArea();
|
|
11164
11112
|
}
|
|
11165
11113
|
}
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
setCellValue(row, oldColumn, oldModel.value);
|
|
11170
|
-
}
|
|
11171
|
-
if ($xeTable.clearValidate) {
|
|
11172
|
-
$xeTable.clearValidate(row, column);
|
|
11173
|
-
}
|
|
11114
|
+
$xeTable.closeTooltip();
|
|
11115
|
+
if (actived.column) {
|
|
11116
|
+
handleClearEdit(evnt);
|
|
11174
11117
|
}
|
|
11175
11118
|
column.renderHeight = cell.offsetHeight;
|
|
11176
11119
|
actived.args = editParams;
|
|
11120
|
+
actived.row = row;
|
|
11177
11121
|
actived.column = column;
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11122
|
+
$xeTable.handlePushStack();
|
|
11123
|
+
if (isClear) {
|
|
11124
|
+
setCellValue(row, column, null);
|
|
11125
|
+
}
|
|
11126
|
+
if (mode === "row") {
|
|
11127
|
+
tableColumn.forEach((column2) => getEditColumnModel(row, column2));
|
|
11128
|
+
} else {
|
|
11129
|
+
getEditColumnModel(row, column);
|
|
11182
11130
|
}
|
|
11131
|
+
const afterEditMethod = editOpts.afterEditMethod;
|
|
11132
|
+
(0, import_vue17.nextTick)(() => {
|
|
11133
|
+
if (isFocus) {
|
|
11134
|
+
$xeTable.handleFocus(editParams, evnt);
|
|
11135
|
+
}
|
|
11136
|
+
if (afterEditMethod) {
|
|
11137
|
+
afterEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
11138
|
+
}
|
|
11139
|
+
});
|
|
11140
|
+
$xeTable.dispatchEvent("edit-activated", evntParams, evnt);
|
|
11141
|
+
$xeTable.dispatchEvent("edit-actived", evntParams, evnt);
|
|
11142
|
+
} else {
|
|
11143
|
+
$xeTable.dispatchEvent("edit-disabled", evntParams, evnt);
|
|
11183
11144
|
}
|
|
11184
11145
|
focused.column = null;
|
|
11185
11146
|
focused.row = null;
|
|
11186
11147
|
$xeTable.focus();
|
|
11148
|
+
};
|
|
11149
|
+
const eFnParams = { ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
|
|
11150
|
+
if (beforeEditFn) {
|
|
11151
|
+
handleCellEdit(!!beforeEditFn(eFnParams));
|
|
11152
|
+
} else if (beforeEditAsyncFn) {
|
|
11153
|
+
return Promise.resolve().then(() => beforeEditAsyncFn(eFnParams)).catch(() => false).then((status) => {
|
|
11154
|
+
handleCellEdit(!!status);
|
|
11155
|
+
});
|
|
11156
|
+
} else {
|
|
11157
|
+
handleCellEdit(true);
|
|
11158
|
+
}
|
|
11159
|
+
return (0, import_vue17.nextTick)();
|
|
11160
|
+
}
|
|
11161
|
+
const { column: oldColumn } = actived;
|
|
11162
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
11163
|
+
$xeTable.clearSelected();
|
|
11164
|
+
if ($xeTable.clearCellAreas) {
|
|
11165
|
+
$xeTable.clearCellAreas();
|
|
11166
|
+
$xeTable.clearCopyCellArea();
|
|
11167
|
+
}
|
|
11168
|
+
}
|
|
11169
|
+
if (oldColumn && oldColumn !== column) {
|
|
11170
|
+
const { model: oldModel } = oldColumn;
|
|
11171
|
+
if (oldModel.update) {
|
|
11172
|
+
setCellValue(row, oldColumn, oldModel.value);
|
|
11173
|
+
}
|
|
11174
|
+
if ($xeTable.clearValidate) {
|
|
11175
|
+
$xeTable.clearValidate(row, column);
|
|
11187
11176
|
}
|
|
11188
11177
|
}
|
|
11178
|
+
column.renderHeight = cell.offsetHeight;
|
|
11179
|
+
actived.args = editParams;
|
|
11180
|
+
actived.column = column;
|
|
11181
|
+
if (isPos) {
|
|
11182
|
+
setTimeout(() => {
|
|
11183
|
+
$xeTable.handleFocus(editParams, evnt);
|
|
11184
|
+
});
|
|
11185
|
+
}
|
|
11186
|
+
focused.column = null;
|
|
11187
|
+
focused.row = null;
|
|
11188
|
+
$xeTable.focus();
|
|
11189
11189
|
return (0, import_vue17.nextTick)();
|
|
11190
11190
|
};
|
|
11191
11191
|
const handleEditCell = (row, fieldOrColumn, options) => {
|
|
@@ -11222,7 +11222,7 @@ hooks3.add("tableEditModule", {
|
|
|
11222
11222
|
}
|
|
11223
11223
|
return (0, import_vue17.nextTick)();
|
|
11224
11224
|
};
|
|
11225
|
-
editMethods = {
|
|
11225
|
+
const editMethods = {
|
|
11226
11226
|
/**
|
|
11227
11227
|
* 往表格中插入临时数据
|
|
11228
11228
|
*
|
|
@@ -11670,7 +11670,7 @@ hooks3.add("tableEditModule", {
|
|
|
11670
11670
|
}
|
|
11671
11671
|
return null;
|
|
11672
11672
|
};
|
|
11673
|
-
editPrivateMethods = {
|
|
11673
|
+
const editPrivateMethods = {
|
|
11674
11674
|
/**
|
|
11675
11675
|
* 处理激活编辑
|
|
11676
11676
|
*/
|
|
@@ -12892,9 +12892,11 @@ hooks4.add("tableExportModule", {
|
|
|
12892
12892
|
}
|
|
12893
12893
|
});
|
|
12894
12894
|
});
|
|
12895
|
-
} else
|
|
12896
|
-
if (
|
|
12897
|
-
import_core21.VxeUI.modal
|
|
12895
|
+
} else {
|
|
12896
|
+
if (opts.message !== false) {
|
|
12897
|
+
if (import_core21.VxeUI.modal) {
|
|
12898
|
+
import_core21.VxeUI.modal.message({ content: getI18n10("vxe.error.impFields"), status: "error" });
|
|
12899
|
+
}
|
|
12898
12900
|
}
|
|
12899
12901
|
if (_importReject) {
|
|
12900
12902
|
_importReject({ status: false, msg: "field mismatching" });
|
|
@@ -13111,13 +13113,9 @@ hooks4.add("tableExportModule", {
|
|
|
13111
13113
|
exportStore.isPrint = !!isPrint;
|
|
13112
13114
|
exportStore.hasColgroup = isGroup;
|
|
13113
13115
|
exportStore.visible = true;
|
|
13114
|
-
Object.assign(
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
mode: selectRecords.length ? "selected" : "current"
|
|
13118
|
-
},
|
|
13119
|
-
defOpts
|
|
13120
|
-
);
|
|
13116
|
+
Object.assign(exportParams, {
|
|
13117
|
+
mode: selectRecords.length ? "selected" : "current"
|
|
13118
|
+
}, defOpts);
|
|
13121
13119
|
const { filename, sheetName, mode, type } = exportParams;
|
|
13122
13120
|
if (filename) {
|
|
13123
13121
|
if (import_xe_utils19.default.isFunction(filename)) {
|
|
@@ -25120,7 +25118,8 @@ var table_default = (
|
|
|
25120
25118
|
const operArrow = isLeftArrow || isUpArrow || isRightArrow || isDwArrow;
|
|
25121
25119
|
const operCtxMenu = isContentMenu && ctxMenuStore.visible && (isEnter || isSpacebar || operArrow);
|
|
25122
25120
|
const isEditStatus = isEnableConf(editConfig) && actived.column && actived.row;
|
|
25123
|
-
const
|
|
25121
|
+
const beforeEditFn = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
25122
|
+
const beforeEditAsyncFn = editOpts.beforeEditAsyncMethod;
|
|
25124
25123
|
const selectRow = selected.row;
|
|
25125
25124
|
const selectColumn = selected.column;
|
|
25126
25125
|
if (operCtxMenu) {
|
|
@@ -25348,7 +25347,7 @@ var table_default = (
|
|
|
25348
25347
|
$grid: $xeGrid,
|
|
25349
25348
|
$gantt: $xeGantt
|
|
25350
25349
|
};
|
|
25351
|
-
|
|
25350
|
+
const handleEdit = () => {
|
|
25352
25351
|
if (delMethod) {
|
|
25353
25352
|
delMethod(params);
|
|
25354
25353
|
} else {
|
|
@@ -25360,6 +25359,20 @@ var table_default = (
|
|
|
25360
25359
|
}
|
|
25361
25360
|
$xeTable.updateFooter();
|
|
25362
25361
|
dispatchEvent("cell-delete-value", params, evnt);
|
|
25362
|
+
};
|
|
25363
|
+
if (beforeEditFn) {
|
|
25364
|
+
if (beforeEditFn(params)) {
|
|
25365
|
+
handleEdit();
|
|
25366
|
+
}
|
|
25367
|
+
} else if (beforeEditAsyncFn) {
|
|
25368
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
25369
|
+
if (status) {
|
|
25370
|
+
handleEdit();
|
|
25371
|
+
}
|
|
25372
|
+
}).catch(() => {
|
|
25373
|
+
});
|
|
25374
|
+
} else {
|
|
25375
|
+
handleEdit();
|
|
25363
25376
|
}
|
|
25364
25377
|
}
|
|
25365
25378
|
} else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
@@ -25379,7 +25392,7 @@ var table_default = (
|
|
|
25379
25392
|
$grid: $xeGrid,
|
|
25380
25393
|
$gantt: $xeGantt
|
|
25381
25394
|
};
|
|
25382
|
-
|
|
25395
|
+
const handleEdit = () => {
|
|
25383
25396
|
if (backMethod) {
|
|
25384
25397
|
backMethod(params);
|
|
25385
25398
|
} else {
|
|
@@ -25388,6 +25401,20 @@ var table_default = (
|
|
|
25388
25401
|
});
|
|
25389
25402
|
}
|
|
25390
25403
|
dispatchEvent("cell-backspace-value", params, evnt);
|
|
25404
|
+
};
|
|
25405
|
+
if (beforeEditFn) {
|
|
25406
|
+
if (beforeEditFn(params)) {
|
|
25407
|
+
handleEdit();
|
|
25408
|
+
}
|
|
25409
|
+
} else if (beforeEditAsyncFn) {
|
|
25410
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
25411
|
+
if (status) {
|
|
25412
|
+
handleEdit();
|
|
25413
|
+
}
|
|
25414
|
+
}).catch(() => {
|
|
25415
|
+
});
|
|
25416
|
+
} else {
|
|
25417
|
+
handleEdit();
|
|
25391
25418
|
}
|
|
25392
25419
|
}
|
|
25393
25420
|
}
|
|
@@ -25418,7 +25445,6 @@ var table_default = (
|
|
|
25418
25445
|
} 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)) {
|
|
25419
25446
|
const { editMode, editMethod } = keyboardOpts;
|
|
25420
25447
|
if (selectColumn && selectRow && isEnableConf(selectColumn.editRender)) {
|
|
25421
|
-
const beforeEditMethod2 = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
25422
25448
|
const params = {
|
|
25423
25449
|
row: selectRow,
|
|
25424
25450
|
rowIndex: $xeTable.getRowIndex(selectRow),
|
|
@@ -25432,7 +25458,7 @@ var table_default = (
|
|
|
25432
25458
|
$grid: $xeGrid,
|
|
25433
25459
|
$gantt: $xeGantt
|
|
25434
25460
|
};
|
|
25435
|
-
|
|
25461
|
+
const handleEdit = () => {
|
|
25436
25462
|
if (editMethod) {
|
|
25437
25463
|
editMethod(params);
|
|
25438
25464
|
} else {
|
|
@@ -25444,6 +25470,20 @@ var table_default = (
|
|
|
25444
25470
|
isClear: isClearValue
|
|
25445
25471
|
});
|
|
25446
25472
|
}
|
|
25473
|
+
};
|
|
25474
|
+
if (beforeEditFn) {
|
|
25475
|
+
if (beforeEditFn(params)) {
|
|
25476
|
+
handleEdit();
|
|
25477
|
+
}
|
|
25478
|
+
} else if (beforeEditAsyncFn) {
|
|
25479
|
+
Promise.resolve(beforeEditAsyncFn(params)).then((status) => {
|
|
25480
|
+
if (status) {
|
|
25481
|
+
handleEdit();
|
|
25482
|
+
}
|
|
25483
|
+
}).catch(() => {
|
|
25484
|
+
});
|
|
25485
|
+
} else {
|
|
25486
|
+
handleEdit();
|
|
25447
25487
|
}
|
|
25448
25488
|
}
|
|
25449
25489
|
}
|
|
@@ -26141,7 +26181,6 @@ var table_default = (
|
|
|
26141
26181
|
if (rowExpandedMaps[rowid]) {
|
|
26142
26182
|
rowExpandedMaps[rowid] = row;
|
|
26143
26183
|
}
|
|
26144
|
-
rowNum++;
|
|
26145
26184
|
idMaps[rowid] = true;
|
|
26146
26185
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
26147
26186
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
@@ -31209,6 +31248,7 @@ var table_default = (
|
|
|
31209
31248
|
const mouseOpts = computeMouseOpts.value;
|
|
31210
31249
|
const exportOpts = computeExportOpts.value;
|
|
31211
31250
|
const importOpts = computeImportOpts.value;
|
|
31251
|
+
const keyboardOpts = computeKeyboardOpts.value;
|
|
31212
31252
|
const rowDragOpts = computeRowDragOpts.value;
|
|
31213
31253
|
const areaOpts = computeAreaOpts.value;
|
|
31214
31254
|
const sortOpts = computeSortOpts.value;
|
|
@@ -31367,8 +31407,16 @@ var table_default = (
|
|
|
31367
31407
|
if (mouseOpts.area && props.treeConfig && !treeOpts.transform) {
|
|
31368
31408
|
errLog10("vxe.error.notSupportProp", ["mouse-config.area", "tree-config.transform=false", "tree-config.transform=true"]);
|
|
31369
31409
|
}
|
|
31370
|
-
if (props.editConfig
|
|
31371
|
-
|
|
31410
|
+
if (props.editConfig) {
|
|
31411
|
+
if (editOpts.activeMethod) {
|
|
31412
|
+
warnLog7("vxe.error.delProp", ["edit-config.activeMethod", "edit-config.beforeEditMethod"]);
|
|
31413
|
+
}
|
|
31414
|
+
if (editOpts.beforeEditMethod && editOpts.beforeEditAsyncMethod) {
|
|
31415
|
+
errLog10("vxe.error.errConflicts", ["edit-config.beforeEditMethod", "edit-config.beforeEditAsyncMethod"]);
|
|
31416
|
+
}
|
|
31417
|
+
if (keyboardOpts.isEdit && editOpts.beforeEditAsyncMethod) {
|
|
31418
|
+
warnLog7("vxe.error.errConflicts", ["keyboard-config.isEdit", "edit-config.beforeEditAsyncMethod"]);
|
|
31419
|
+
}
|
|
31372
31420
|
}
|
|
31373
31421
|
if (checkboxOpts.halfField) {
|
|
31374
31422
|
warnLog7("vxe.error.delProp", ["checkbox-config.halfField", "checkbox-config.indeterminateField"]);
|
|
@@ -32534,14 +32582,6 @@ var grid_default = (
|
|
|
32534
32582
|
return funcs;
|
|
32535
32583
|
};
|
|
32536
32584
|
const gridExtendTableMethods = extendTableMethods(tableComponentMethodKeys);
|
|
32537
|
-
tableComponentMethodKeys.forEach((name) => {
|
|
32538
|
-
gridExtendTableMethods[name] = (...args) => {
|
|
32539
|
-
const $xeTable = refTable.value;
|
|
32540
|
-
if ($xeTable && $xeTable[name]) {
|
|
32541
|
-
return $xeTable && $xeTable[name](...args);
|
|
32542
|
-
}
|
|
32543
|
-
};
|
|
32544
|
-
});
|
|
32545
32585
|
const computeProxyOpts = (0, import_vue25.computed)(() => {
|
|
32546
32586
|
return import_xe_utils27.default.merge({}, import_xe_utils27.default.clone(getConfig10().grid.proxyConfig, true), props.proxyConfig);
|
|
32547
32587
|
});
|