feat($input-number): add events 'on-focus', 'on-blur', 'on-enter' for input-number component
This commit is contained in:
parent
593742afbc
commit
c21a814287
1 changed files with 4 additions and 0 deletions
|
@ -238,9 +238,11 @@
|
|||
});
|
||||
},
|
||||
focus () {
|
||||
this.$emit('on-focus');
|
||||
this.focused = true;
|
||||
},
|
||||
blur () {
|
||||
this.$emit('on-blur');
|
||||
this.focused = false;
|
||||
},
|
||||
keyDown (e) {
|
||||
|
@ -250,6 +252,8 @@
|
|||
} else if (e.keyCode === 40) {
|
||||
e.preventDefault();
|
||||
this.down(e);
|
||||
} else if (e.keyCode === 13) {
|
||||
this.$emit('on-enter');
|
||||
}
|
||||
},
|
||||
change (event) {
|
||||
|
|
Loading…
Add table
Reference in a new issue