vxe-table 3.14.2 → 3.14.3
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/style.css +1 -1
- package/es/table/module/menu/mixin.js +8 -7
- package/es/table/src/methods.js +104 -57
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +117 -78
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/menu/mixin.js +10 -7
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/src/methods.js +105 -69
- package/lib/table/src/methods.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/table/module/menu/mixin.ts +9 -7
- package/packages/table/src/methods.ts +104 -57
- /package/es/{iconfont.1743125678150.ttf → iconfont.1743389110592.ttf} +0 -0
- /package/es/{iconfont.1743125678150.woff → iconfont.1743389110592.woff} +0 -0
- /package/es/{iconfont.1743125678150.woff2 → iconfont.1743389110592.woff2} +0 -0
- /package/lib/{iconfont.1743125678150.ttf → iconfont.1743389110592.ttf} +0 -0
- /package/lib/{iconfont.1743125678150.woff → iconfont.1743389110592.woff} +0 -0
- /package/lib/{iconfont.1743125678150.woff2 → iconfont.1743389110592.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.14.
|
|
2223
|
+
const version = "3.14.3";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2843,7 +2843,7 @@ function isNodeElement(elem) {
|
|
|
2843
2843
|
const {
|
|
2844
2844
|
log: log_log
|
|
2845
2845
|
} = core_.VxeUI;
|
|
2846
|
-
const log_version = `table v${"3.14.
|
|
2846
|
+
const log_version = `table v${"3.14.3"}`;
|
|
2847
2847
|
const warnLog = log_log.create('warn', log_version);
|
|
2848
2848
|
const errLog = log_log.create('error', log_version);
|
|
2849
2849
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5776,11 +5776,11 @@ function updateStyle($xeTable) {
|
|
|
5776
5776
|
}
|
|
5777
5777
|
if (xLeftCornerEl) {
|
|
5778
5778
|
xLeftCornerEl.style.width = scrollbarXToTop ? `${osbWidth}px` : '';
|
|
5779
|
-
xLeftCornerEl.style.display = scrollbarXToTop ?
|
|
5779
|
+
xLeftCornerEl.style.display = scrollbarXToTop ? overflowX && osbHeight ? 'block' : '' : '';
|
|
5780
5780
|
}
|
|
5781
5781
|
if (xRightCornerEl) {
|
|
5782
5782
|
xRightCornerEl.style.width = scrollbarXToTop ? '' : `${osbWidth}px`;
|
|
5783
|
-
xRightCornerEl.style.display = scrollbarXToTop ? '' :
|
|
5783
|
+
xRightCornerEl.style.display = scrollbarXToTop ? '' : overflowX && osbHeight ? 'block' : '';
|
|
5784
5784
|
}
|
|
5785
5785
|
const scrollYVirtualEl = $xeTable.$refs.refScrollYVirtualElem;
|
|
5786
5786
|
if (scrollYVirtualEl) {
|
|
@@ -5791,7 +5791,7 @@ function updateStyle($xeTable) {
|
|
|
5791
5791
|
const yTopCornerEl = $xeTable.$refs.refScrollYTopCornerElem;
|
|
5792
5792
|
if (yTopCornerEl) {
|
|
5793
5793
|
yTopCornerEl.style.height = `${headerHeight}px`;
|
|
5794
|
-
yTopCornerEl.style.display = headerHeight ? 'block' : '';
|
|
5794
|
+
yTopCornerEl.style.display = overflowY && headerHeight ? 'block' : '';
|
|
5795
5795
|
}
|
|
5796
5796
|
const yWrapperEl = $xeTable.$refs.refScrollYWrapperElem;
|
|
5797
5797
|
if (yWrapperEl) {
|
|
@@ -5802,7 +5802,7 @@ function updateStyle($xeTable) {
|
|
|
5802
5802
|
if (yBottomCornerEl) {
|
|
5803
5803
|
yBottomCornerEl.style.height = `${footerHeight}px`;
|
|
5804
5804
|
yBottomCornerEl.style.top = `${headerHeight + bodyHeight}px`;
|
|
5805
|
-
yBottomCornerEl.style.display = footerHeight ? 'block' : '';
|
|
5805
|
+
yBottomCornerEl.style.display = overflowY && footerHeight ? 'block' : '';
|
|
5806
5806
|
}
|
|
5807
5807
|
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
5808
5808
|
if (rowExpandEl) {
|
|
@@ -11140,32 +11140,38 @@ const Methods = {
|
|
|
11140
11140
|
*/
|
|
11141
11141
|
handleGlobalKeydownEvent(evnt) {
|
|
11142
11142
|
const $xeTable = this;
|
|
11143
|
+
const props = $xeTable;
|
|
11143
11144
|
const internalData = $xeTable;
|
|
11145
|
+
const reactData = $xeTable;
|
|
11144
11146
|
const $xeGrid = $xeTable.$xeGrid;
|
|
11145
11147
|
// 该行为只对当前激活的表格有效
|
|
11146
|
-
if (
|
|
11147
|
-
|
|
11148
|
+
if (internalData.isActivated) {
|
|
11149
|
+
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
11148
11150
|
const {
|
|
11149
|
-
afterFullData
|
|
11150
|
-
} = internalData;
|
|
11151
|
-
const {
|
|
11152
|
-
filterStore,
|
|
11153
|
-
isCtxMenu,
|
|
11154
|
-
ctxMenuStore,
|
|
11155
|
-
editStore,
|
|
11156
|
-
editOpts,
|
|
11157
|
-
editConfig,
|
|
11158
11151
|
mouseConfig,
|
|
11159
|
-
mouseOpts,
|
|
11160
11152
|
keyboardConfig,
|
|
11161
|
-
keyboardOpts,
|
|
11162
11153
|
treeConfig,
|
|
11163
|
-
|
|
11154
|
+
editConfig,
|
|
11164
11155
|
highlightCurrentRow,
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11156
|
+
highlightCurrentColumn
|
|
11157
|
+
} = props;
|
|
11158
|
+
const {
|
|
11159
|
+
ctxMenuStore,
|
|
11160
|
+
editStore,
|
|
11161
|
+
currentRow
|
|
11162
|
+
} = reactData;
|
|
11163
|
+
const {
|
|
11164
|
+
afterFullData
|
|
11165
|
+
} = internalData;
|
|
11166
|
+
const isMenu = $xeTable.computeIsMenu;
|
|
11167
|
+
const bodyMenu = $xeTable.computeBodyMenu;
|
|
11168
|
+
const keyboardOpts = $xeTable.computeKeyboardOpts;
|
|
11169
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
11170
|
+
const editOpts = $xeTable.computeEditOpts;
|
|
11171
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
11172
|
+
const menuList = $xeTable.computeMenuList;
|
|
11173
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
11174
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
11169
11175
|
const {
|
|
11170
11176
|
selected,
|
|
11171
11177
|
actived
|
|
@@ -11190,33 +11196,44 @@ const Methods = {
|
|
|
11190
11196
|
const hasShiftKey = evnt.shiftKey;
|
|
11191
11197
|
const hasAltKey = evnt.altKey;
|
|
11192
11198
|
const operArrow = isLeftArrow || isUpArrow || isRightArrow || isDwArrow;
|
|
11193
|
-
const operCtxMenu =
|
|
11199
|
+
const operCtxMenu = isMenu && ctxMenuStore.visible && (isEnter || isSpacebar || operArrow);
|
|
11194
11200
|
const isEditStatus = isEnableConf(editConfig) && actived.column && actived.row;
|
|
11195
11201
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
11196
11202
|
const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
11197
|
-
if (filterStore.visible) {
|
|
11198
|
-
if (isEsc) {
|
|
11199
|
-
this.closeFilter();
|
|
11200
|
-
}
|
|
11201
|
-
return;
|
|
11202
|
-
}
|
|
11203
11203
|
if (operCtxMenu) {
|
|
11204
11204
|
// 如果配置了右键菜单; 支持方向键操作、回车
|
|
11205
11205
|
evnt.preventDefault();
|
|
11206
11206
|
if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
|
|
11207
|
-
|
|
11207
|
+
$xeTable.moveCtxMenu(evnt, ctxMenuStore, 'selectChild', isLeftArrow, false, ctxMenuStore.selected.children);
|
|
11208
11208
|
} else {
|
|
11209
|
-
|
|
11209
|
+
$xeTable.moveCtxMenu(evnt, ctxMenuStore, 'selected', isRightArrow, true, menuList);
|
|
11210
|
+
}
|
|
11211
|
+
} else if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKeyboardCellAreaEvent) {
|
|
11212
|
+
$xeTable.handleKeyboardCellAreaEvent(evnt);
|
|
11213
|
+
} else if (isEsc) {
|
|
11214
|
+
// 如果按下了 Esc 键,关闭快捷菜单、筛选
|
|
11215
|
+
if ($xeTable.closeMenu) {
|
|
11216
|
+
$xeTable.closeMenu();
|
|
11217
|
+
}
|
|
11218
|
+
$xeTable.closeFilter();
|
|
11219
|
+
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
11220
|
+
// 如果是激活编辑状态,则取消编辑
|
|
11221
|
+
if (actived.row) {
|
|
11222
|
+
const params = actived.args;
|
|
11223
|
+
$xeTable.handleClearEdit(evnt);
|
|
11224
|
+
// 如果配置了选中功能,则为选中状态
|
|
11225
|
+
if (mouseOpts.selected) {
|
|
11226
|
+
$xeTable.$nextTick(() => $xeTable.handleSelected(params, evnt));
|
|
11227
|
+
}
|
|
11228
|
+
}
|
|
11210
11229
|
}
|
|
11211
|
-
} else if (keyboardConfig && mouseConfig && mouseOpts.area && this.handleKeyboardCellAreaEvent) {
|
|
11212
|
-
this.handleKeyboardCellAreaEvent(evnt);
|
|
11213
11230
|
} else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
|
|
11214
11231
|
// 空格键支持选中复选框
|
|
11215
11232
|
evnt.preventDefault();
|
|
11216
11233
|
if (selected.column.type === 'checkbox') {
|
|
11217
|
-
|
|
11234
|
+
$xeTable.handleToggleCheckRowEvent(evnt, selected.args);
|
|
11218
11235
|
} else {
|
|
11219
|
-
|
|
11236
|
+
$xeTable.triggerRadioRowEvent(evnt, selected.args);
|
|
11220
11237
|
}
|
|
11221
11238
|
} else if (isF2 && isEnableConf(editConfig)) {
|
|
11222
11239
|
if (!isEditStatus) {
|
|
@@ -11224,12 +11241,12 @@ const Methods = {
|
|
|
11224
11241
|
if (selected.row && selected.column) {
|
|
11225
11242
|
evnt.stopPropagation();
|
|
11226
11243
|
evnt.preventDefault();
|
|
11227
|
-
|
|
11244
|
+
$xeTable.handleEdit(selected.args, evnt);
|
|
11228
11245
|
}
|
|
11229
11246
|
}
|
|
11230
11247
|
} else if (isContextMenu) {
|
|
11231
11248
|
// 如果按下上下文键
|
|
11232
|
-
internalData._keyCtx = selected.row && selected.column &&
|
|
11249
|
+
internalData._keyCtx = selected.row && selected.column && bodyMenu.length;
|
|
11233
11250
|
clearTimeout(internalData.keyCtxTimeout);
|
|
11234
11251
|
internalData.keyCtxTimeout = setTimeout(() => {
|
|
11235
11252
|
internalData._keyCtx = false;
|
|
@@ -11245,10 +11262,10 @@ const Methods = {
|
|
|
11245
11262
|
// 如果是激活编辑状态,则取消编辑
|
|
11246
11263
|
if (actived.row) {
|
|
11247
11264
|
const params = actived.args;
|
|
11248
|
-
|
|
11265
|
+
$xeTable.handleClearEdit(evnt);
|
|
11249
11266
|
// 如果配置了选中功能,则为选中状态
|
|
11250
11267
|
if (mouseConfig && mouseOpts.selected) {
|
|
11251
|
-
|
|
11268
|
+
$xeTable.$nextTick(() => $xeTable.handleSelected(params, evnt));
|
|
11252
11269
|
}
|
|
11253
11270
|
}
|
|
11254
11271
|
} else {
|
|
@@ -11257,13 +11274,13 @@ const Methods = {
|
|
|
11257
11274
|
const activeParams = selected.row ? selected.args : actived.args;
|
|
11258
11275
|
if (hasShiftKey) {
|
|
11259
11276
|
if (keyboardOpts.enterToTab) {
|
|
11260
|
-
|
|
11277
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
11261
11278
|
} else {
|
|
11262
|
-
|
|
11279
|
+
$xeTable.moveEnterSelected(activeParams, isLeftArrow, true, isRightArrow, false, evnt);
|
|
11263
11280
|
}
|
|
11264
11281
|
} else {
|
|
11265
11282
|
if (keyboardOpts.enterToTab) {
|
|
11266
|
-
|
|
11283
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
11267
11284
|
} else {
|
|
11268
11285
|
const activeRow = selected.row || actived.row;
|
|
11269
11286
|
const activeColumn = selected.column || actived.column;
|
|
@@ -11296,7 +11313,7 @@ const Methods = {
|
|
|
11296
11313
|
return;
|
|
11297
11314
|
}
|
|
11298
11315
|
}
|
|
11299
|
-
|
|
11316
|
+
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
|
|
11300
11317
|
if (enterMethod) {
|
|
11301
11318
|
enterMethod(etrParams);
|
|
11302
11319
|
}
|
|
@@ -11310,26 +11327,37 @@ const Methods = {
|
|
|
11310
11327
|
evnt.preventDefault();
|
|
11311
11328
|
const targetRow = childrens[0];
|
|
11312
11329
|
const params = {
|
|
11313
|
-
$table:
|
|
11314
|
-
row: targetRow
|
|
11330
|
+
$table: $xeTable,
|
|
11331
|
+
row: targetRow,
|
|
11332
|
+
rowIndex: $xeTable.getRowIndex(targetRow),
|
|
11333
|
+
$rowIndex: $xeTable.getVMRowIndex(targetRow)
|
|
11315
11334
|
};
|
|
11316
|
-
|
|
11335
|
+
$xeTable.setTreeExpand(currentRow, true).then(() => $xeTable.scrollToRow(targetRow)).then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
|
|
11317
11336
|
}
|
|
11318
11337
|
}
|
|
11319
11338
|
}
|
|
11320
11339
|
} else if (operArrow && keyboardConfig && keyboardOpts.isArrow) {
|
|
11321
11340
|
if (!isEditStatus) {
|
|
11322
11341
|
// 如果按下了方向键
|
|
11323
|
-
if (selected.row && selected.column) {
|
|
11342
|
+
if (mouseOpts.selected && selected.row && selected.column) {
|
|
11324
11343
|
$xeTable.moveArrowSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
|
|
11344
|
+
} else {
|
|
11345
|
+
// 当前行按键上下移动
|
|
11346
|
+
if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
|
|
11347
|
+
$xeTable.moveCurrentRow(isUpArrow, isDwArrow, evnt);
|
|
11348
|
+
}
|
|
11349
|
+
// 当前行按键左右移动
|
|
11350
|
+
if ((isLeftArrow || isRightArrow) && (columnOpts.isCurrent || highlightCurrentColumn)) {
|
|
11351
|
+
$xeTable.moveCurrentColumn(isLeftArrow, isRightArrow, evnt);
|
|
11352
|
+
}
|
|
11325
11353
|
}
|
|
11326
11354
|
}
|
|
11327
11355
|
} else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
11328
11356
|
// 如果按下了 Tab 键切换
|
|
11329
11357
|
if (selected.row || selected.column) {
|
|
11330
|
-
|
|
11358
|
+
$xeTable.moveTabSelected(selected.args, hasShiftKey, evnt);
|
|
11331
11359
|
} else if (actived.row || actived.column) {
|
|
11332
|
-
|
|
11360
|
+
$xeTable.moveTabSelected(actived.args, hasShiftKey, evnt);
|
|
11333
11361
|
}
|
|
11334
11362
|
} else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selected.row || selected.column)) {
|
|
11335
11363
|
// 如果是删除键
|
|
@@ -11339,10 +11367,10 @@ const Methods = {
|
|
|
11339
11367
|
} = keyboardOpts;
|
|
11340
11368
|
const params = {
|
|
11341
11369
|
row: selected.row,
|
|
11342
|
-
rowIndex:
|
|
11370
|
+
rowIndex: $xeTable.getRowIndex(selected.row),
|
|
11343
11371
|
column: selected.column,
|
|
11344
|
-
columnIndex:
|
|
11345
|
-
$table:
|
|
11372
|
+
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
11373
|
+
$table: $xeTable,
|
|
11346
11374
|
$grid: $xeGrid
|
|
11347
11375
|
};
|
|
11348
11376
|
// 是否被禁用
|
|
@@ -11353,8 +11381,8 @@ const Methods = {
|
|
|
11353
11381
|
setCellValue(selected.row, selected.column, null);
|
|
11354
11382
|
}
|
|
11355
11383
|
// 如果按下 del 键,更新表尾数据
|
|
11356
|
-
|
|
11357
|
-
|
|
11384
|
+
$xeTable.updateFooter();
|
|
11385
|
+
$xeTable.dispatchEvent('cell-delete-value', params, evnt);
|
|
11358
11386
|
}
|
|
11359
11387
|
}
|
|
11360
11388
|
} else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selected.row || selected.column)) {
|
|
@@ -11367,10 +11395,10 @@ const Methods = {
|
|
|
11367
11395
|
if (keyboardOpts.isDel && isEnableConf(editConfig) && (selected.row || selected.column)) {
|
|
11368
11396
|
const params = {
|
|
11369
11397
|
row: selected.row,
|
|
11370
|
-
rowIndex:
|
|
11398
|
+
rowIndex: $xeTable.getRowIndex(selected.row),
|
|
11371
11399
|
column: selected.column,
|
|
11372
|
-
columnIndex:
|
|
11373
|
-
$table:
|
|
11400
|
+
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
11401
|
+
$table: $xeTable,
|
|
11374
11402
|
$grid: $xeGrid
|
|
11375
11403
|
};
|
|
11376
11404
|
// 是否被禁用
|
|
@@ -11382,9 +11410,9 @@ const Methods = {
|
|
|
11382
11410
|
if (editMode !== 'insert') {
|
|
11383
11411
|
setCellValue(selected.row, selected.column, null);
|
|
11384
11412
|
}
|
|
11385
|
-
|
|
11413
|
+
$xeTable.handleEdit(selected.args, evnt);
|
|
11386
11414
|
}
|
|
11387
|
-
|
|
11415
|
+
$xeTable.dispatchEvent('cell-backspace-value', params, evnt);
|
|
11388
11416
|
}
|
|
11389
11417
|
}
|
|
11390
11418
|
}
|
|
@@ -11392,19 +11420,19 @@ const Methods = {
|
|
|
11392
11420
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
11393
11421
|
const {
|
|
11394
11422
|
parent: parentRow
|
|
11395
|
-
} = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(
|
|
11423
|
+
} = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(internalData.afterTreeFullData, item => item === currentRow, {
|
|
11396
11424
|
children: childrenField
|
|
11397
11425
|
});
|
|
11398
11426
|
if (parentRow) {
|
|
11399
11427
|
evnt.preventDefault();
|
|
11400
11428
|
const params = {
|
|
11401
11429
|
row: parentRow,
|
|
11402
|
-
rowIndex:
|
|
11403
|
-
$rowIndex:
|
|
11404
|
-
$table:
|
|
11430
|
+
rowIndex: $xeTable.getRowIndex(parentRow),
|
|
11431
|
+
$rowIndex: $xeTable.getVMRowIndex(parentRow),
|
|
11432
|
+
$table: $xeTable,
|
|
11405
11433
|
$grid: $xeGrid
|
|
11406
11434
|
};
|
|
11407
|
-
|
|
11435
|
+
$xeTable.setTreeExpand(parentRow, false).then(() => $xeTable.scrollToRow(parentRow)).then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
|
|
11408
11436
|
}
|
|
11409
11437
|
} else if (keyboardConfig && keyboardOpts.isEdit && !hasCtrlKey && !hasMetaKey && (isSpacebar || keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90 || keyCode >= 96 && keyCode <= 111 || keyCode >= 186 && keyCode <= 192 || keyCode >= 219 && keyCode <= 222)) {
|
|
11410
11438
|
const {
|
|
@@ -11419,10 +11447,10 @@ const Methods = {
|
|
|
11419
11447
|
const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
11420
11448
|
const params = {
|
|
11421
11449
|
row: selected.row,
|
|
11422
|
-
rowIndex:
|
|
11450
|
+
rowIndex: $xeTable.getRowIndex(selected.row),
|
|
11423
11451
|
column: selected.column,
|
|
11424
|
-
columnIndex:
|
|
11425
|
-
$table:
|
|
11452
|
+
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
11453
|
+
$table: $xeTable,
|
|
11426
11454
|
$grid: $xeGrid
|
|
11427
11455
|
};
|
|
11428
11456
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
@@ -11430,12 +11458,12 @@ const Methods = {
|
|
|
11430
11458
|
editMethod(params);
|
|
11431
11459
|
} else {
|
|
11432
11460
|
setCellValue(selected.row, selected.column, null);
|
|
11433
|
-
|
|
11461
|
+
$xeTable.handleEdit(selected.args, evnt);
|
|
11434
11462
|
}
|
|
11435
11463
|
}
|
|
11436
11464
|
}
|
|
11437
11465
|
}
|
|
11438
|
-
|
|
11466
|
+
$xeTable.dispatchEvent('keydown', {}, evnt);
|
|
11439
11467
|
});
|
|
11440
11468
|
}
|
|
11441
11469
|
},
|
|
@@ -15340,6 +15368,7 @@ const Methods = {
|
|
|
15340
15368
|
elemStore,
|
|
15341
15369
|
fullColumnIdData
|
|
15342
15370
|
} = internalData;
|
|
15371
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
15343
15372
|
const tableBody = $xeTable.$refs.refTableBody;
|
|
15344
15373
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
15345
15374
|
if (tableBodyElem) {
|
|
@@ -15398,6 +15427,9 @@ const Methods = {
|
|
|
15398
15427
|
if (scrollXSpaceEl) {
|
|
15399
15428
|
scrollXSpaceEl.style.width = `${ySpaceWidth}px`;
|
|
15400
15429
|
}
|
|
15430
|
+
if (isScrollXBig && mouseOpts.area) {
|
|
15431
|
+
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
15432
|
+
}
|
|
15401
15433
|
$xeTable.$nextTick(() => {
|
|
15402
15434
|
updateStyle($xeTable);
|
|
15403
15435
|
});
|
|
@@ -15433,6 +15465,7 @@ const Methods = {
|
|
|
15433
15465
|
const {
|
|
15434
15466
|
startIndex
|
|
15435
15467
|
} = scrollYStore;
|
|
15468
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
15436
15469
|
const expandOpts = $xeTable.computeExpandOpts;
|
|
15437
15470
|
const rowOpts = $xeTable.computeRowOpts;
|
|
15438
15471
|
const cellOpts = $xeTable.computeCellOpts;
|
|
@@ -15513,6 +15546,9 @@ const Methods = {
|
|
|
15513
15546
|
reactData.scrollYTop = scrollYTop;
|
|
15514
15547
|
reactData.scrollYHeight = scrollYHeight;
|
|
15515
15548
|
reactData.isScrollYBig = isScrollYBig;
|
|
15549
|
+
if (isScrollYBig && mouseOpts.area) {
|
|
15550
|
+
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
15551
|
+
}
|
|
15516
15552
|
return $xeTable.$nextTick().then(() => {
|
|
15517
15553
|
updateStyle($xeTable);
|
|
15518
15554
|
});
|
|
@@ -20774,7 +20810,9 @@ const {
|
|
|
20774
20810
|
|
|
20775
20811
|
|
|
20776
20812
|
const {
|
|
20777
|
-
menus: mixin_menus
|
|
20813
|
+
menus: mixin_menus,
|
|
20814
|
+
globalEvents: mixin_globalEvents,
|
|
20815
|
+
GLOBAL_EVENT_KEYS
|
|
20778
20816
|
} = core_.VxeUI;
|
|
20779
20817
|
/* harmony default export */ var menu_mixin = ({
|
|
20780
20818
|
methods: {
|
|
@@ -20791,17 +20829,18 @@ const {
|
|
|
20791
20829
|
return this.$nextTick();
|
|
20792
20830
|
},
|
|
20793
20831
|
// 处理菜单的移动
|
|
20794
|
-
moveCtxMenu(evnt,
|
|
20832
|
+
moveCtxMenu(evnt, ctxMenuStore, property, hasOper, operRest, menuList) {
|
|
20833
|
+
const $xeTable = this;
|
|
20795
20834
|
let selectItem;
|
|
20796
20835
|
const selectIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(menuList, item => ctxMenuStore[property] === item);
|
|
20797
|
-
if (
|
|
20836
|
+
if (hasOper) {
|
|
20798
20837
|
if (operRest && hasChildrenList(ctxMenuStore.selected)) {
|
|
20799
20838
|
ctxMenuStore.showChild = true;
|
|
20800
20839
|
} else {
|
|
20801
20840
|
ctxMenuStore.showChild = false;
|
|
20802
20841
|
ctxMenuStore.selectChild = null;
|
|
20803
20842
|
}
|
|
20804
|
-
} else if (
|
|
20843
|
+
} else if (mixin_globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP)) {
|
|
20805
20844
|
for (let len = selectIndex - 1; len >= 0; len--) {
|
|
20806
20845
|
if (menuList[len].visible !== false) {
|
|
20807
20846
|
selectItem = menuList[len];
|
|
@@ -20809,7 +20848,7 @@ const {
|
|
|
20809
20848
|
}
|
|
20810
20849
|
}
|
|
20811
20850
|
ctxMenuStore[property] = selectItem || menuList[menuList.length - 1];
|
|
20812
|
-
} else if (
|
|
20851
|
+
} else if (mixin_globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN)) {
|
|
20813
20852
|
for (let index = selectIndex + 1; index < menuList.length; index++) {
|
|
20814
20853
|
if (menuList[index].visible !== false) {
|
|
20815
20854
|
selectItem = menuList[index];
|
|
@@ -20817,8 +20856,8 @@ const {
|
|
|
20817
20856
|
}
|
|
20818
20857
|
}
|
|
20819
20858
|
ctxMenuStore[property] = selectItem || menuList[0];
|
|
20820
|
-
} else if (ctxMenuStore[property] && (
|
|
20821
|
-
|
|
20859
|
+
} else if (ctxMenuStore[property] && (mixin_globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER) || mixin_globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.SPACEBAR))) {
|
|
20860
|
+
$xeTable.ctxMenuLinkEvent(evnt, ctxMenuStore[property]);
|
|
20822
20861
|
}
|
|
20823
20862
|
},
|
|
20824
20863
|
/**
|