1.vue renders a select through render on the list item. The options of the option is dynamic. How to render it through a loop within the render? The description is not clear, please see Code:
2.
data () {
return {
memberList:[
{"name":"","id":1},
{"name":"","id":2},
{"name":"","id":3}
]
}
}
/ list items
return [{
type: "index",
width: 60,
align: "center",
title: ""
},
{
title: "",
key: "title",
},
{
title: "",
key: "principalUserName",
render:(h,data) => {
var {
row,
column,
index
} = data
return h("FormItem",{
props:{
prop:"principalUserName"
}
},[
//selectoptionsmemberList
h("i-select",{
props:{}
},[
h("i-option",{
props:{
value:row
}
})
])
])
}
},
{
title: "",
key: "planStartDate",
},
{
title: "",
key: "planFinishDate",
}
]
I hope the great gods who are familiar with render can help--