| | |
| | | import { Radio } from 'antd' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | class MKRadio extends Component { |
| | | static propTpyes = { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { value, options } = this.state |
| | | const { value, options, config } = this.state |
| | | |
| | | return ( |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} value={value} onChange={this.onChange}> |
| | | {options.map(option => <Radio key={option.value} value={option.value}>{option.label}</Radio>)} |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} disabled={config.disabled} value={value} onChange={this.onChange}> |
| | | {options.map(option => <Radio key={option.value} disabled={option.disabled} value={option.value}>{option.label}</Radio>)} |
| | | </Radio.Group> |
| | | ) |
| | | } |