提交 829b366c 编写于 作者: 无木

fix(table): editComponentProps support onChange

修复editComponentProps不支持onChange的问题
上级 3dbbde26
......@@ -44,7 +44,7 @@
import { propTypes } from '/@/utils/propTypes';
import { isString, isBoolean, isFunction, isNumber, isArray } from '/@/utils/is';
import { createPlaceholderMessage } from './helper';
import { set } from 'lodash-es';
import { set, omit } from 'lodash-es';
export default defineComponent({
name: 'EditableCell',
......@@ -108,7 +108,7 @@
return {
placeholder: createPlaceholderMessage(unref(getComponent)),
...apiSelectProps,
...compProps,
...omit(compProps, 'onChange'),
[valueField]: value,
};
});
......@@ -184,6 +184,8 @@
} else if (isString(e) || isBoolean(e) || isNumber(e)) {
currentValueRef.value = e;
}
const onChange = props.column?.editComponentProps?.onChange;
if (onChange && isFunction(onChange)) onChange(...arguments);
table.emit?.('edit-change', {
column: props.column,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册