0👍
You can emit an event with any name you want, so in the child you can write:
<input type="radio" @input="$emit('prop', prop)" v-model="prop" :value="value">
Then in the parent you can do:
<radio-component v-model="radio1" @prop="doSomething" value="1" name="nameValue"></radio-component>
.
.
.
data(){
return {
nameValue: null
}
methods: {
doSomthing(prop){
this.nameValue = prop
}
}
- [Vuejs]-How to deploy nuxt js in production without hotreloading?
- [Vuejs]-Vue + Mocha, 0 test passing if vue singlefile has <style> tag
Source:stackexchange.com