3👍
✅
- Render the list of
Users
withv-for
. - Bind the
<input>.value
to each item’sname
in thev-for
. This sets the radio’s intended value when selected, and that’s reflected in thev-model
.
<label v-for="user in Users" 1️⃣ >
<input type="radio" v-model="picked" :value="user.name" 2️⃣ />
<span>{{ user.name }}</span>
</label>
Source:stackexchange.com