组件循环调用 slot 时如何传值?

发布于 8 年前作者 min124085 次浏览最后编辑 8 年前来自 issues

比如自定义组件中有如下代码:

<view wx:for="{{items}}" wx:for-key="id" wx:for-item="item" wx:for-index="index">

	<slot></slot>

</view>

如何将循环中的 item 和 index 变量传给 slot?

1 回复
yan19
yan191 楼6 年前

没明白,你为什么要传给slot?