From d7534812c8199bf1e9faa0279b63e434737d6374 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 16 四月 2021 16:06:27 +0800
Subject: [PATCH] 2021-04-16

---
 src/menu/components/card/cardcellcomponent/dragaction/action.jsx |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx
index 28b01c1..2ec53af 100644
--- a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx
+++ b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx
@@ -27,13 +27,6 @@
     },
   })
 
-  let _style = {opacity: isDragging ? 0 : 1}
-
-  if (card.style) {
-    _style = {...card.style, opacity: isDragging ? 0 : 1}
-    _style = resetStyle(_style)
-  }
-
   let hasProfile = false
   if (['pop', 'prompt', 'exec'].includes(card.OpenType)) {
     hasProfile = true
@@ -44,13 +37,13 @@
   }
 
   let btnElement = null
-  let btnstyle = resetStyle(card.btnstyle)
+  let _style = resetStyle(card.style)
   if (card.show === 'icon') {
-    btnElement = (<Button style={btnstyle} type="link"><Icon type={card.icon}/></Button>)
+    btnElement = (<Button style={_style} type="link"><Icon type={card.icon}/></Button>)
   } else if (card.show === 'link') {
-    btnElement = (<Button style={btnstyle} type="link">{card.label}{card.icon ? <Icon type={card.icon}/> : null}</Button>)
+    btnElement = (<Button style={_style} type="link">{card.icon ? <Icon type={card.icon}/> : null}{card.label}</Button>)
   } else {
-    btnElement = (<Button icon={card.icon} style={btnstyle}> {card.label} </Button>)
+    btnElement = (<Button style={_style}> {card.label}{card.icon ? <Icon type={card.icon}/> : null} </Button>)
   }
 
   return (
@@ -63,7 +56,7 @@
       </div>
     } trigger="hover">
       <div ref={node => drag(drop(node))} className={'ant-col card-button-cell ant-col-' + card.width} onDoubleClick={() => doubleClickCard(id)}>
-        <div style={_style}>
+        <div style={{opacity: isDragging ? 0 : 1}}>
           {btnElement}
         </div>
       </div>

--
Gitblit v1.8.0