葡萄架
2021-01-27 1a85dff57d934be2f0d4bb1056ca3412cb946fa6
Fix the return value when editing the cell(#219)

修正单元格编辑提交时的返回值 .这个地方应该返回真实值,而不是editValueMap处理后的值或Select插槽的option.label。
1个文件已修改
6 ■■■■ 已修改文件
src/components/Table/src/components/editable/EditableCell.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/src/components/editable/EditableCell.vue
@@ -227,12 +227,12 @@
        if (!isPass) return false;
        const { column, index } = props;
        const { key, dataIndex } = column;
        // const value = unref(currentValueRef);
        const value = unref(currentValueRef);
        if (!key || !dataIndex) return;
        const dataKey = (dataIndex || key) as string;
        const record = await table.updateTableData(index, dataKey, unref(getValues));
        needEmit && table.emit?.('edit-end', { record, index, key, value: unref(currentValueRef) });
        const record = await table.updateTableData(index, dataKey, value);
        needEmit && table.emit?.('edit-end', { record, index, key, value});
        isEdit.value = false;
      }