fix(table): fix the table in the editable row status and press Enter to confirm #258

This commit is contained in:
vben 2021-02-09 00:04:51 +08:00
parent 759e532079
commit 64533f6204
2 changed files with 10 additions and 1 deletions

View File

@ -11,6 +11,7 @@
- 修复代码 debugger 位置显示错误
- 修复 mock 插件 post 请求错误问题
- 修复部分主题颜色值错误
- 修复表格在可编辑行状态回车确认
### 🎫 Chores

View File

@ -17,7 +17,7 @@
ref="elRef"
@change="handleChange"
@options-change="handleOptionsChange"
@pressEnter="handleSubmit"
@pressEnter="handleEnter"
/>
<div :class="`${prefixCls}__action`" v-if="!getRowEditable">
<CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmit" />
@ -234,6 +234,13 @@
isEdit.value = false;
}
async function handleEnter() {
if (props.column?.editRow) {
return;
}
handleSubmit();
}
function handleCancel() {
isEdit.value = false;
currentValueRef.value = defaultValueRef.value;
@ -311,6 +318,7 @@
getWrapperStyle,
getRowEditable,
getValues,
handleEnter,
// getSize,
};
},