From af02b8f3c3ec9e5684be1084904d673429421d2b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 03 九月 2020 16:40:47 +0800 Subject: [PATCH] 2020-09-03 --- src/menu/menushell/index.jsx | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/menu/menushell/index.jsx b/src/menu/menushell/index.jsx index c2827ec..ec759ce 100644 --- a/src/menu/menushell/index.jsx +++ b/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, -- Gitblit v1.8.0