add password plain text toggle

This commit is contained in:
Bob 2021-09-11 03:10:00 +00:00
parent 897d0590d2
commit ec75210fd3
1 changed files with 12 additions and 5 deletions

View File

@ -17,16 +17,22 @@
lazy-rules
:rules="[val => (val && val.length > 0) || 'This field is required']"
/>
<q-input
type="password"
filled
v-model="credentials.password"
filled
:type="isPwd ? 'password' : 'text'"
label="Password"
lazy-rules
:rules="[val => (val && val.length > 0) || 'This field is required']"
/>
>
<template v-slot:append>
<q-icon
:name="isPwd ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="isPwd = !isPwd"
/>
</template>
</q-input>
<div>
<q-btn label="Login" type="submit" color="primary" class="full-width" />
</div>
@ -70,6 +76,7 @@ export default {
return {
credentials: {},
prompt: false,
isPwd: true,
};
},