Skip to content

Commit

Permalink
fix(login): autocomplate form login
Browse files Browse the repository at this point in the history
  • Loading branch information
reynaldi rangga p committed Dec 1, 2021
1 parent b83651f commit e7cdfe4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pages/auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
autocomplete: {
type: String,
default: 'on',
},
});
const {message} = toRefs(props);
Expand Down Expand Up @@ -100,7 +104,11 @@ const onSubmit = (values) => {
{{ message }}
</v-alert>

<Form v-slot="{handleSubmit}" :validation-schema="schema">
<Form
v-slot="{handleSubmit}"
:validation-schema="schema"
:autocomplete="autocomplete"
>
<form @submit.prevent="handleSubmit(onSubmit)">
<div class="mt-8">
<Field v-slot="{errors, field}" name="email">
Expand All @@ -120,6 +128,7 @@ const onSubmit = (values) => {
:error-messages="[errors.email]"
error-class="min-h-[20px]"
class="mb-2"
:autocomplete="autocomplete"
v-bind="field"
>
<template #prepend>
Expand Down Expand Up @@ -149,6 +158,7 @@ const onSubmit = (values) => {
:error-messages="[errors.password]"
error-class="min-h-[20px]"
class="mb-2"
:autocomplete="autocomplete"
v-bind="field"
>
<template #prepend>
Expand Down

0 comments on commit e7cdfe4

Please sign in to comment.