Skip to content

Commit

Permalink
feat: Add blur and focus events
Browse files Browse the repository at this point in the history
  • Loading branch information
apertureless committed Dec 27, 2018
1 parent 6aab7cd commit 6031382
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/PasswordStrengthMeter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
:required="required"
:disabled="disabled"
v-bind:value="value"
@input="evt => emitValue(evt.target.value)"
@input="evt => emitValue('input', evt.target.value)"
@blur="evt => emitValue('blur', evt.target.value)"
@focus="evt => emitValue('focus', evt.target.value)"
>
<div class="Password__icons">
<div
Expand Down Expand Up @@ -258,8 +260,8 @@
this.$data._showPassword = true
}
},
emitValue (value) {
this.$emit('input', value)
emitValue (type, value) {
this.$emit(type, value)
this.password = value
}
},
Expand Down

0 comments on commit 6031382

Please sign in to comment.