king
2021-04-13 e0aff8f4c0e9c8f16d1ba07863cf600638067514
src/menu/components/card/cardcellcomponent/dragaction/action.jsx
@@ -1,6 +1,8 @@
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 }) => {
@@ -29,6 +31,7 @@
  if (card.style) {
    _style = {...card.style, opacity: isDragging ? 0 : 1}
    _style = resetStyle(_style)
  }
  let hasProfile = false
@@ -41,12 +44,13 @@
  }
  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 (