From ce70be666bcd78a7e16e739040488cf7e7256cc2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 31 五月 2021 15:49:43 +0800
Subject: [PATCH] 2021-05-31

---
 src/menu/components/share/actioncomponent/dragaction/card.jsx |   13 +++++++------
 1 files changed, 7 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..d0af55e 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,13 @@
   }
 
   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 +51,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 +59,7 @@
     btnElement = (
       <Button
         icon={card.icon}
-        style={card.btnstyle}
+        style={_style}
         onDoubleClick={() => doubleClickCard(id)}
       >
         {card.label}

--
Gitblit v1.8.0