front > login : add toggle visibility button
This commit is contained in:
parent
ba35e50c6f
commit
3f047abd38
1 changed files with 9 additions and 1 deletions
|
|
@ -21,13 +21,20 @@
|
|||
<div class="field | w-full">
|
||||
<label for="password">Mot de passe</label>
|
||||
<input
|
||||
type="password"
|
||||
:type="isPasswordVisible ? 'text' : 'password'"
|
||||
v-model="password"
|
||||
id="password"
|
||||
autocomplete="current-password"
|
||||
class="w-full rounded-md border border-grey-200 px-16 py-12"
|
||||
required
|
||||
/>
|
||||
<button
|
||||
class="btn | w-full"
|
||||
type="button"
|
||||
@click="isPasswordVisible = !isPasswordVisible"
|
||||
>
|
||||
{{ isPasswordVisible ? 'masquer' : 'afficher' }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="error" v-if="errorMessage" v-html="errorMessage"></p>
|
||||
<button
|
||||
|
|
@ -47,6 +54,7 @@ import { ref, watch } from 'vue';
|
|||
const email = ref('');
|
||||
const isValidEmail = ref(false);
|
||||
const password = ref('');
|
||||
const isPasswordVisible = ref(false);
|
||||
const errorMessage = ref(null);
|
||||
|
||||
const submitBtn = ref({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue