Skip to content

Commit 70eeea1

Browse files
committed
feat(bee-checkbox): 完善文档
1 parent 811857d commit 70eeea1

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ import "./node_modules/build/bee-checkbox.css"
3636

3737

3838
## API
39+
40+
## Checkbox
41+
3942
|参数|说明|类型|默认值|
40-
|---|----|---|------|
43+
|:--|:---|:--|:---|
4144
|className|类名|string|-|
4245
|color|one of: `primary` `success` `info` `error` `warning` `dark`|string|''|
4346
|disabled|是否可用|bool|false|
@@ -47,6 +50,16 @@ import "./node_modules/build/bee-checkbox.css"
4750
|indeterminate|部分选中|bool|-|
4851
|onDoubleClick|双击事件|function|function(checked, event){}|
4952
|onClick|单击事件|function|function(event){}|
53+
|value|选中的值,需配合CheckboxGroup使用|string|-|
54+
55+
56+
## CheckboxGroup
57+
58+
|参数|说明|类型|默认值|
59+
|:--|:---|:--|:---|
60+
|className|类名|string|-|
61+
|onChange|监听改变|function|-|
62+
|value|设置默认值|array|[]|
5063

5164
#### 开发调试
5265

docs/api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### API
88

9+
## Checkbox
10+
911
|参数|说明|类型|默认值|
1012
|:--|:---|:--|:---|
1113
|className|类名|string|-|
@@ -17,3 +19,13 @@
1719
|indeterminate|部分选中|bool|-|
1820
|onDoubleClick|双击事件|function|function(checked, event){}|
1921
|onClick|单击事件|function|function(event){}|
22+
|value|选中的值,需配合CheckboxGroup使用|string|-|
23+
24+
25+
## CheckboxGroup
26+
27+
|参数|说明|类型|默认值|
28+
|:--|:---|:--|:---|
29+
|className|类名|string|-|
30+
|onChange|监听改变|function|-|
31+
|value|设置默认值|array|[]|

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bee-checkbox",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "checkbox ui component for react",
55
"keywords": [
66
"react",

0 commit comments

Comments
 (0)