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,12 +238,12 @@ | ||
| 238 | }); | 238 | }); |
| 239 | }, | 239 | }, |
| 240 | focus () { | 240 | focus () { |
| 241 | - this.$emit('on-focus'); | ||
| 242 | this.focused = true; | 241 | this.focused = true; |
| 242 | + this.$emit('on-focus'); | ||
| 243 | }, | 243 | }, |
| 244 | blur () { | 244 | blur () { |
| 245 | - this.$emit('on-blur'); | ||
| 246 | this.focused = false; | 245 | this.focused = false; |
| 246 | + this.$emit('on-blur'); | ||
| 247 | }, | 247 | }, |
| 248 | keyDown (e) { | 248 | keyDown (e) { |
| 249 | if (e.keyCode === 38) { | 249 | if (e.keyCode === 38) { |
| @@ -252,8 +252,6 @@ | @@ -252,8 +252,6 @@ | ||
| 252 | } else if (e.keyCode === 40) { | 252 | } else if (e.keyCode === 40) { |
| 253 | e.preventDefault(); | 253 | e.preventDefault(); |
| 254 | this.down(e); | 254 | this.down(e); |
| 255 | - } else if (e.keyCode === 13) { | ||
| 256 | - this.$emit('on-enter'); | ||
| 257 | } | 255 | } |
| 258 | }, | 256 | }, |
| 259 | change (event) { | 257 | change (event) { |