How can I get the value of a radio input and pass it to a function using @click in Vue.js. I actually want to do something like this:
<input type="radio" name="phone" :value="mobile.value" @click = "setPrice(value)">
What is the right syntax?
For what your asking click here to see the answer
Checkout this straightforward example how input radio works with vue.js
<input type="radio" id="one" value="One" v-model="picked">
<label for="one">One</label>
<br>
<input type="radio" id="two" value="Two" v-model="picked">
<label for="two">Two</label>
<br>
and the script:
export default {
data: {
return {
picked: 'One'
}
}
}