mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
parent
cd3b7ef5e6
commit
acb8e3506d
@ -21,7 +21,10 @@ VantComponent({
|
|||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
useIconSlot: Boolean,
|
useIconSlot: Boolean,
|
||||||
checkedColor: String,
|
checkedColor: String,
|
||||||
labelPosition: String,
|
labelPosition: {
|
||||||
|
type: String,
|
||||||
|
value: 'right',
|
||||||
|
},
|
||||||
labelDisabled: Boolean,
|
labelDisabled: Boolean,
|
||||||
shape: {
|
shape: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
<wxs src="./index.wxs" module="computed" />
|
<wxs src="./index.wxs" module="computed" />
|
||||||
|
|
||||||
<view class="van-checkbox custom-class">
|
<view class="van-checkbox custom-class">
|
||||||
|
<view
|
||||||
|
wx:if="{{ labelPosition === 'left' }}"
|
||||||
|
class="label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}"
|
||||||
|
bindtap="onClickLabel"
|
||||||
|
>
|
||||||
|
<slot />
|
||||||
|
</view>
|
||||||
<view class="van-checkbox__icon-wrap" bindtap="toggle">
|
<view class="van-checkbox__icon-wrap" bindtap="toggle">
|
||||||
<slot wx:if="{{ useIconSlot }}" name="icon" />
|
<slot wx:if="{{ useIconSlot }}" name="icon" />
|
||||||
<van-icon
|
<van-icon
|
||||||
@ -14,7 +21,11 @@
|
|||||||
custom-style="line-height: 1.25em;"
|
custom-style="line-height: 1.25em;"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}" bindtap="onClickLabel">
|
<view
|
||||||
|
wx:if="{{ labelPosition === 'right' }}"
|
||||||
|
class="label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}"
|
||||||
|
bindtap="onClickLabel"
|
||||||
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user