king
2020-09-03 af02b8f3c3ec9e5684be1084904d673429421d2b
src/menu/menushell/index.jsx
@@ -2,7 +2,7 @@
import { useDrop } from 'react-dnd'
import { is, fromJS } from 'immutable'
import update from 'immutability-helper'
import { Empty } from 'antd'
import { Empty, notification } from 'antd'
import Utils from '@/utils/utils.js'
import Card from './card'
@@ -45,6 +45,17 @@
        return
      }
      if (item.component === 'search') { // 搜索组件不可重复添加
        if (cards.filter(card => card.type === 'search').length > 0) {
          notification.warning({
            top: 92,
            message: '搜索条件不可重复添加!',
            duration: 5
          })
          return
        }
      }
      let newcard = {
        uuid: Utils.getuuid(),
        type: item.component,