| | |
| | | paddingTop = '56.25%' |
| | | } |
| | | |
| | | let style = {} |
| | | |
| | | if (borderColor) { |
| | | style.borderColor = borderColor |
| | | } |
| | | let style = borderColor ? {borderColor} : {} |
| | | let _style = backgroundColor ? {backgroundColor} : null |
| | | |
| | | if (!options || options.length === 0) { |
| | | return null |
| | |
| | | if (!fields || fields.length === 0) { |
| | | return null |
| | | } |
| | | if (backgroundColor) { |
| | | style.backgroundColor = backgroundColor |
| | | } |
| | | |
| | | return options.map(item => { |
| | | let _active = false |
| | | if (multiple === 'true' && selectKeys.includes(item.$value)) { |
| | |
| | | } |
| | | |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-cell ' + (_active ? 'active' : '')} style={style} onClick={() => this.changeCard(item)}> |
| | | <div className={'card-cell' + (_active ? ' active' : '') + (_style ? ' bg-control' : '')} style={style} onClick={() => this.changeCard(item)}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {fields.map(col => { |
| | | return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |