Closed tiantianchuangduixiang closed 1 year ago
vue-easytable
Feature
增加进入编辑模式前的方法回调
解决特定的单元格在一些场景内需禁止编辑 不能出现编辑框
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中 增加了 该内容
已支持: https://github.com/Happy-Coding-Clans/vue-easytable/releases/tag/v2.25.0
选择要提交 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中 增加了 该内容