| | |
| | | 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' |
| | |
| | | _class = 'swiper swiper-' + card.color |
| | | show = 'button' |
| | | } |
| | | let warning = null |
| | | if (card.OpenType === 'innerpage' && !card.pageTemplate) { |
| | | warning = <WarningOutlined style={{color: 'orange', marginLeft: '5px'}}/> |
| | | } |
| | | |
| | | if (show === 'icon') { |
| | | btnElement = ( |
| | |
| | | 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 = ( |
| | |
| | | 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 = ( |
| | |
| | | className={_class} |
| | | onDoubleClick={() => doubleClickCard(id)} |
| | | > |
| | | <MkIcon type={card.icon}/>{card.label} |
| | | <MkIcon type={card.icon}/>{card.label}{warning} |
| | | </Button> |
| | | ) |
| | | } |