From 72419e2f826031a158173f46d723a672064e37cd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 31 八月 2021 22:42:51 +0800
Subject: [PATCH] 2021-08-31

---
 src/menu/components/share/actioncomponent/dragaction/card.jsx |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/dragaction/card.jsx b/src/menu/components/share/actioncomponent/dragaction/card.jsx
index 88df555..4a6e8b5 100644
--- a/src/menu/components/share/actioncomponent/dragaction/card.jsx
+++ b/src/menu/components/share/actioncomponent/dragaction/card.jsx
@@ -1,6 +1,7 @@
 import React from 'react'
 import { useDrag, useDrop } from 'react-dnd'
 import { Icon, Button, Popover } from 'antd'
+import { resetStyle } from '@/utils/utils-custom.js'
 import './index.scss'
 
 const Card = ({ id, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, profileCard, doubleClickCard }) => {
@@ -14,11 +15,10 @@
   const [, drop] = useDrop({
     accept: 'action',
     canDrop: () => true,
-    drop: () => {},
-    hover({ id: draggedId }) {
+    drop: ({ id: draggedId }) => {
       if (!draggedId || draggedId === id) return
 
-      const { index: originIndex } = findCard(id)
+      const { index: originIndex } = findCard(draggedId)
       if (originIndex === -1) return
 
       const { index: overIndex } = findCard(id)
@@ -37,12 +37,14 @@
   }
 
   let btnElement = null
+  let _style = resetStyle(card.style)
+
   if (card.show === 'icon') {
     btnElement = (
       <Button
         type="link"
         icon={card.icon}
-        style={card.btnstyle}
+        style={_style}
         onDoubleClick={() => doubleClickCard(id)}
       >{card.icon ? '' : card.label}</Button>
     )
@@ -50,7 +52,7 @@
     btnElement = (
       <Button
         type="link"
-        style={card.btnstyle}
+        style={_style}
         onDoubleClick={() => doubleClickCard(id)}
       >{card.label}{card.icon ? <Icon type={card.icon}/> : null}</Button>
     )
@@ -58,7 +60,7 @@
     btnElement = (
       <Button
         icon={card.icon}
-        style={card.btnstyle}
+        style={_style}
         onDoubleClick={() => doubleClickCard(id)}
       >
         {card.label}

--
Gitblit v1.8.0