mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
24 lines
781 B
Plaintext
24 lines
781 B
Plaintext
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
|
|
<view class="van-radio custom-class">
|
|
<view class="van-radio__input">
|
|
<radio-group bindchange="onChange">
|
|
<radio
|
|
value="{{ name }}"
|
|
checked="{{ value === name }}"
|
|
disabled="{{ disabled }}"
|
|
class="van-radio__control"
|
|
/>
|
|
</radio-group>
|
|
<van-icon
|
|
class="{{ utils.bem('radio__icon', { disabled, checked: !disabled && name === value, check: !disabled && name !== value }) }}"
|
|
custom-class="icon-class"
|
|
color="{{ value === name ? checkedColor : '' }}"
|
|
name="{{ value === name ? 'checked' : 'circle' }}"
|
|
/>
|
|
</view>
|
|
<view class="van-radio__label van-radio__label--{{ labelPosition }} label-class" bindtap="onClickLabel">
|
|
<slot />
|
|
</view>
|
|
</view>
|