feat(Form): export loading state (#3861)

This commit is contained in:
Maxime Pauvert
2025-04-12 17:54:20 +02:00
committed by GitHub
parent 39c861a64b
commit fdee2522bb
2 changed files with 2 additions and 0 deletions

View File

@@ -278,6 +278,7 @@ defineExpose<Form<T>>({
},
disabled,
loading,
dirty: computed(() => !!dirtyFields.size),
dirtyFields: readonly(dirtyFields) as DeepReadonly<Set<keyof T>>,

View File

@@ -14,6 +14,7 @@ export interface Form<T extends object> {
submit (): Promise<void>
disabled: ComputedRef<boolean>
dirty: ComputedRef<boolean>
loading: Ref<boolean>
dirtyFields: DeepReadonly<Set<keyof T>>
touchedFields: DeepReadonly<Set<keyof T>>