Answers for "vue radio button default checked"

0

vue radio button default checked

Apparently, Vue will check input if bound value is the same with input value:

Check out this fiddle: https://jsfiddle.net/v7zj4c13/188/

<input type="radio" name="gender" value="female" v-model="gender"/>
<input type="radio" name="gender" value="male" v-model="gender"/>

new Vue({
    el: '#demo',
    data: {
        gender: "female"
    }
})
Code above will checked the female input, not the male one
Posted by: Guest on March-13-2021

Code answers related to "vue radio button default checked"

Browse Popular Code Answers by Language