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