小程序for循環嵌套


<view class='nocontnt' wx:if="{{listLength == 0 }}">
  暫無相關評論
</view>
<view class='' wx:elif="{{listLength != 0 }}">
  <view class="evaluateBox" wx:for="{{evaluateList}}" wx:key="*">
    <image src="{{item.head_pic}}" class='avatarUrl'></image>
    <view class='evaluateR'>
      <view class='evaluateT'>
        <text class='c-g3'>{{item.nickname}}</text>
        <text class='c-g9'>{{item.create_time}}</text>
      </view> 
      <view class='evaluateCon'>{{item.info}}</view>  
    //item.img_pic是循環下的 <view class='img-evaluate' wx:if="{{item.img_pic !=0 }}" > <image wx:for = "{{item.img_pic}}" wx:for-item="img_pic" wx:key="img_pic" src='{{img_pic}}'></image> </view> </view> </view> </view>

 

 

    


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM