king
2022-01-21 46f79b491173d284a4900d19e7aecf7509481438
src/templates/formtabconfig/dragelement/card.jsx
@@ -1,6 +1,7 @@
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'
@@ -95,12 +96,12 @@
  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}}>
@@ -137,7 +138,7 @@
                }
                {card.type === 'fileupload' ?
                  <Button>
                    <Icon type="upload" /> 点击上传
                    <UploadOutlined /> 点击上传
                  </Button> : null
                }
              </div>
@@ -149,7 +150,7 @@
              icon={card.icon}
              key={card.uuid}
            >
              {card.label}{card.position === 'grid' && <Icon type="table" />}
              {card.label}{card.position === 'grid' && <TableOutlined />}
            </Button> : null
          }
        </div>