| | |
| | | _config.subcards[0].offset = offset |
| | | } |
| | | |
| | | let selected = _config.wrap.selected || 'false' |
| | | |
| | | _config.wrap.selStyle = _config.wrap.selStyle || 'active' |
| | | _config.wrap.priKeyType = _config.wrap.priKeyType || 'static' |
| | | let selected = _config.wrap.selected || 'false' |
| | | _config.wrap.scale = _config.wrap.scale === 'true' ? 'scale' : '' |
| | | |
| | | _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale || ''}` |
| | | |
| | | this.setState({ |
| | | selected, |
| | |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config}/> |
| | | <Row className={`card-row-list ${config.wrap.cardType || ''} ${config.wrap.scale || ''}`}> |
| | | {config.subcards.map((item, index) => ( |
| | | <Col className={(activeKey === index ? config.wrap.selStyle : '') + (item.setting.click ? ' pointer' : '')} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}> |
| | | <Row className={`card-row-list data-zoom ${config.wrap.wrapClass}`}> |
| | | {config.subcards.map((item, index) => { |
| | | let className = item.setting.click ? 'mk-card pointer ' : 'mk-card ' |
| | | if (activeKey === index) { |
| | | className += 'active' |
| | | } |
| | | |
| | | return ( |
| | | <Col className={className} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}> |
| | | <CardItem card={item} cards={config} data={data}/> |
| | | </Col> |
| | | ))} |
| | | ) |
| | | })} |
| | | </Row> |
| | | </div> |
| | | ) |