fix: resolve onChange issue in form component (#4890)

pull/48/MERGE
Vben 2024-11-13 22:53:09 +08:00 committed by GitHub
parent 9ddaba5333
commit 86e52ce58a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -238,6 +238,12 @@ function createComponentProps(slotProps: Record<string, any>) {
...slotProps.componentField,
...computedProps.value,
...bindEvents,
...(Reflect.has(computedProps.value, 'onChange')
? { onChange: computedProps.value.onChange }
: {}),
...(Reflect.has(computedProps.value, 'onInput')
? { onInput: computedProps.value.onInput }
: {}),
};
return binds;