| | |
| | | import React from 'react' |
| | | import { useDrag, useDrop } from 'react-dnd' |
| | | import { Icon, Button, Popover } from 'antd' |
| | | import { resetStyle } from '@/utils/utils-custom.js' |
| | | import './index.scss' |
| | | |
| | | const Card = ({ id, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, profileCard, doubleClickCard }) => { |
| | |
| | | } |
| | | |
| | | let btnElement = null |
| | | let _style = resetStyle(card.btnstyle) |
| | | if (card.show === 'icon') { |
| | | btnElement = ( |
| | | <Button |
| | | type="link" |
| | | icon={card.icon} |
| | | style={card.btnstyle} |
| | | style={_style} |
| | | onDoubleClick={() => doubleClickCard(id)} |
| | | >{card.icon ? '' : card.label}</Button> |
| | | ) |
| | |
| | | btnElement = ( |
| | | <Button |
| | | type="link" |
| | | style={card.btnstyle} |
| | | style={_style} |
| | | onDoubleClick={() => doubleClickCard(id)} |
| | | >{card.label}{card.icon ? <Icon type={card.icon}/> : null}</Button> |
| | | ) |
| | |
| | | btnElement = ( |
| | | <Button |
| | | icon={card.icon} |
| | | style={card.btnstyle} |
| | | style={_style} |
| | | onDoubleClick={() => doubleClickCard(id)} |
| | | > |
| | | {card.label} |