From 86e52ce58a5806a10b2c528623a888c3b4108489 Mon Sep 17 00:00:00 2001 From: Vben Date: Wed, 13 Nov 2024 22:53:09 +0800 Subject: [PATCH] fix: resolve onChange issue in form component (#4890) --- .../@core/ui-kit/form-ui/src/form-render/form-field.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue index af0ed900..bd3acaeb 100644 --- a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue +++ b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue @@ -238,6 +238,12 @@ function createComponentProps(slotProps: Record) { ...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;