mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-31 20:28:09 +01:00
feat(Form): expose loading state to default slot (#4247)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -59,7 +59,7 @@ export interface FormEmits<S extends FormSchema, T extends boolean = true> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface FormSlots {
|
export interface FormSlots {
|
||||||
default(props?: { errors: FormError[] }): any
|
default(props?: { errors: FormError[], loading: boolean }): any
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -315,6 +315,6 @@ defineExpose<Form<S>>({
|
|||||||
:class="ui({ class: props.class })"
|
:class="ui({ class: props.class })"
|
||||||
@submit.prevent="onSubmitWrapper"
|
@submit.prevent="onSubmitWrapper"
|
||||||
>
|
>
|
||||||
<slot :errors="errors" />
|
<slot :errors="errors" :loading="loading" />
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user