Skip to content

Commit 700f706

Browse files
committed
refactor!: rename ui prop to config in AutoForm component
1 parent 8550158 commit 700f706

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

docs/content/2.customization/1.index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can override the [global configuration](#global-configuration) for individua
3333
<template>
3434
<AutoForm
3535
:schema="schema"
36-
:ui="{
36+
:config="{
3737
submit: {
3838
component: 'CustomSubmitButton',
3939
},

src/runtime/components/AutoForm.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import * as z from 'zod'
1818
const props = withDefaults(defineProps<{
1919
schema: T
2020
initialState?: Partial<InferInput<T>>
21-
ui?: AutoFormConfig
21+
config?: AutoFormConfig
2222
}>(), {
2323
initialState: () => ({}),
2424
})
@@ -120,7 +120,7 @@ function submit() {
120120
}
121121
122122
const appConfig = computed<AutoFormConfig>(() => {
123-
return defu(props.ui, useAppConfig().autoForm)
123+
return defu(props.config, useAppConfig().autoForm)
124124
})
125125
126126
const submitButtonComponent = computed(() => {
@@ -143,7 +143,6 @@ const submitButtonProps = computed(() => {
143143
class="space-y-4"
144144
@submit="onSubmit"
145145
>
146-
147146
<slot name="before-fields" />
148147

149148
<UFormField

0 commit comments

Comments
 (0)