Skip to content

Commit

Permalink
feat($input-number): add events 'on-focus', 'on-blur', 'on-enter' for…
Browse files Browse the repository at this point in the history
… input-number component
  • Loading branch information
btfrankenstein committed Nov 9, 2017
1 parent 593742a commit c21a814
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/input-number/input-number.vue
Expand Up @@ -238,9 +238,11 @@
});
},
focus () {
this.$emit('on-focus');
this.focused = true;
},
blur () {
this.$emit('on-blur');
this.focused = false;
},
keyDown (e) {
Expand All @@ -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) {
Expand Down

0 comments on commit c21a814

Please sign in to comment.