rate.wxml 836 B

12345678910111213141516171819202122
  1. <wxs src="./rate.wxs" module="utils" />
  2. <view class="{{ classPrefix }}">
  3. <view
  4. class="{{ classPrefix }}__wrapper {{prefix}}-class"
  5. style="font-size:{{ size }}px;"
  6. catch:touchmove="{{ !disabled ? 'onTouch' : '' }}"
  7. catch:touchstart="{{ !disabled ? 'onTouch' : '' }}"
  8. >
  9. <t-icon
  10. wx:for="{{ count }}"
  11. wx:key="*this"
  12. class="{{classPrefix }}__icon {{utils.getIconClass(classPrefix, defaultValue, value, index, allowHalf, disabled)}} "
  13. t-class="{{prefix}}-class-icon"
  14. name="{{utils.getIconName(defaultValue, value, index, variant)}}"
  15. size="{{ size }}"
  16. style="margin-right:{{ count - index > 1 ? gap : 0 }}px;"
  17. />
  18. </view>
  19. <text wx:if="{{showText}}" class="{{ classPrefix }}__text {{prefix}}-class-text"
  20. >{{utils.getText(texts,value,defaultTexts)}}</text
  21. >
  22. </view>