fix(table): fix the table in the editable row status and press Enter to confirm #258
This commit is contained in:
parent
759e532079
commit
64533f6204
|
|
@ -11,6 +11,7 @@
|
||||||
- 修复代码 debugger 位置显示错误
|
- 修复代码 debugger 位置显示错误
|
||||||
- 修复 mock 插件 post 请求错误问题
|
- 修复 mock 插件 post 请求错误问题
|
||||||
- 修复部分主题颜色值错误
|
- 修复部分主题颜色值错误
|
||||||
|
- 修复表格在可编辑行状态回车确认
|
||||||
|
|
||||||
### 🎫 Chores
|
### 🎫 Chores
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
ref="elRef"
|
ref="elRef"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
@options-change="handleOptionsChange"
|
@options-change="handleOptionsChange"
|
||||||
@pressEnter="handleSubmit"
|
@pressEnter="handleEnter"
|
||||||
/>
|
/>
|
||||||
<div :class="`${prefixCls}__action`" v-if="!getRowEditable">
|
<div :class="`${prefixCls}__action`" v-if="!getRowEditable">
|
||||||
<CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmit" />
|
<CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmit" />
|
||||||
|
|
@ -234,6 +234,13 @@
|
||||||
isEdit.value = false;
|
isEdit.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handleEnter() {
|
||||||
|
if (props.column?.editRow) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
handleSubmit();
|
||||||
|
}
|
||||||
|
|
||||||
function handleCancel() {
|
function handleCancel() {
|
||||||
isEdit.value = false;
|
isEdit.value = false;
|
||||||
currentValueRef.value = defaultValueRef.value;
|
currentValueRef.value = defaultValueRef.value;
|
||||||
|
|
@ -311,6 +318,7 @@
|
||||||
getWrapperStyle,
|
getWrapperStyle,
|
||||||
getRowEditable,
|
getRowEditable,
|
||||||
getValues,
|
getValues,
|
||||||
|
handleEnter,
|
||||||
// getSize,
|
// getSize,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue