提交 513823bf 编写于 作者: 无木

fix(form): loss args on component change event

修复部分组件的change事件不止一个参数时,componentProps中配置的onChange只能接收到第一个参数的问题
上级 d683b0f1
......@@ -225,9 +225,10 @@
const eventKey = `on${upperFirst(changeEvent)}`;
const on = {
[eventKey]: (e: Nullable<Recordable>) => {
[eventKey]: (...args: Nullable<Recordable>[]) => {
const [e] = args;
if (propsData[eventKey]) {
propsData[eventKey](e);
propsData[eventKey](...args);
}
const target = e ? e.target : null;
const value = target ? (isCheck ? target.checked : target.value) : e;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册