提交 fab7a6c5 编写于 作者: V Vben

fix(table): ensure that editable cell values are echoed correctly close #335

上级 e15737b9
......@@ -15,7 +15,7 @@ const demoList = (() => {
export default [
{
url: '/basic-api/select/getDemoOptions',
timeout: 4000,
timeout: 2000,
method: 'get',
response: ({ query }) => {
console.log(query);
......
......@@ -13,7 +13,6 @@
:popoverVisible="getRuleVisible"
:rule="getRule"
:ruleMessage="ruleMessage"
allowClear
size="small"
ref="elRef"
@change="handleChange"
......@@ -183,14 +182,16 @@
async function handleChange(e: any) {
const component = unref(getComponent);
if (e?.target && Reflect.has(e.target, 'value')) {
if (!e) {
currentValueRef.value = e;
} else if (e?.target && Reflect.has(e.target, 'value')) {
currentValueRef.value = (e as ChangeEvent).target.value;
}
if (component === 'Checkbox') {
} else if (component === 'Checkbox') {
currentValueRef.value = (e as ChangeEvent).target.checked;
} else if (isString(e) || isBoolean(e) || isNumber(e)) {
currentValueRef.value = e;
}
table.emit?.('edit-change', {
column: props.column,
value: unref(currentValueRef),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册