1,html
<el-form-item :label="itemcontent.listtitle" v-if="itemcontent.type=='checkbox'" style="width:100%; display: inline-block">
<!-- 这里是多选 -->
<el-checkbox-group v-model="itemcontent.value">
<el-checkbox v-for="(itemlist,index3) in itemcontent.list" :key="index3" :label="itemlist.value">{{itemlist.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
2,data
"itemcontent": [
{
"listtitle": "意识",
"list": [
{
"value": "1021",
"name": "面罩"
},
{
"value": "1022",
"name": "气插"
},
{
"value": "1023",
"name": "气切"
}
],
"value": ["1021","1022"],
"type": "checkbox"
}
]
网友评论