index.axml 1.3 KB

1234567891011121314151617181920
  1. <view class='radio-index {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <import-sjs from='../wxs/utils.sjs' name='utils'>
  3. </import-sjs>
  4. <view class='van-radio {{customClass}}'>
  5. <view a:if="{{ labelPosition === 'left' }}" class="{{labelClass}} {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}" onTap='antmoveAction' data-antmove-tap='onClickLabel'>
  6. <slot>
  7. </slot>
  8. </view>
  9. <view class='van-radio__icon-wrap' style='font-size: {{ utils.addUnit(iconSize) }};' onTap='antmoveAction' data-antmove-tap='onChange'>
  10. <slot a:if='{{ useIconSlot }}' name='icon'>
  11. </slot>
  12. <van-icon a:else name='success' class="{{ utils.bem('radio__icon', [shape, { disabled, checked: value === name }]) }}" style="line-height: {{ utils.addUnit(iconSize) }};font-size: {{ utils.addUnit(iconSize) }};{{ checkedColor && !disabled && value === name ? 'border-color:' + checkedColor + '; background-color:' + checkedColor + ';' : '' }}" custom-class='{{iconClass}}' custom-style='font-size: .8em;display: block;' ref='saveChildRef1'>
  13. </van-icon>
  14. </view>
  15. <view a:if="{{ labelPosition === 'right' }}" class="{{labelClass}} {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}" onTap='antmoveAction' data-antmove-tap='onClickLabel'>
  16. <slot>
  17. </slot>
  18. </view>
  19. </view>
  20. </view>