Skip to content

Commit

Permalink
(feature) : handle keyup & keydown event
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisMazel committed Oct 17, 2019
1 parent 7234c3e commit 739ede0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/VueInputUi/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
:type="type"
class="field-input"
:disabled="disabled"
@keydown="keyDown"
@keyup="keyUp"
@focus="onFocus"
@blur="onBlur"
@click="$emit('click')"
Expand All @@ -37,6 +39,8 @@
:style="[borderStyle]"
:type="type"
class="field-input textarea"
@keydown="keyDown"
@keyup="keyUp"
@focus="onFocus"
@blur="onBlur"
@click="$emit('click')"
Expand Down Expand Up @@ -160,6 +164,12 @@
clear () {
this.$emit('input', null)
this.$emit('clear')
},
keyUp (e) {
this.$emit('keyup', e)
},
keyDown (e) {
this.$emit('keydown', e)
}
}
}
Expand Down

0 comments on commit 739ede0

Please sign in to comment.