| | |
| | | import Card from './card' |
| | | import './index.scss' |
| | | |
| | | const Container = ({list, placeholder, handleList, handleMenu, deleteMenu }) => { |
| | | const Container = ({list, showField, placeholder, handleList, handleMenu, deleteMenu }) => { |
| | | const [cards, setCards] = useState(list) |
| | | const moveCard = (id, atIndex) => { |
| | | const { card, index } = findCard(id) |
| | |
| | | drop() {} |
| | | }) |
| | | |
| | | const appType = sessionStorage.getItem('appType') |
| | | |
| | | return ( |
| | | <div ref={drop} className="ant-row"> |
| | | {cards.length > 0 ? <Col key="preaction" className="action pre-action" span={6}> |
| | | <div className="ant-row ant-form-item" style={{lineHeight: '40px', height: '55px', marginBottom: 0}}> |
| | | <div className="ant-col ant-form-item-label ant-col-xs-24 ant-col-sm-8"> |
| | | </div> |
| | | <div className="ant-col ant-form-item-control-wrapper ant-col-xs-24 ant-col-sm-16"> |
| | | <Button type="primary">搜索</Button> |
| | | {appType !== 'mob' ? <Button style={{ marginLeft: 8 }}>重置</Button> : null} |
| | | <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div> |
| | | </div> |
| | | </div> |
| | | </Col> : null} |
| | | {cards.map(card => ( |
| | | <Col key={card.uuid} span={card.ratio || 6}> |
| | | <Card |
| | | id={`${card.uuid}`} |
| | | card={card} |
| | | showField={showField} |
| | | moveCard={moveCard} |
| | | copyCard={copyCard} |
| | | editCard={editCard} |
| | |
| | | /> |
| | | </Col> |
| | | ))} |
| | | {cards.length > 0 ? <Col key="action" className="action" span={6}> |
| | | {cards.length > 0 ? <Col key="nextaction" className="action next-action" span={6}> |
| | | <div className="ant-row ant-form-item" style={{lineHeight: '40px', height: '55px', marginBottom: 0}}> |
| | | <div className="ant-col ant-form-item-label ant-col-xs-24 ant-col-sm-8"> |
| | | </div> |
| | | <div className="ant-col ant-form-item-control-wrapper ant-col-xs-24 ant-col-sm-16"> |
| | | <Button type="primary">搜索</Button> |
| | | <Button style={{ marginLeft: 8 }}>重置</Button> |
| | | {appType !== 'mob' ? <Button style={{ marginLeft: 8 }}>重置</Button> : null} |
| | | <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div> |
| | | </div> |
| | | </div> |