我正在尝试在页面加载时向单选按钮添加默认值。我通过使用 v-for 循环一个 json 对象,然后尝试使用无线电组的 v-model 中的值,以便有一个默认值。对于某些无线电组不采用 v-for 值。如果我尝试打印出 v-for 中的当前值,它会起作用。
您会注意到它在单选按钮上方打印出值 3,但即使我尝试将其与 v-model 绑定,单选也不会采用该值 3
<v-card>
<v-card-text>
<h3>Team</h3>
{{ item.selectedTeam }}
<h3>Student(s) clearly defined a problem</h3>
{{ item.question1 }}
<br>
<label></label>
<v-flex xs12>
<v-radio-group v-model="item.question1" :mandatory="false" row error-messages>
<v-radio color="#0495c9" label="0" value="0"></v-radio>
<v-radio color="#0495c9" label="1" value="1"></v-radio>
<v-radio color="#0495c9" label="2" value="2"></v-radio>
<v-radio color="#0495c9" label="3" value="3"></v-radio>
</v-radio-group>
</v-flex>
<h3>There is a need for this product/service</h3>
{{ item.question2 }}