From 7ea1c5f53702951fc4df60e969fc67ef5d7af4dd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 一月 2020 10:13:05 +0800
Subject: [PATCH] 2020-01-14

---
 src/templates/formtabconfig/dragelement/index.jsx |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/templates/formtabconfig/dragelement/index.jsx b/src/templates/formtabconfig/dragelement/index.jsx
index 530e296..83ca042 100644
--- a/src/templates/formtabconfig/dragelement/index.jsx
+++ b/src/templates/formtabconfig/dragelement/index.jsx
@@ -63,6 +63,14 @@
   const [, drop] = useDrop({
     accept: ItemTypes[type],
     drop(item) {
+      if (item.hasOwnProperty('originalIndex') && groupId) {
+        const { card } = findCard(item.id)
+
+        if (!card) {
+          handleList(type, cards, null, groupId, item.id)
+        }
+      }
+
       if (item.hasOwnProperty('originalIndex')) {
         return
       }
@@ -134,7 +142,7 @@
 
       const _cards = update(cards, { $splice: [[targetIndex, 0, newcard]] })
       setCards(_cards)
-      handleList(type, _cards, newcard)
+      handleList(type, _cards, newcard, groupId)
       target = null
     }
   })
@@ -144,7 +152,7 @@
       {type === 'action' && cards.map(card => (
         <Card
           key={card.uuid}
-          id={`${card.uuid}`}
+          id={card.uuid}
           type={type}
           card={card}
           moveCard={moveCard}
@@ -159,7 +167,8 @@
       {type === 'search' && cards.map(card => (
         <Col key={card.uuid} span={24 / setting.cols}>
           <Card
-            id={`${card.uuid}`}
+            id={card.uuid}
+            key={card.uuid}
             type={type}
             card={card}
             moveCard={moveCard}

--
Gitblit v1.8.0