king
2019-12-03 343e35d61733028e884bc60963183983154ca093
src/templates/comtableconfig/dragelement/card.jsx
@@ -7,7 +7,7 @@
const { MonthPicker, WeekPicker, RangePicker } = DatePicker
const Card = ({ id, type, card, moveCard, findCard, editCard, copyCard, hasDrop }) => {
const Card = ({ id, type, card, moveCard, findCard, editCard, delCard, copyCard, hasDrop }) => {
  const originalIndex = findCard(id).index
  const [{ isDragging }, drag] = useDrag({
    item: { type: ItemTypes[type], id, originalIndex },
@@ -35,6 +35,10 @@
  const edit = () => {
    editCard(id)
  }
  const del = () => {
    delCard(id)
  }
  const copy = () => {
@@ -109,6 +113,7 @@
        }
      </div>
      <Icon className="edit" type="edit" onClick={edit} />
      <Icon className="edit close" type="close" onClick={del} />
      {type === 'action' && <Icon className="edit copy" type="copy" onClick={copy} />}
    </div>
  )