0๐
new Vue({
el: '#app',
data(){
return {
form : {
services : []
},
team : {
services : [
{
"name" : "Service name #1",
"id" : 1
},
{
"name" : "Service name #2",
"id" : 2
}
]
}
}
}
});
<div id="app">
<label v-for="service in team.services">
<input type="checkbox" v-model="form.services" :value="service.id"/>{{service.name}}
</label>
{{form.services}}
</div>
- [Vuejs]-How to limits an input to specific values without checking keycodes and without flickering the value?
- [Vuejs]-V-for loop method to not directly cause rendering
Source:stackexchange.com