king
2020-11-02 c7c3b0cd51c2c9251a11e4b5bc5057cc92f6e9a7
src/menu/searchcomponent/dragsearch/index.jsx
@@ -39,7 +39,6 @@
    copycard.uuid = Utils.getuuid()
    copycard.origin = false
    copycard.copyType = 'search'
    copycard.label = copycard.label + '(copy)'
    copycard.focus = true
    let _val = fromJS(copycard).toJS()
@@ -73,41 +72,10 @@
    deleteMenu(card)
  }
  let cardIds = cards.map(card => card.uuid)
  const [, drop] = useDrop({
    accept: 'search',
    drop() {}
  })
  // const addsearch = (e) => {
  //   e.stopPropagation()
  //   let newcard = {}
  //   newcard.uuid = Utils.getuuid()
  //   newcard.focus = true
  //   newcard.label = 'label'
  //   newcard.initval = ''
  //   newcard.type = 'select'
  //   newcard.resourceType = '0'
  //   newcard.options = []
  //   newcard.setAll = 'false'
  //   newcard.orderType = 'asc'
  //   newcard.display = 'dropdown'
  //   newcard.match = '='
  //   let targetId = cards.length > 0 ? cards[cards.length - 1].uuid : 0
  //   const { index: overIndex } = findCard(`${targetId}`)
  //   let targetIndex = overIndex
  //   targetIndex++
  //   const _cards = update(cards, { $splice: [[targetIndex, 0, newcard]] })
  //   handleList(_cards, newcard)
  // }
  return (
    <div ref={drop} className="ant-row">
@@ -115,7 +83,6 @@
        <Col key={card.uuid} span={card.ratio || 6}>
          <Card
            id={`${card.uuid}`}
            cardIds={cardIds}
            card={card}
            moveCard={moveCard}
            editCard={editCard}
@@ -125,7 +92,6 @@
          />
        </Col>
      ))}
      {/* <Icon type="plus" onClick={addsearch}/> */}
    </div>
  )
}