From ce69718202ccc90143e9cea353faee3e46b90d6d Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 17 Sep 2021 16:40:49 +0800 Subject: [PATCH] fix issue --- spug_web/src/pages/host/Group.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/spug_web/src/pages/host/Group.js b/spug_web/src/pages/host/Group.js index 101bed4..89257ef 100644 --- a/spug_web/src/pages/host/Group.js +++ b/spug_web/src/pages/host/Group.js @@ -137,14 +137,16 @@ export default observer(function () { } else if (action === 'del' && nodeData.key === store.group.key) { return } else { + const extend = nodeData.all_host_ids && nodeData.all_host_ids.length ? `(${nodeData.all_host_ids.length})` : null return ( - - {nodeData.title}{nodeData.all_host_ids && nodeData.all_host_ids.length ? `(${nodeData.all_host_ids.length})` : null} - +
+ {nodeData.title}{extend} +
) } } + const treeData = store.treeData; return ( - + + + )}> - {store.records && store.treeData.length === 0 && ( + {treeData.length === 1 && treeData[0].children.length === 0 && ( +
右键点击分组进行分组管理哦~
+ )} + {store.records && treeData.length === 0 && (
你还没有可访问的主机分组,请联系管理员分配主机权限。
)}