| | |
| | | import './index.scss' |
| | | |
| | | const CardItem = asyncComponent(() => import('../cardItem')) |
| | | const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | |
| | | class DataCard extends Component { |
| | | static propTpyes = { |
| | |
| | | _cols.set(item.field, item) |
| | | }) |
| | | |
| | | _card.style.height = _config.style.height |
| | | |
| | | if (_card.setting.click) { |
| | | _card.style.cursor = 'pointer' |
| | | } |
| | |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | _card.style.height = _config.wrap.height |
| | | _config.style.height = 'auto' |
| | | |
| | | _config.wrap.speed = (_config.wrap.speed || 3) * 1000 |
| | | |
| | |
| | | footer={null} |
| | | destroyOnClose |
| | | > |
| | | {data && data.length > 0 ? <div className="custom-data-carousel-box" style={config.style}> |
| | | {data.length > 1 && config.wrap.autoplay === 'false' ? <div className="prev" onClick={() => this.node && this.node.prev()}><LeftOutlined /></div> : null} |
| | | {data.length > 1 && config.wrap.autoplay === 'false' ? <div className="next" onClick={() => this.node && this.node.next()}><RightOutlined /></div> : null} |
| | | <Carousel |
| | | autoplay={config.wrap.autoplay !== 'false'} |
| | | dots={config.wrap.dots !== 'false'} |
| | | dotPosition={config.wrap.dotPosition || 'bottom'} |
| | | effect={config.wrap.effect || 'scrollx'} |
| | | autoplaySpeed={config.wrap.speed} |
| | | ref={ref => this.node = ref} |
| | | > |
| | | {data.map((item, index) => ( |
| | | <div key={index}> |
| | | <CardItem card={card} cards={config} data={item}/> |
| | | </div> |
| | | ))} |
| | | </Carousel> |
| | | {visible ? <div className="custom-data-carousel-box" style={config.style}> |
| | | <NormalHeader config={config}/> |
| | | <div className="carousel-wrap" style={{height: config.wrap.height}}> |
| | | {data.length > 1 && config.wrap.autoplay === 'false' ? <div className="prev" onClick={() => this.node && this.node.prev()}><LeftOutlined /></div> : null} |
| | | {data.length > 1 && config.wrap.autoplay === 'false' ? <div className="next" onClick={() => this.node && this.node.next()}><RightOutlined /></div> : null} |
| | | <Carousel |
| | | autoplay={config.wrap.autoplay !== 'false'} |
| | | dots={config.wrap.dots !== 'false'} |
| | | dotPosition={config.wrap.dotPosition || 'bottom'} |
| | | effect={config.wrap.effect || 'scrollx'} |
| | | autoplaySpeed={config.wrap.speed} |
| | | ref={ref => this.node = ref} |
| | | > |
| | | {data.map((item, index) => ( |
| | | <div key={index}> |
| | | <CardItem card={card} cards={config} data={item}/> |
| | | </div> |
| | | ))} |
| | | </Carousel> |
| | | </div> |
| | | </div> : null} |
| | | {config.wrap.modalContent !== 'update' ? <div className="mk-footer"> |
| | | <Checkbox defaultChecked={false} onChange={this.onTipChange}>不在提醒</Checkbox> |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | {data && data.length > 0 ? <Carousel |
| | | autoplay={config.wrap.autoplay !== 'false'} |
| | | dots={config.wrap.dots !== 'false'} |
| | | dotPosition={config.wrap.dotPosition || 'bottom'} |
| | | effect={config.wrap.effect || 'scrollx'} |
| | | autoplaySpeed={config.wrap.speed} |
| | | > |
| | | {data.map((item, index) => ( |
| | | <div key={index}> |
| | | <CardItem card={card} cards={config} data={item}/> |
| | | </div> |
| | | ))} |
| | | </Carousel> : null} |
| | | {!data || data.length === 0 ? <Empty description={false}/> : null} |
| | | <NormalHeader config={config}/> |
| | | <div className="carousel-wrap" style={{height: config.wrap.height}}> |
| | | {data && data.length > 0 ? <Carousel |
| | | autoplay={config.wrap.autoplay !== 'false'} |
| | | dots={config.wrap.dots !== 'false'} |
| | | dotPosition={config.wrap.dotPosition || 'bottom'} |
| | | effect={config.wrap.effect || 'scrollx'} |
| | | autoplaySpeed={config.wrap.speed} |
| | | > |
| | | {data.map((item, index) => ( |
| | | <div key={index}> |
| | | <CardItem card={card} cards={config} data={item}/> |
| | | </div> |
| | | ))} |
| | | </Carousel> : <Empty description={false}/>} |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |