From 71a0e75ecb56ae643fe1e86188d45f93f48388c9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 28 八月 2020 14:07:41 +0800
Subject: [PATCH] 2020-08-28

---
 src/templates/modalconfig/dragelement/index.jsx |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/templates/modalconfig/dragelement/index.jsx b/src/templates/modalconfig/dragelement/index.jsx
index a80ed13..e1937b7 100644
--- a/src/templates/modalconfig/dragelement/index.jsx
+++ b/src/templates/modalconfig/dragelement/index.jsx
@@ -5,7 +5,6 @@
 import { Col } from 'antd'
 import Utils from '@/utils/utils.js'
 import Card from './card'
-import ItemTypes from './itemtypes'
 import './index.scss'
 
 const Container = ({list, group, setting, placeholder, handleList, handleForm, closeForm }) => {
@@ -18,7 +17,7 @@
     if (!card) return
 
     const _cards = update(cards, { $splice: [[index, 1], [atIndex, 0, card]] })
-    setCards(_cards)
+
     if (!group) {
       handleList(_cards)
     } else {
@@ -58,11 +57,10 @@
   }
 
   const [, drop] = useDrop({
-    accept: ItemTypes.form,
+    accept: 'form',
     drop(item) {
       if (item.hasOwnProperty('originalIndex') && group) {
         const { card } = findCard(item.id)
-
         if (!card) {
           handleList(cards, group, item.id)
         }

--
Gitblit v1.8.0