From 137fb8ea6af2789b3238b22bac31d80bced41dfe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 七月 2021 11:39:39 +0800
Subject: [PATCH] 2021-07-28

---
 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 6ac5ace..7e03f6c 100644
--- a/src/menu/menushell/index.jsx
+++ b/src/menu/menushell/index.jsx
@@ -19,6 +19,10 @@
     handleList({...menu, components: _cards})
     setCards(_cards)
   }
+
+  if (menu.components.length > cards.length) {
+    setCards(menu.components)
+  }
   
   const findCard = id => {
     const card = cards.filter(c => `${c.uuid}` === id)[0]
@@ -53,9 +57,12 @@
       content: hasComponent ? '褰撳墠缁勪欢涓惈鏈夊瓙缁勪欢锛�' : '',
       onOk() {
         const _cards = cards.filter(item => item.uuid !== card.uuid)
-        MKEmitter.emit('delButtons', uuids)
         handleList({...menu, components: _cards})
         setCards(_cards)
+
+        if (uuids.length === 0) return
+        
+        MKEmitter.emit('delButtons', uuids)
       },
       onCancel() {}
     })
@@ -93,6 +100,10 @@
         code: '鑷畾涔�',
         carousel: '杞挱',
         form: '琛ㄥ崟',
+        dashboard: '浠〃鐩�',
+        scatter: '鏁g偣鍥�',
+        tree: '鏍戝舰鍒楄〃',
+        balcony: '娴姩鍗�',
         card: '鍗$墖'
       }
       let i = 1

--
Gitblit v1.8.0