1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <import-sjs
- from="../index.sjs"
- name="componentUtils" />
- <list
- className="ant-radio-group {{ className ? className : '' }} ant-radio-group-{{ position }}"
- style="{{ style }}">
- <radio-group
- name="{{ name }}"
- value="{{ mixin.value }}">
- <view class="ant-radio-group-body">
- <block a:if="{{ position === 'vertical' }}">
- <block
- a:for="{{ options }}"
- a:for-index="index"
- a:for-item="item">
- <list-item>
- <radio
- checked="{{ componentUtils.getChecked(index, options, mixin.value) }}"
- data-index="{{ index }}"
- value="{{ item.value }}"
- disabled="{{ disabled || item.disabled }}"
- color="{{ item.color || color }}"
- onChange="onChange">
- <slot
- name="label"
- value="{{ item }}"
- index="{{ index }}">
- <view class="ant-radio-group-item-label-default">
- {{ item.label }}
- </view>
- </slot>
- </radio>
- </list-item>
- </block>
- </block>
- <block a:else>
- <block
- a:for="{{ options }}"
- a:for-index="index"
- a:for-item="item">
- <radio
- checked="{{ componentUtils.getChecked(index, options, mixin.value) }}"
- data-index="{{ index }}"
- value="{{ item.value }}"
- disabled="{{ disabled || item.disabled }}"
- color="{{ item.color || color }}"
- onChange="onChange">
- <slot
- name="label"
- value="{{ item }}"
- index="{{ index }}">
- <view class="ant-radio-group-item-label-default">
- {{ item.label }}
- </view>
- </slot>
- </radio>
- </block>
- </block>
- </view>
- </radio-group>
- </list>
|