小程序多层循环嵌套,怎么获取一个连续的index?
代码:
<block wx:for="{{info.catalog}}" wx:key="{{index}}">
<view class="wsui-flex wsui-main--between wsui-cross--center lesson-item lesson-bg">
<view class="flex-grow-1 wsui-elip1 title">{{item}}</view>
<view class="icon icon-gengduoyouhua"></view>
</view>
<block wx:for="{{info.catalog_child[index]}}" wx:key="{{itemm}}" wx:for-item="itemm" wx:for-index="indexx">
<view class="wsui-flex wsui-main--between wsui-cross--center lesson-item lesson-sec">
<view class="flex-grow-1 wsui-elip1 title">{{index}}.{{itemm}}</view>
</view>
</block>
</block>
要求做到如下样式