| | |
| | | import React, { useState } from 'react' |
| | | import { useDrop } from 'react-dnd' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Col } from 'antd' |
| | | import { Col, message } from 'antd' |
| | | import update from 'immutability-helper' |
| | | import Utils from '@/utils/utils.js' |
| | | import Card from './card' |
| | |
| | | oInput.style.display = 'none' |
| | | document.body.removeChild(oInput) |
| | | |
| | | const _cards = update(cards, { $splice: [[overIndex + 1, 0, _card]] }) |
| | | if (window.GLOB.CopyOnly) { |
| | | message.success('复制成功。') |
| | | } else { |
| | | const _cards = update(cards, { $splice: [[overIndex + 1, 0, _card]] }) |
| | | |
| | | setCards(_cards) |
| | | setCards(_cards) |
| | | |
| | | handleList(_cards, _card) |
| | | handleList(_cards, _card) |
| | | } |
| | | } |
| | | |
| | | const [, drop] = useDrop({ |
| | |
| | | newcard.options = [] |
| | | newcard.readonly = 'false' |
| | | newcard.required = 'true' |
| | | newcard.readin = 'top' |
| | | newcard.span = 24 |
| | | newcard.focus = true |
| | | |
| | | if (item.subType === 'textarea') { |
| | | if (item.subType === 'linkMain') { |
| | | newcard.hidden = 'true' |
| | | newcard.verifyVal = 'true' |
| | | } else if (item.subType === 'textarea') { |
| | | newcard.required = 'false' |
| | | } |
| | | |