|
|
@ -10,7 +10,7 @@ RadioGroup 组合。 |
|
|
|
var Radio = antd.Radio; |
|
|
|
var RadioGroup = antd.RadioGroup; |
|
|
|
|
|
|
|
var Group = React.createClass({ |
|
|
|
var App = React.createClass({ |
|
|
|
getInitialState: function () { |
|
|
|
return { |
|
|
|
selectedValue:"a" |
|
|
@ -25,15 +25,14 @@ var Group = React.createClass({ |
|
|
|
render() { |
|
|
|
return<div> |
|
|
|
<RadioGroup onChange={this.onChange}> |
|
|
|
<Radio value={"a"} checked={true}>A</Radio> |
|
|
|
<Radio value={"b"} >B</Radio> |
|
|
|
<Radio value={"c"} >C</Radio> |
|
|
|
<Radio value={"d"} disabled={true}>D</Radio> |
|
|
|
<Radio value="a" checked={true}>A</Radio> |
|
|
|
<Radio value="b" >B</Radio> |
|
|
|
<Radio value="c" >C</Radio> |
|
|
|
<Radio value="d" disabled={true}>D</Radio> |
|
|
|
</RadioGroup> |
|
|
|
你选中的: {this.state.selectedValue} |
|
|
|
</div> |
|
|
|
} |
|
|
|
}); |
|
|
|
React.render(<Group />, document.getElementById('components-radio-demo-radiogroup')); |
|
|
|
|
|
|
|
React.render(<App />, document.getElementById('components-radio-demo-radiogroup')); |
|
|
|
```` |
|
|
|