子组件child
<template>
<view class="container">
<view v-for="(item, index) in list" :key="index">
<image></image>
<slot :name="`slot${index}`"></slot>
</view>
</view>
</template>
父组件
<child>
//这里怎么传递内容呢
<template v-for="(item, index) in list" slot="slot{{index}}">
<text>66666666</text>
</template>
</child>
1 个回复
DCloud_UNI_WZF
小程序端暂不支持动态作用域插槽,具名作用域插槽语法 #[插槽名称变量]='接收数据变量名'