Skip to content

Commit

Permalink
update radio demos
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jul 21, 2015
1 parent 826e126 commit 9f6a9d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion components/radio/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
````jsx
var Radio = antd.Radio;

React.render(<Radio >Radio</Radio>, document.getElementById('components-radio-demo-basic'));
React.render(<Radio>Radio</Radio>
, document.getElementById('components-radio-demo-basic'));
````
18 changes: 9 additions & 9 deletions components/radio/demo/radiogroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ var RadioGroup = antd.RadioGroup;
var App = React.createClass({
getInitialState: function () {
return {
value:"a"
value: 'a'
};
},
onChange(ev) {
console.log('radio checked:' + ev.target.value);
onChange(e) {
console.log('radio checked:' + e.target.value);
this.setState({
value:ev.target.value
})
value: e.target.value
});
},
render() {
return<div>
<RadioGroup onChange={this.onChange} value={this.state.value}>
<Radio value="a">A</Radio>
<Radio value="b" >B</Radio>
<Radio value="c" >C</Radio>
<Radio value="d" disabled={true}>D</Radio>
<Radio value="b">B</Radio>
<Radio value="c">C</Radio>
<Radio value="d">D</Radio>
</RadioGroup>
你选中的:&nbsp;&nbsp;{this.state.value}
<div style={{marginTop: 20}}>你选中的: {this.state.value}</div>
</div>
}
});
Expand Down

0 comments on commit 9f6a9d9

Please sign in to comment.