Skip to content

Commit

Permalink
fix(Checkbox): Change label type from string to any reanderable
Browse files Browse the repository at this point in the history
  • Loading branch information
guanpu committed Nov 13, 2018
1 parent c8b7c14 commit 858083e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/checkbox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
| checked | 选中状态 | Boolean | - |
| defaultChecked | 默认选中状态 | Boolean | false |
| disabled | 禁用 | Boolean | - |
| label | 通过属性配置label, | String | - |
| label | 通过属性配置label, | ReactNode | - |
| indeterminate | Checkbox 的中间状态,只会影响到 Checkbox 的样式,并不影响其 checked 属性 | Boolean | - |
| defaultIndeterminate | Checkbox 的默认中间态,只会影响到 Checkbox 的样式,并不影响其 checked 属性 | Boolean | false |
| onChange | 状态变化时触发的事件<br><br>**签名**:<br>Function(checked: Boolean, e: Event) => void<br>**参数**:<br>_checked_: {Boolean} 是否选中<br>_e_: {Event} Dom 事件对象 | Function | func.noop |
Expand Down
2 changes: 1 addition & 1 deletion docs/radio/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
| id | 组件input的id | String | - |
| checked | 设置radio是否选中 | Boolean | - |
| defaultChecked | 设置radio是否默认选中 | Boolean | - |
| label | 通过属性配置label | String | - |
| label | 通过属性配置label | ReactNode | - |
| onChange | 状态变化时触发的事件<br><br>**签名**:<br>Function(checked: Boolean, e: Event) => void<br>**参数**:<br>_checked_: {Boolean} 是否选中<br>_e_: {Event} Dom 事件对象 | Function | func.noop |
| onMouseEnter | 鼠标进入enter事件<br><br>**签名**:<br>Function(e: Event) => void<br>**参数**:<br>_e_: {Event} Dom 事件对象 | Function | func.noop |
| onMouseLeave | 鼠标离开事件<br><br>**签名**:<br>Function(e: Event) => void<br>**参数**:<br>_e_: {Event} Dom 事件对象 | Function | func.noop |
Expand Down
2 changes: 1 addition & 1 deletion src/checkbox/checkbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Checkbox extends UIState {
/**
* 通过属性配置label,
*/
label: PropTypes.string,
label: PropTypes.node,
/**
* Checkbox 的中间状态,只会影响到 Checkbox 的样式,并不影响其 checked 属性
*/
Expand Down
2 changes: 1 addition & 1 deletion src/radio/radio.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Radio extends UIState {
/**
* 通过属性配置label
*/
label: PropTypes.string,
label: PropTypes.node,
/**
* 状态变化时触发的事件
* @param {Boolean} checked 是否选中
Expand Down

0 comments on commit 858083e

Please sign in to comment.