2018-07-30 10:26:34 +08:00

44 lines
1.2 KiB
Plaintext

<doc-page title="checkbox" without-padding>
<van-panel title='基本用法'>
<van-checkbox
checkbox-class="checkbox-demo"
bindchange="handleCheckboxChange"
>复选框</van-checkbox>
</van-panel>
<van-panel title='禁用状态'>
<van-checkbox
checkbox-class="checkbox-demo"
disabled
checked="{{ true }}"
>复选框</van-checkbox>
</van-panel>
<van-panel title='禁用内容部分点击事件'>
<van-checkbox
checkbox-class="checkbox-demo"
label-disabled
>复选框</van-checkbox>
</van-panel>
<van-panel title='Checkbox组'>
<van-checkbox-group>
<van-checkbox
wx:for="{{ items }}"
wx:for-item="item"
wx:for-index="index"
wx:key="{{ value }}"
checked="{{ item.checked }}"
data-index="{{ index }}"
bindchange="handleCheckboxChange"
>复选框 {{ item.value }}</van-checkbox>
</van-checkbox-group>
</van-panel>
<van-panel title='列表模式'>
<van-checkbox type="list">复选框 a</van-checkbox>
<van-checkbox type="list">复选框 b</van-checkbox>
<van-checkbox type="list">复选框 c</van-checkbox>
</van-panel>
</doc-page>