<view wx:for="{{9}}" wx:key="index"> {{item}} </view>
data: { arr: [1, 2, 3, 4, 5], obj:[ {id:0, name:'gl', year:1995}, {id:1, name:'sh', year:2005}, {id:2, name:'nj', year:2008} ] }
普通数组 - 循环5次
<view wx:for="{{arr}}" wx:key="item"> {{item}} </view>
对象数组 - 循环3次
<view wx:for="{{obj}}" wx:key="id"> {{item.name}}- {{item.year}} </view>
<view class="item" wx:for="{{arr}}" wx:key="index" wx:for-item='i'> <text wx:for="{{i+1}}" wx:key="index" wx:for-item='j'> <text class="item" wx:if="{{j>0}}">{{j}} * {{i}} = {{i*j}} </text> </text> </view>