king
2022-01-04 5d1e5dc9b248f91b33105dc838200af07947cdb2
src/menu/components/card/cardcellcomponent/dragaction/action.jsx
@@ -1,6 +1,6 @@
import React from 'react'
import { useDrag, useDrop } from 'react-dnd'
import { Popover, Button } from 'antd'
import { Popover, Button, Switch, Checkbox } from 'antd'
import { EditOutlined, CopyOutlined, CloseOutlined, FontColorsOutlined, ProfileOutlined } from '@ant-design/icons'
import { resetStyle } from '@/utils/utils-custom.js'
@@ -30,7 +30,7 @@
  })
  let hasProfile = false
  if (['pop', 'prompt', 'exec'].includes(card.OpenType)) {
  if (['pop', 'prompt', 'exec', 'form'].includes(card.OpenType)) {
    hasProfile = true
  } else if (card.OpenType === 'excelIn' || card.OpenType === 'excelOut') {
    hasProfile = true
@@ -40,7 +40,13 @@
  let btnElement = null
  let _style = resetStyle(card.style)
  if (card.show === 'icon') {
  if (card.OpenType === 'form') {
    if (card.formType === 'switch') {
      btnElement = (<Switch style={_style} size={card.size} checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''}/>)
    } else {
      btnElement = (<Checkbox style={_style}></Checkbox>)
    }
  } else if (card.show === 'icon') {
    btnElement = (<Button style={_style} type="link"><MkIcon type={card.icon}/></Button>)
  } else if (card.show === 'link') {
    btnElement = (<Button style={_style} type="link">{card.label}{card.icon ? <MkIcon type={card.icon}/> : null}</Button>)