3👍
When you are using
<div>
<customInput v-model="value[0]" :max-value="10" />
</div
In App.vue you are passing a single value instead of an Array to HelloWorld.vue
So, either you change the type of value in the component from Array to Number, or change to:
<div>
<customInput v-model="value" :max-value="10" />
</div
Also, in HelloWorld.vue the input type is "number"
so even if you pass the array to the component you will have the warning.
So, do you need an array passed to the children component?
P.S. In the codesandbox you have this line missing the base: const newValue = parseInt(event.target.value);
it should be: const newValue = parseInt(event.target.value, 10);
- [Vuejs]-How to automatically replace a tag predefined
- [Vuejs]-VueJS define global function for child components
Source:stackexchange.com