mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-02-03 02:18:40 +08:00
fix(form): loss args on component change event
修复部分组件的change事件不止一个参数时,componentProps中配置的onChange只能接收到第一个参数的问题
This commit is contained in:
parent
d683b0f1e8
commit
513823bfbd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user