<el-select v-model="value" @change="currentSel" placeholder="">
<el-option v-for="item in options1" :key="item.value" :label="item.parentId" :value="item.labelName"></el-option>
</el-select>
data structure
[
{
"id": 1,
"labelName": "",
"labelContent": null,
"labelRemark": null,
"parentId": 1
},
{
"id": 2,
"labelName": "",
"labelContent": null,
"labelRemark": null,
"parentId": 2
},
{
"id": 3,
"labelName": "",
"labelContent": null,
"labelRemark": null,
"parentId": 3
}
]
callback method
currentSel(selVal){
this.selVal = selVal;
console.log(selVal)
},
how to let me choose accessories selVal print 1, jewelry selVal print 2. That is, the value of the corresponding parentId