mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
docs(Checkbox): adjust demo order
This commit is contained in:
parent
713b31f799
commit
e5150392b0
@ -26,18 +26,6 @@
|
||||
</van-checkbox>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="禁用复选框文本点击">
|
||||
<van-checkbox
|
||||
label-disabled
|
||||
value="{{ checkboxLabel }}"
|
||||
data-key="checkboxLabel"
|
||||
custom-class="demo-checkbox"
|
||||
bind:change="onChange"
|
||||
>
|
||||
复选框
|
||||
</van-checkbox>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="自定义形状">
|
||||
<van-checkbox
|
||||
value="{{ checkboxShape }}"
|
||||
@ -92,6 +80,18 @@
|
||||
</van-checkbox>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="禁用文本点击">
|
||||
<van-checkbox
|
||||
label-disabled
|
||||
value="{{ checkboxLabel }}"
|
||||
data-key="checkboxLabel"
|
||||
custom-class="demo-checkbox"
|
||||
bind:change="onChange"
|
||||
>
|
||||
复选框
|
||||
</van-checkbox>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="复选框组">
|
||||
<van-checkbox-group value="{{ result }}" data-key="result" bind:change="onChange">
|
||||
<van-checkbox
|
||||
@ -105,7 +105,7 @@
|
||||
</van-checkbox-group>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="设置最大可选数">
|
||||
<demo-block title="限制最大可选数">
|
||||
<van-checkbox-group value="{{ result2 }}" data-key="result2" max="2" bind:change="onChange">
|
||||
<van-checkbox
|
||||
wx:for="{{ list }}"
|
||||
|
@ -44,14 +44,6 @@ Page({
|
||||
</van-checkbox>
|
||||
```
|
||||
|
||||
### 禁用文本点击
|
||||
|
||||
通过设置`label-disabled`属性可以禁用复选框文本点击
|
||||
|
||||
```html
|
||||
<van-checkbox value="{{ checked }}" label-disabled>复选框</van-checkbox>
|
||||
```
|
||||
|
||||
### 自定义形状
|
||||
|
||||
将`shape`属性设置为`square`,复选框的形状会变成方形
|
||||
@ -107,6 +99,14 @@ Page({
|
||||
});
|
||||
```
|
||||
|
||||
### 禁用文本点击
|
||||
|
||||
通过设置`label-disabled`属性可以禁用复选框文本点击
|
||||
|
||||
```html
|
||||
<van-checkbox value="{{ checked }}" label-disabled>复选框</van-checkbox>
|
||||
```
|
||||
|
||||
### 复选框组
|
||||
|
||||
需要与`van-checkbox-group`一起使用,选中值是一个数组,通过`value`绑定在`van-checkbox-group`上,数组中的项即为选中的`Checkbox`的`name`属性设置的值
|
||||
@ -133,7 +133,7 @@ Page({
|
||||
});
|
||||
```
|
||||
|
||||
### 设置最大可选数
|
||||
### 限制最大可选数
|
||||
|
||||
```html
|
||||
<van-checkbox-group value="{{ result }}" bind:change="onChange" max="{{ 2 }}">
|
||||
|
Loading…
x
Reference in New Issue
Block a user