fix: ensure computedEvents returns an empty object when componentEvents is undefined

pull/51/head
chenminjie 2024-11-27 17:05:31 +08:00
parent cade5b0f8f
commit 7db92b069e
1 changed files with 5 additions and 3 deletions

View File

@ -161,9 +161,11 @@ const computedProps = computed(() => {
}); });
const computedEvents = computed(() => { const computedEvents = computed(() => {
return isFunction(componentEvents) return (
? componentEvents(values.value, formApi!) (isFunction(componentEvents)
: componentEvents; ? componentEvents(values.value, formApi!)
: componentEvents) ?? {}
);
}); });
watch( watch(