File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class RadioItem extends Component {
41
41
const { checked, trueValue, label} = this . props ;
42
42
// checked 模式下触发 emitOneChange
43
43
if ( checked ) {
44
- const _label = trueValue || label ;
44
+ const _label = trueValue == null ? label : trueValue ;
45
45
this . context . emitOneChange && this . context . emitOneChange ( _label , checked ) ;
46
46
}
47
47
}
@@ -162,4 +162,4 @@ class RadioItem extends Component {
162
162
163
163
164
164
165
- export default RadioItem ;
165
+ export default RadioItem ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import Radio from 'beeshell/components/Radio';
30
30
31
31
import { Radio } from ' beeshell' ;
32
32
33
- < Radio checkedValues = {this .state .deliveryTime } onChange= {() => {}}>
33
+ < Radio checkedValue = {this .state .deliveryTime } onChange= {() => {}}>
34
34
< Radio .Item key= {' a' } label= " 百度" trueValue= " 1" / >
35
35
< Radio .Item key= {' b' } label= " 阿里" trueValue= " 2" / >
36
36
< Radio .Item key= {' c' } label= " 腾讯" trueValue= " 3" / >
@@ -43,7 +43,7 @@ import { Radio } from 'beeshell';
43
43
44
44
| Name | Type | Required | Default | Description |
45
45
| ---- | ---- | ---- | ---- | ---- |
46
- | checkedValues | Array | false | null | 默认选中的值,其中的值就是 Radio.Item 的 label 或者 trueValue(优先级高),再次被设置时会相应改变, 并联动全选状态的改变 |
46
+ | checkedValue | Any | false | null | 默认选中的值,其中的值就是 Radio.Item 的 label 或者 trueValue(优先级高),再次被设置时会相应改变, 并联动全选状态的改变 |
47
47
| showAllChecked | Boolean | false | false | 是否展示全选按钮 |
48
48
| onChange | Function | false | null | 选项变化回调 |
49
49
| iconPosition | String | false | 'left' | 选项扭 icon 位置 |
You can’t perform that action at this time.
0 commit comments