| | |
| | | import React from 'react' |
| | | import { useDrag, useDrop } from 'react-dnd' |
| | | import { Icon, Button, Select, DatePicker, Input, InputNumber, Popover } from 'antd' |
| | | import { Button, Select, DatePicker, Input, InputNumber, Popover } from 'antd' |
| | | import { EditOutlined, CopyOutlined, ProfileOutlined, CloseOutlined, UploadOutlined, TableOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | import ItemTypes from './itemtypes' |
| | | import './index.scss' |
| | |
| | | return ( |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="edit" title="编辑" type="edit" onClick={edit} /> |
| | | {type === 'search' ? <Icon className="edit copy" title="复制" type="copy" onClick={copy} /> : null} |
| | | <EditOutlined className="edit" title="编辑" onClick={edit} /> |
| | | {type === 'search' ? <CopyOutlined className="edit copy" title="复制" onClick={copy} /> : null} |
| | | {type === 'action' && card.btnType !== 'cancel' ? |
| | | <Icon className="edit profile" title="校验规则" type="profile" onClick={profile} /> : null |
| | | <ProfileOutlined className="edit profile" title="校验规则" onClick={profile} /> : null |
| | | } |
| | | {type === 'search' || (type === 'action' && card.btnType !== 'confirm' && card.btnType !== 'cancel') ? <Icon className="edit close" title="删除" type="close" onClick={del} /> : null} |
| | | {type === 'search' || (type === 'action' && card.btnType !== 'confirm' && card.btnType !== 'cancel') ? <CloseOutlined className="edit close" title="删除" onClick={del} /> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className="page-card" style={{ opacity: opacity}}> |
| | |
| | | } |
| | | {card.type === 'fileupload' ? |
| | | <Button> |
| | | <Icon type="upload" /> 点击上传 |
| | | <UploadOutlined /> 点击上传 |
| | | </Button> : null |
| | | } |
| | | </div> |
| | |
| | | icon={card.icon} |
| | | key={card.uuid} |
| | | > |
| | | {card.label}{card.position === 'grid' && <Icon type="table" />} |
| | | {card.label}{card.position === 'grid' && <TableOutlined />} |
| | | </Button> : null |
| | | } |
| | | </div> |