Fixed #2336 - v2 PrimeVue @keyup.enter event does not work on InputNumber component
parent
6c97e0a8f0
commit
4e22038457
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<span :class="containerClass" :style="styles">
|
||||
<INInputText ref="input" :class="['p-inputnumber-input', inputClass]" :style="inputStyle" :value="formattedValue" v-bind="$attrs" :aria-valumin="min" :aria-valuemax="max"
|
||||
@input="onUserInput" @keydown="onInputKeyDown" @keypress="onInputKeyPress" @paste="onPaste" @click="onInputClick" @focus="onInputFocus" @blur="onInputBlur"/>
|
||||
@input="onUserInput" @keydown="onInputKeyDown" @keyup="onInputKeyUp" @keypress="onInputKeyPress" @paste="onPaste" @click="onInputClick" @focus="onInputFocus" @blur="onInputBlur"/>
|
||||
<span class="p-inputnumber-button-group" v-if="showButtons && buttonLayout === 'stacked'">
|
||||
<INButton :class="upButtonClass" :icon="incrementButtonIcon" v-on="upButtonListeners" :disabled="$attrs.disabled" />
|
||||
<INButton :class="downButtonClass" :icon="decrementButtonIcon" v-on="downButtonListeners" :disabled="$attrs.disabled" />
|
||||
|
@ -525,6 +525,9 @@ export default {
|
|||
break;
|
||||
}
|
||||
},
|
||||
onInputKeyUp(event) {
|
||||
this.$emit('keyup', event);
|
||||
},
|
||||
onInputKeyPress(event) {
|
||||
event.preventDefault();
|
||||
let code = event.which || event.keyCode;
|
||||
|
|
Loading…
Reference in New Issue