king
2022-06-09 ed1cc4adc145f8685d04763e19fbd6b0bd80c136
src/menu/components/share/actioncomponent/dragaction/card.jsx
@@ -1,7 +1,7 @@
import React from 'react'
import { useDrag, useDrop } from 'react-dnd'
import { Button, Popover } from 'antd'
import { CopyOutlined, EditOutlined, FontColorsOutlined, CloseOutlined, ProfileOutlined } from '@ant-design/icons'
import { CopyOutlined, EditOutlined, FontColorsOutlined, CloseOutlined, ProfileOutlined, WarningOutlined } from '@ant-design/icons'
import MkIcon from '@/components/mk-icon'
import { resetStyle } from '@/utils/utils-custom.js'
@@ -37,6 +37,8 @@
    hasProfile = true
  } else if (card.funcType === 'print') {
    hasProfile = true
  } else if (card.funcType === 'megvii') {
    hasProfile = true
  }
  let btnElement = null
@@ -48,6 +50,13 @@
    _class = 'swiper swiper-' + card.color
    show = 'button'
  }
  if (card.hidden === 'true') {
    _class += ' mk-hidden'
  }
  let warning = null
  if (card.OpenType === 'innerpage' && !card.pageTemplate) {
    warning = <WarningOutlined style={{color: 'orange', marginLeft: '5px'}}/>
  }
  if (show === 'icon') {
    btnElement = (
@@ -56,7 +65,7 @@
        style={_style}
        className={_class}
        onDoubleClick={() => doubleClickCard(id)}
      >{card.icon ? <MkIcon type={card.icon}/> : card.label}</Button>
      >{card.icon ? <MkIcon type={card.icon}/> : card.label}{warning}</Button>
    )
  } else if (show === 'link') {
    btnElement = (
@@ -65,7 +74,7 @@
        style={_style}
        className={_class}
        onDoubleClick={() => doubleClickCard(id)}
      >{card.label}{card.icon ? <MkIcon type={card.icon}/> : null}</Button>
      >{card.label}{card.icon ? <MkIcon type={card.icon}/> : null}{warning}</Button>
    )
  } else {
    btnElement = (
@@ -74,7 +83,7 @@
        className={_class}
        onDoubleClick={() => doubleClickCard(id)}
      >
        <MkIcon type={card.icon}/>{card.label}
        <MkIcon type={card.icon}/>{card.label}{warning}
      </Button>
    )
  }