Commit a2a18a4600fe60651d42692aca9124c303ecc6b7
Committed by
GitHub

1 parent
c21a8142
Update input-number.vue
remove `on-enter` because excessive and inflexible
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
src/components/input-number/input-number.vue
... | ... | @@ -238,12 +238,12 @@ |
238 | 238 | }); |
239 | 239 | }, |
240 | 240 | focus () { |
241 | - this.$emit('on-focus'); | |
242 | 241 | this.focused = true; |
242 | + this.$emit('on-focus'); | |
243 | 243 | }, |
244 | 244 | blur () { |
245 | - this.$emit('on-blur'); | |
246 | 245 | this.focused = false; |
246 | + this.$emit('on-blur'); | |
247 | 247 | }, |
248 | 248 | keyDown (e) { |
249 | 249 | if (e.keyCode === 38) { |
... | ... | @@ -252,8 +252,6 @@ |
252 | 252 | } else if (e.keyCode === 40) { |
253 | 253 | e.preventDefault(); |
254 | 254 | this.down(e); |
255 | - } else if (e.keyCode === 13) { | |
256 | - this.$emit('on-enter'); | |
257 | 255 | } |
258 | 256 | }, |
259 | 257 | change (event) { | ... | ... |