@@ -18,7 +18,7 @@ const props = defineProps({
18
18
const intValue = ref (0 )
19
19
const spinButton = ref (null )
20
20
21
- const emit = defineEmits ([' update:modelValue' , ' imp- increment' , ' imp -decrement' ])
21
+ const emit = defineEmits ([' update:modelValue' , ' ipm-input ' , ' ipm- increment' , ' ipm -decrement' ])
22
22
23
23
// computed
24
24
const canIncrement = computed (() => {
@@ -47,6 +47,7 @@ watch(() => props.modelValue, (newValue, oldValue) => {
47
47
const inputChange = () => {
48
48
if (props .modelValue !== undefined ) {
49
49
emit (' update:modelValue' , intValue .value )
50
+ emit (' ipm-input' , intValue .value )
50
51
}
51
52
}
52
53
const isSpinButtonFocused = () => {
@@ -65,14 +66,14 @@ const setToMax = () => {
65
66
const increment = () => {
66
67
if (canIncrement .value ) {
67
68
intValue .value = intValue .value + props .step
68
- emit (' imp -increment' , intValue .value )
69
+ emit (' ipm -increment' , intValue .value )
69
70
inputChange ()
70
71
}
71
72
}
72
73
const decrement = () => {
73
74
if (canDecrement .value ) {
74
75
intValue .value = intValue .value - props .step
75
- emit (' imp -decrement' , intValue .value )
76
+ emit (' ipm -decrement' , intValue .value )
76
77
inputChange ()
77
78
}
78
79
}
0 commit comments