| | |
| | | item.hidden = false |
| | | } else if (item.key === 'switch' && _type === 'card') { |
| | | item.hidden = false |
| | | } else if (item.key === 'insert') { |
| | | item.hidden = _type !== 'card' |
| | | } else if (item.key === 'bgfield') { |
| | | item.hidden = _type !== 'card' |
| | | } |
| | |
| | | item.hidden = false |
| | | } else if (item.key === 'switch' && value === 'card') { |
| | | item.hidden = false |
| | | } else if (item.key === 'insert') { |
| | | item.hidden = value !== 'card' |
| | | } else if (item.key === 'bgfield') { |
| | | item.hidden = value !== 'card' |
| | | } |
| | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | | |
| | | this.state.formlist.forEach((item, index) => { |
| | | if (item.hidden) return |
| | | |
| | |
| | | result.subelement = selectlegend.subelement |
| | | } |
| | | |
| | | if (result.widthType === 'ratio' && result.avatar && result.avatar.widthType !== 'ratio') { |
| | | result.avatar.widthType = 'ratio' |
| | | result.avatar.width = 32 |
| | | } |
| | | |
| | | if (!result.details) { |
| | | result.details = [ |
| | | {elemType: 'detail', bold: 'true', uuid: 'cardtitle', content: 'Card title', datatype: 'static', align: 'left'}, |
| | | {elemType: 'detail',bold: 'false', uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'} |
| | | {elemType: 'detail', fontWeight: 'normal', fontSize: 14, width: 100, height: 1, uuid: 'cardtitle', content: 'Card content', datatype: 'static', align: 'left'}, |
| | | {elemType: 'detail', fontWeight: 'normal', fontSize: 14, width: 100, height: 1, uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'} |
| | | ] |
| | | result.bottom = { |
| | | elemType: 'bottom', |
| | |
| | | type: 'picture', |
| | | field: '', |
| | | size: 14, |
| | | widthType: 'absolute', |
| | | width: 32 |
| | | widthType: 'ratio', |
| | | width: 32, |
| | | avatarWidth: 32, |
| | | radius: 'true' |
| | | } |
| | | } |
| | | |