Fixed #675 - Add the 'enter' key support to InputNumber

pull/682/head
mertsincan 2020-11-26 10:11:04 +03:00
parent b17a65d98b
commit 427f53f905
1 changed files with 8 additions and 0 deletions

View File

@ -409,6 +409,14 @@ export default {
} }
break; break;
//enter
case 13:
let newValue = this.validateValue(this.parseValue(this.$refs.input.$el.value));
this.$refs.input.$el.value = this.formatValue(newValue);
this.$refs.input.$el.setAttribute('aria-valuenow', newValue);
this.updateModel(event, newValue);
break;
//backspace //backspace
case 8: { case 8: {
event.preventDefault(); event.preventDefault();