fix: add keyup, keydown, keypress eventlistener of input component

This commit is contained in:
xingbofeng 2017-07-18 19:33:58 +08:00
parent 3e4bab9655
commit 9e7a37403b

View file

@ -19,6 +19,9 @@
:number="number"
:autofocus="autofocus"
@keyup.enter="handleEnter"
@keyup="handleKeyup"
@keypress="handleKeypress"
@keydown="handleKeydown"
@focus="handleFocus"
@blur="handleBlur"
@input="handleInput"
@ -39,6 +42,9 @@
:value="value"
:autofocus="autofocus"
@keyup.enter="handleEnter"
@keyup="handleKeyup"
@keypress="handleKeypress"
@keydown="handleKeydown"
@focus="handleFocus"
@blur="handleBlur"
@input="handleInput">
@ -154,6 +160,15 @@
handleEnter (event) {
this.$emit('on-enter', event);
},
handleKeydown (event) {
this.$emit('on-keydown', event);
},
handleKeypress(event) {
this.$emit('on-keypress', event);
},
handleKeyup (event) {
this.$emit('on-keyup', event);
},
handleIconClick (event) {
this.$emit('on-click', event);
},