there is a group of radio or checkbox option boxes, as follows:
<ul>
<li class="item" v-for="item in attrList">
<input :type="radio"
:id="getId()"
name="attrItem"
:class="inputClass"
:value="item.propertyValueId"
v-model="checkedList">
<label :for="getId(false)" :title="item.valueData">{{ item.valueData}}</label>
</li>
</ul>
data() {
return {
checkedList: [this.propertyValueId]
}
props: {
propertyValueId: {
type: Number,
default: null
},
// 0-radio 1-checkbox
inputType: {
type: Number,
default: 1
},
attrList: {
type: Array,
default: []
}
}
where the data format of attrList is as follows:
[
{
propertyValueId: 1,
valueData: "sku1 text alias"
},
{
propertyValueId: 2,
valueData: "sku1 text alias"
},
{
propertyValueId: 3,
valueData: "sku1 text alias"
}
]
how do I check the response box by default based on the incoming propertyValueId?