| | |
| | | componentDidMount () { |
| | | const { config } = this.state |
| | | |
| | | if (config.multiple !== 'true' && config.linkField) { |
| | | if (config.linkField) { |
| | | MKEmitter.addListener('mkFP', this.mkFormHandle) |
| | | } |
| | | } |
| | |
| | | const { config } = this.state |
| | | |
| | | let options = config.oriOptions.filter(option => option.ParentID === parentId) |
| | | |
| | | if (config.multiple === 'true') { |
| | | this.setState({ |
| | | options, |
| | | selectKeys: [] |
| | | }) |
| | | this.props.onChange('') |
| | | } else { |
| | | let _option = options[0] && !options[0].$disabled ? options[0] : null |
| | | let val = _option ? _option.$value : '' |
| | | |
| | | this.setState({ |
| | | options, |
| | | value: val |
| | | selectKeys: val |
| | | }) |
| | | |
| | | let other = {} |
| | |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | changeCard = (item) => { |
| | | const { selectKeys, config } = this.state |