| | |
| | | import PropTypes from 'prop-types' |
| | | import { Checkbox } from 'antd' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | class MKCheck extends Component { |
| | | static propTpyes = { |
| | | config: PropTypes.object, |
| | |
| | | } else { |
| | | this.props.onChange(config.closeVal) |
| | | } |
| | | |
| | | this.setState({}, () => { |
| | | if (config.enter === 'tab') { |
| | | MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | } else if (config.enter === 'sub') { |
| | | config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | if (config.linkFields || config.subFields || config.controlFields) { |
| | | setTimeout(() => { |
| | | this.props.onSubmit(config.tabUuid) |
| | | }, 1000) |
| | | } else { |
| | | this.props.onSubmit(config.tabUuid) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | componentWillUnmount () { |