Skip to content

Commit 6031382

Browse files
committed
feat: Add blur and focus events
1 parent 6aab7cd commit 6031382

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/components/PasswordStrengthMeter.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
:required="required"
1515
:disabled="disabled"
1616
v-bind:value="value"
17-
@input="evt => emitValue(evt.target.value)"
17+
@input="evt => emitValue('input', evt.target.value)"
18+
@blur="evt => emitValue('blur', evt.target.value)"
19+
@focus="evt => emitValue('focus', evt.target.value)"
1820
>
1921
<div class="Password__icons">
2022
<div
@@ -258,8 +260,8 @@
258260
this.$data._showPassword = true
259261
}
260262
},
261-
emitValue (value) {
262-
this.$emit('input', value)
263+
emitValue (type, value) {
264+
this.$emit(type, value)
263265
this.password = value
264266
}
265267
},

0 commit comments

Comments
 (0)