diff --git a/src/runtime/components/Form.vue b/src/runtime/components/Form.vue index 9437c0e6..ee824ad7 100644 --- a/src/runtime/components/Form.vue +++ b/src/runtime/components/Form.vue @@ -157,15 +157,12 @@ async function _validate(opts: { name?: string | string[], silent?: boolean, nes } async function onSubmit(payload: Event) { - const event = payload as SubmitEvent + const event = payload as FormSubmitEvent try { await _validate({ nested: true }) - const submitEvent: FormSubmitEvent = { - ...event, - data: props.state - } - emits('submit', submitEvent) + event.data = props.state + emits('submit', event) } catch (error) { if (!(error instanceof FormValidationException)) { throw error diff --git a/src/runtime/components/FormField.vue b/src/runtime/components/FormField.vue index 30ed69f3..1d682f1c 100644 --- a/src/runtime/components/FormField.vue +++ b/src/runtime/components/FormField.vue @@ -38,7 +38,7 @@ export interface FormFieldSlots {