| | |
| | | import { useDrop } from 'react-dnd' |
| | | import { is, fromJS } from 'immutable' |
| | | import update from 'immutability-helper' |
| | | import { Empty, notification, Modal } from 'antd' |
| | | import { Empty, Modal } from 'antd' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | item.added = true |
| | | |
| | | if (item.component === 'search') { // 移动端标签页中不可添加搜索 |
| | | // if (cards.filter(card => card.type === 'search').length > 0) { |
| | | // notification.warning({ |
| | | // top: 92, |
| | | // message: '搜索条件不可重复添加!', |
| | | // duration: 5 |
| | | // }) |
| | | // return |
| | | // } |
| | | item.added = false |
| | | return |
| | | } else if (item.component === 'tabs') { |
| | | let floor = MenuUtils.getFloor(config.parentId) |
| | | if (floor >= 3 ) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '标签页最多为三重结构!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | |
| | | let name = '' |
| | |
| | | |
| | | let newcard = { |
| | | uuid: Utils.getuuid(), |
| | | tabId: config.uuid, |
| | | parentId: config.parentId, |
| | | type: item.component, |
| | | subtype: item.subtype, |
| | | config: item.config, |