vue针对循环中使用slot传参数问题
1,v-slot
<List :dataList="list" v-slot:fatherSlot="{item}">
<ListItem slot="fatherSlot">
<div slot="child">{
{item.title}}</div>
</ListItem>
</List>
2,slot-scope
<List :dataList="list" >
<ListItem slot="fatherSlot" slot-scope="slotProps">
<div slot="child">{
{slotProps.item.title}}</div>
</ListItem>
</List>
3,slot-scope+v-slot
<List :dataList="list" v-slot:fatherSlot="slotProps">
<ListItem slot="fatherSlot">
<div slot="child">{
{slotProps.item.title}}</div>
</ListItem>
</List>