radio.wxml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <view class="{{classPrefix}} {{prefix}}-class {{classPrefix}}--{{align}}">
  2. <!-- 图标 -->
  3. <view
  4. class="{{classPrefix}}__icon {{classPrefix}}__icon--{{align}} {{prefix}}-class-icon"
  5. data-target="icon"
  6. bind:tap="handleTap"
  7. >
  8. <view wx:if="{{customIcon}}" class="{{classPrefix}}__image">
  9. <image src="{{active ? iconVal[0] : iconVal[1]}}" class="{{classPrefix}}-icon__image" webp />
  10. </view>
  11. <t-icon
  12. wx:else
  13. color="{{active && !disabled ? color : ''}}"
  14. name="{{active ? iconVal[0] : iconVal[1]}}"
  15. class="{{classPrefix}}__btn {{disabled ? classPrefix + '-is-disabled' : ''}} {{active ? classPrefix + '-is-checked' : ''}}"
  16. />
  17. </view>
  18. <!-- 文本内容 -->
  19. <view
  20. class="{{classPrefix}}__content {{disabled ? classPrefix + '__content--disabled' : ''}}"
  21. data-target="text"
  22. bind:tap="handleTap"
  23. >
  24. <!-- 主文本 -->
  25. <view
  26. class="{{classPrefix}}__title {{prefix}}-class-label"
  27. style="-webkit-line-clamp:{{maxLabelRow}}"
  28. >
  29. {{label}}
  30. </view>
  31. <!-- content -->
  32. <view
  33. class="{{classPrefix}}__description {{prefix}}-class-content "
  34. style="-webkit-line-clamp:{{maxContentRow}}"
  35. >
  36. {{content}}
  37. <slot />
  38. </view>
  39. </view>
  40. <!-- 预制下边框 -->
  41. <view
  42. class="{{classPrefix}}__border {{classPrefix}}__border--{{align}} {{prefix}}-class-border"
  43. ></view>
  44. </view>