| | |
| | | super(props) |
| | | |
| | | let _type = props.card.type |
| | | |
| | | if (!props.card.origin) { |
| | | if (props.type === 'columns') { |
| | | if (_type === 'date' || _type === 'datetime') { |
| | | if (_type !== 'number') { |
| | | _type = 'text' |
| | | } |
| | | } else if (props.type === 'search') { |
| | | if (_type === 'number') { |
| | | if (_type !== 'select') { |
| | | _type = 'text' |
| | | } else if (_type === 'datetime') { |
| | | _type = 'daterange' |
| | | } |
| | | } else if (props.type === 'form') { |
| | | |
| | | if (_type !== 'number') { |
| | | _type = 'text' |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.state = { |
| | |
| | | <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}> |
| | | <Radio value="text">text</Radio> |
| | | <Radio value="select">select</Radio> |
| | | <Radio value="daterange">dateRange</Radio> |
| | | </Radio.Group> : null |
| | | } |
| | | {type === 'columns' ? |
| | | <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}> |
| | | <Radio value="text">text</Radio> |
| | | <Radio value="number">number</Radio> |
| | | <Radio value="picture">picture</Radio> |
| | | </Radio.Group> : null |
| | | } |
| | | {type === 'form' ? |