add password plain text toggle
This commit is contained in:
parent
897d0590d2
commit
ec75210fd3
|
@ -17,16 +17,22 @@
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:rules="[val => (val && val.length > 0) || 'This field is required']"
|
:rules="[val => (val && val.length > 0) || 'This field is required']"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
type="password"
|
|
||||||
filled
|
|
||||||
v-model="credentials.password"
|
v-model="credentials.password"
|
||||||
|
filled
|
||||||
|
:type="isPwd ? 'password' : 'text'"
|
||||||
label="Password"
|
label="Password"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:rules="[val => (val && val.length > 0) || 'This field is required']"
|
: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>
|
<div>
|
||||||
<q-btn label="Login" type="submit" color="primary" class="full-width" />
|
<q-btn label="Login" type="submit" color="primary" class="full-width" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -70,6 +76,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
credentials: {},
|
credentials: {},
|
||||||
prompt: false,
|
prompt: false,
|
||||||
|
isPwd: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue