From 8d22231a5fa4afed19201a4a4e5c29d674498516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E6=9C=A8?= Date: Wed, 23 Jun 2021 00:27:11 +0800 Subject: [PATCH] fix(table): event editCancel loss params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复table的editCancel事件缺少部分参数的问题 --- .../Table/src/components/editable/EditableCell.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Table/src/components/editable/EditableCell.vue b/src/components/Table/src/components/editable/EditableCell.vue index 97aa1ee1..6517882e 100644 --- a/src/components/Table/src/components/editable/EditableCell.vue +++ b/src/components/Table/src/components/editable/EditableCell.vue @@ -249,7 +249,14 @@ function handleCancel() { isEdit.value = false; currentValueRef.value = defaultValueRef.value; - table.emit?.('edit-cancel', unref(currentValueRef)); + const { column, index, record } = props; + const { key, dataIndex } = column; + table.emit?.('edit-cancel', { + record, + index, + key: dataIndex || key, + value: unref(currentValueRef), + }); } function onClickOutside() { -- GitLab