mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 03:38:54 +01:00
docs(Form): fixed invalid state attributes in examples (#479)
This commit is contained in:
committed by
Benjamin Canac
parent
75d26e0c2b
commit
e2146a5a58
@@ -10,8 +10,8 @@ const schema = Joi.object({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const state = ref({
|
const state = ref({
|
||||||
email: undefined,
|
emailJoi: undefined,
|
||||||
password: undefined
|
passwordJoi: undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
const form = ref()
|
const form = ref()
|
||||||
@@ -30,11 +30,11 @@ async function submit () {
|
|||||||
@submit.prevent="submit"
|
@submit.prevent="submit"
|
||||||
>
|
>
|
||||||
<UFormGroup label="Email" name="emailJoi">
|
<UFormGroup label="Email" name="emailJoi">
|
||||||
<UInput v-model="state.email" />
|
<UInput v-model="state.emailJoi" />
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UFormGroup label="Password" name="passwordJoi">
|
<UFormGroup label="Password" name="passwordJoi">
|
||||||
<UInput v-model="state.password" type="password" />
|
<UInput v-model="state.passwordJoi" type="password" />
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UButton type="submit">
|
<UButton type="submit">
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ const schema = object({
|
|||||||
type Schema = InferType<typeof schema>
|
type Schema = InferType<typeof schema>
|
||||||
|
|
||||||
const state = ref({
|
const state = ref({
|
||||||
email: undefined,
|
emailYup: undefined,
|
||||||
password: undefined
|
passwordYup: undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
const form = ref<Form<Schema>>()
|
const form = ref<Form<Schema>>()
|
||||||
@@ -33,11 +33,11 @@ async function submit () {
|
|||||||
@submit.prevent="submit"
|
@submit.prevent="submit"
|
||||||
>
|
>
|
||||||
<UFormGroup label="Email" name="emailYup">
|
<UFormGroup label="Email" name="emailYup">
|
||||||
<UInput v-model="state.email" />
|
<UInput v-model="state.emailYup" />
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UFormGroup label="Password" name="passwordYup">
|
<UFormGroup label="Password" name="passwordYup">
|
||||||
<UInput v-model="state.password" type="password" />
|
<UInput v-model="state.passwordYup" type="password" />
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UButton type="submit">
|
<UButton type="submit">
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ const schema = z.object({
|
|||||||
type Schema = z.output<typeof schema>
|
type Schema = z.output<typeof schema>
|
||||||
|
|
||||||
const state = ref({
|
const state = ref({
|
||||||
email: undefined,
|
emailZod: undefined,
|
||||||
password: undefined
|
passwordZod: undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
const form = ref<Form<Schema>>()
|
const form = ref<Form<Schema>>()
|
||||||
@@ -31,11 +31,11 @@ async function submit () {
|
|||||||
@submit.prevent="submit"
|
@submit.prevent="submit"
|
||||||
>
|
>
|
||||||
<UFormGroup label="Email" name="emailZod">
|
<UFormGroup label="Email" name="emailZod">
|
||||||
<UInput v-model="state.email" />
|
<UInput v-model="state.emailZod" />
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UFormGroup label="Password" name="passwordZod">
|
<UFormGroup label="Password" name="passwordZod">
|
||||||
<UInput v-model="state.password" type="password" />
|
<UInput v-model="state.passwordZod" type="password" />
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UButton type="submit">
|
<UButton type="submit">
|
||||||
|
|||||||
Reference in New Issue
Block a user