| | |
| | | import { useDrop } from 'react-dnd' |
| | | import { is, fromJS } from 'immutable' |
| | | import update from 'immutability-helper' |
| | | import { Icon, Popover } from 'antd' |
| | | import { Popover } from 'antd' |
| | | import { EditOutlined } from '@ant-design/icons' |
| | | import Utils from '@/utils/utils.js' |
| | | import Card from './card' |
| | | import './index.scss' |
| | | |
| | | const Container = ({list, setting, gridBtn, showfield, placeholder, handleList, handleMenu, handleGridBtn, deleteMenu, markMenu }) => { |
| | | const Container = ({list, setting, gridBtn, showfield, handleList, handleMenu, handleGridBtn, deleteMenu, markMenu }) => { |
| | | const [cards, setCards] = useState(list) |
| | | const moveCard = (id, atIndex) => { |
| | | const { card, index } = findCard(id) |
| | |
| | | {i === 0 && column.length > 0 && setting.tableType === 'radio' ? |
| | | <div className="page-card" style={{flex: 60}}></div> : null |
| | | } |
| | | {i === 0 && gridBtn && gridBtn.display && gridBtn.position === 'left' ? |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <EditOutlined className="edit" onClick={handleGridBtn}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className="page-card" style={{flex: gridBtn.Width}}> |
| | | <div style={{cursor: 'default'}}> |
| | | <span className="ant-table-header-column"> |
| | | <div className="ant-table-column-sorters" title={gridBtn.label} style={{textAlign: gridBtn.Align}}> |
| | | <span className="ant-table-column-title">{gridBtn.label}</span> |
| | | </div> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </Popover> : null |
| | | } |
| | | {column.map(card => ( |
| | | <Card |
| | | key={card.uuid} |
| | |
| | | findCard={findCard} |
| | | /> |
| | | ))} |
| | | {i === (columns.length - 1) && gridBtn && gridBtn.display ? |
| | | {i === (columns.length - 1) && gridBtn && gridBtn.display && gridBtn.position !== 'left' ? |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="edit" type="edit" onClick={handleGridBtn}/> |
| | | <EditOutlined className="edit" onClick={handleGridBtn}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className="page-card" style={{flex: gridBtn.Width}}> |
| | |
| | | |
| | | {cards.length === 0 ? |
| | | <div className="common-drawarea-placeholder"> |
| | | {placeholder} |
| | | 请添加显示列 |
| | | </div> : null |
| | | } |
| | | </div> |