小程序评价组件多层

 1 <view class='wrap'>
 2   <view wx:for="{{typeArr}}" wx:key="{{index}}" wx:for-index="idx" wx:for-item="child" class='liWrap'>
 3       <view class='li1' wx:for="{{child.stars}}"  wx:key="{{index}}">
 4         <image class="star-image" style="left: {{item*82}}rpx;"
 5         src="{{child.key > item ?(child.key - item == 0.5?child.halfSrc:child.selectedSrc) : child.normalSrc}}">
 6           <view  class="item" style="left:0rpx;" data-index="{{idx}}" data-key="{{item+0.5}}" bindtap="selectLeft"></view>
 7           <view  class="item" style="left:21rpx;" data-index="{{idx}}" data-key="{{item+1}}" bindtap="selectRight"></view>
 8         </image>
 9       </view>
10       <view class='liText1'>{{child.typename}}</view>
11   </view>
12 </view>
wxml

相关文章:

  • 2021-12-18
  • 2022-12-23
  • 2021-08-22
  • 2021-12-06
  • 2022-12-23
  • 2021-08-31
  • 2021-12-10
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2021-05-19
  • 2021-08-30
  • 2022-12-23
相关资源
相似解决方案