From 41c55c1f103658b997f7a828a7067bdb228f1df0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 04 十月 2022 23:35:10 +0800 Subject: [PATCH] 2022-10-04 --- src/menu/components/share/actioncomponent/dragaction/card.jsx | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/menu/components/share/actioncomponent/dragaction/card.jsx b/src/menu/components/share/actioncomponent/dragaction/card.jsx index d9219b1..5518861 100644 --- a/src/menu/components/share/actioncomponent/dragaction/card.jsx +++ b/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' @@ -28,7 +28,7 @@ moveCard(draggedId, overIndex) }, }) - const opacity = isDragging ? 0 : 1 + const opacity = isDragging ? 0.5 : 1 let hasProfile = false if (['pop', 'prompt', 'exec'].includes(card.OpenType)) { @@ -36,6 +36,8 @@ } else if (card.OpenType === 'excelIn' || card.OpenType === 'excelOut') { hasProfile = true } else if (card.funcType === 'print') { + hasProfile = true + } else if (card.funcType === 'megvii') { hasProfile = true } @@ -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> ) } -- Gitblit v1.8.0