index.wxml 1.0 KB

12345678910
  1. <view class="l-rate l-class">
  2. <view style="{{itemGap&&index!=0?'margin-left:'+itemGap+'rpx':''}}" wx:for="{{count}}" wx:key="item" class="l-rate-star" data-index="{{index}}" mut-bind:tap="handleClick">
  3. <view class="icon-checked" wx:if="{{score > index}}" hover-class="none" hover-stop-propagation="false" data-rate="{{score-index}}" style="width:{{score-index<1?(score-index)*100:100}}%">
  4. <image wx:if="{{activeImage && inActiveImage}}" class="image-item l-class-image l-image-class" src="{{activeImage}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
  5. <l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{activeColor}}"/>
  6. </view>
  7. <image wx:if="{{activeImage && inActiveImage}}" class="image-item l-class-image l-image-class" src="{{inActiveImage}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
  8. <l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{inActiveColor}}"></l-icon>
  9. </view>
  10. </view>