| | |
| | | import React, { useState } from 'react' |
| | | import { useDrop } from 'react-dnd' |
| | | import { is, fromJS } from 'immutable' |
| | | import { message } from 'antd' |
| | | import update from 'immutability-helper' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | } |
| | | |
| | | copycard.uuid = Utils.getuuid() |
| | | copycard.originCard = card |
| | | |
| | | try { |
| | | delete _val.$srcId |
| | |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | |
| | | message.success('复制成功。') |
| | | } else { |
| | | message.warning('复制失败。') |
| | | } |
| | | |
| | | const { index: overIndex } = findCard(id) |
| | | // const { index: overIndex } = findCard(id) |
| | | |
| | | const _cards = update(cards, { $splice: [[overIndex + 1, 0, copycard]] }) |
| | | // const _cards = update(cards, { $splice: [[overIndex + 1, 0, copycard]] }) |
| | | |
| | | handleList(_cards, copycard) |
| | | // handleList(_cards, copycard) |
| | | } |
| | | |
| | | const [, drop] = useDrop({ |