diff --git a/components/lib/inputnumber/InputNumber.vue b/components/lib/inputnumber/InputNumber.vue index adc2e2e16..2e97f69ff 100755 --- a/components/lib/inputnumber/InputNumber.vue +++ b/components/lib/inputnumber/InputNumber.vue @@ -535,7 +535,7 @@ export default { const isDecimalSign = this.isDecimalSign(char); const isMinusSign = this.isMinusSign(char); - if (((event.code.startsWith('Digit') || event.code.startsWith('Numpad')) && Number(char) >= 0 && Number(char) <= 9) || isMinusSign || isDecimalSign) { + if (['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(char) || isMinusSign || isDecimalSign) { this.insert(event, char, { isDecimalSign, isMinusSign }); }