mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
833 B
833 B
order | title | ||||
---|---|---|---|---|---|
1 |
|
zh-CN
Radio 不可用。
en-US
Radio unavailable.
import { Radio, Button } from 'antd';
class App extends React.Component {
state = {
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>
</div>
);
}
}
ReactDOM.render(<App />, mountNode);