Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tiantianchuangduixiang opened this issue Mar 30, 2023 · 1 comment
Closed

Comments

@tiantianchuangduixiang
Copy link

选择要提交 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中 增加了 该内容

@huangshuwei
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants