Browse Source

docs: update checkbox api

pull/10796/head
afc163 7 years ago
parent
commit
248dbc2429
  1. 13
      components/checkbox/index.en-US.md
  2. 14
      components/checkbox/index.zh-CN.md

13
components/checkbox/index.en-US.md

@ -13,7 +13,9 @@ Checkbox.
## API
### Checkbox
### Props
#### Checkbox
| Property | Description | Type | Default |
| -------- | ----------- | ---- | ------- |
@ -21,9 +23,10 @@ Checkbox.
| checked | Specifies whether the checkbox is selected. | boolean | false |
| defaultChecked | Specifies the initial state: whether or not the checkbox is selected. | boolean | false |
| disabled | Disable checkbox | boolean | false |
| indeterminate | indeterminate checked state of checkbox | boolean | false |
| onChange | The callback function that is triggered when the state changes. | Function(e:Event) | - |
### Checkbox Group
#### Checkbox Group
| Property | Description | Type | Default |
| -------- | ----------- | ---- | ------- |
@ -33,11 +36,11 @@ Checkbox.
| value | Used for setting the currently selected value. | string\[] | \[] |
| onChange | The callback function that is triggered when the state changes. | Function(checkedValue) | - |
## Methods
### Methods
### Checkbox
#### Checkbox
| Name | Description |
| ---- | ----------- |
| blur() | remove focus |
| focus() | get focus |
| blur() | remove focus |

14
components/checkbox/index.zh-CN.md

@ -14,30 +14,34 @@ title: Checkbox
## API
### Checkbox
### 属性
#### Checkbox
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| autoFocus | 自动获取焦点 | boolean | false |
| checked | 指定当前是否选中 | boolean | false |
| defaultChecked | 初始是否选中 | boolean | false |
| disabled | 失效状态 | boolean | false |
| indeterminate | 设置 indeterminate 状态,只负责样式控制 | boolean | false |
| onChange | 变化时回调函数 | Function(e:Event) | - |
### Checkbox Group
#### Checkbox Group
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| defaultValue | 默认选中的选项 | string\[] | \[] |
| disabled | 整组失效 | boolean | false |
| options | 指定可选项 | string\[] | \[] |
| value | 指定选中的选项 | string\[] | \[] |
| onChange | 变化时回调函数 | Function(checkedValue) | - |
## 方法
### 方法
### Checkbox
#### Checkbox
| 名称 | 描述 |
| --- | --- |
| blur() | 移除焦点 |
| focus() | 获取焦点 |
| blur() | 移除焦点 |

Loading…
Cancel
Save