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/pc/menushell/index.jsx | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/pc/menushell/index.jsx b/src/pc/menushell/index.jsx index 29be748..24e3910 100644 --- a/src/pc/menushell/index.jsx +++ b/src/pc/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] @@ -49,13 +53,16 @@ let uuids = MenuUtils.getDelButtonIds(card) confirm({ - title: `纭畾鍒犻櫎銆�${card.name}銆嬪悧锛焋, + title: `纭畾鍒犻櫎${card.name ? `銆�${card.name}銆媊 : '缁勪欢'}鍚楋紵`, content: hasComponent ? '褰撳墠缁勪欢涓惈鏈夊瓙缁勪欢锛�' : '', onOk() { - MKEmitter.emit('delButtons', uuids) const _cards = cards.filter(item => item.uuid !== card.uuid) handleList({...menu, components: _cards}) setCards(_cards) + + if (uuids.length === 0) return + + MKEmitter.emit('delButtons', uuids) }, onCancel() {} }) @@ -102,7 +109,10 @@ code: '鑷畾涔�', navbar: '瀵艰埅鏍�', carousel: '杞挱', - card: '鍗$墖' + dashboard: '浠〃鐩�', + tree: '鏍戝舰鍒楄〃', + card: '鍗$墖', + login: '鐧诲綍' } let i = 1 -- Gitblit v1.8.0