[Vuejs]-`model` property seems to do nothing

0👍

What you are describing is how v-model works

v-model="anything" is shorthand for :value="anything" @input="anything = $event". So unless you follow that convention of accepting a value prop and emiting an input event, your parent component will not work.

The reason that your first example works is because your radio button component accepts a value prop and you emit an input

So in this case you have two options, follow the convention of v-model in your radio-button component or do something custom and pass down any prop name and emit any event up.

Leave a comment