fix: add keyup, keydown, keypress eventlistener of input component
This commit is contained in:
parent
3e4bab9655
commit
9e7a37403b
1 changed files with 15 additions and 0 deletions
|
@ -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);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue