king
2020-08-28 71a0e75ecb56ae643fe1e86188d45f93f48388c9
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)
        }