Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/vtable/src/edit/edit-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { getCellEventArgsSet } from '../event/util';
import type { SimpleHeaderLayoutMap } from '../layout';
import { isPromise } from '../tools/helper';
import { isValid } from '@visactor/vutils';
import type { IIconGraphicAttribute } from '../scenegraph/graphic/icon';

export class EditManager {
table: BaseTableAPI;
Expand Down Expand Up @@ -43,13 +44,21 @@ export class EditManager {
// 如果是双击自动列宽 则编辑不开启
return;
}
if ((e.target?.attribute as IIconGraphicAttribute)?.funcType) {
// 点击功能图标不进入编辑
return;
}
this.beginTriggerEditCellMode = 'doubleclick';
this.startEditCell(col, row);
});

const clickEventId = table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
const { editCellTrigger = 'doubleclick' } = table.options;
if (editCellTrigger === 'click' || (Array.isArray(editCellTrigger) && editCellTrigger.includes('click'))) {
if ((e.target?.attribute as IIconGraphicAttribute)?.funcType) {
// 点击功能图标不进入编辑
return;
}
this.beginTriggerEditCellMode = 'click';
const { col, row } = e;
this.startEditCell(col, row);
Expand Down
Loading