Skip to content

[Feature Request] 增加进入编辑模式前的方法回调 #556

@tiantianchuangduixiang

Description

@tiantianchuangduixiang

选择要提交 issue 的库

vue-easytable

Issue 类型

Feature

Issue 标题

增加进入编辑模式前的方法回调

这个功能解决了什么问题?

解决特定的单元格在一些场景内需禁止编辑 不能出现编辑框

你期望的 API 是什么样的?

let currentRow = this.tableData.find(
(x) => x[rowKeyFieldName] === rowKey,
);
const currentColumn = colgroups.find(
(x) => x.key === colKey,
);
const changeValue = editingCell.row[currentColumn.field];
let { editCellByDblClickBefore } = editOption
let isEdit = true
if (isFunction(editCellByDblClickBefore)) {
isEdit = editCellByDblClickBefore({
row: cloneDeep(currentRow),
column: currentColumn,
changeValue,
})
}

可以继续按照 目前的 editOption 这个方法进行添加回调 目前 我在ve-table->index.jsx-> editCellByClick中 增加了 该内容

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions