You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
816 B

---
order: 1
title:
zh-CN: 不可用
en-US: disabled
---
9 years ago
## zh-CN
9 years ago
Radio 不可用。
## en-US
Radio unavailable.
```jsx
import { Radio, Button } from 'antd';
9 years ago
const App = React.createClass({
getInitialState() {
return {
disabled: true,
};
},
toggleDisabled() {
this.setState({
disabled: !this.state.disabled,
});
},
render() {
return (
<div>
<Radio defaultChecked={false} disabled={this.state.disabled}>Disabled</Radio>
<br />
<Radio defaultChecked disabled={this.state.disabled}>Disabled</Radio>
<div style={{ marginTop: 20 }}>
<Button type="primary" onClick={this.toggleDisabled}>
Toggle disabled
</Button>
</div>
9 years ago
</div>
);
},
});
ReactDOM.render(<App />, mountNode);
```