diff --git a/frontend/src/layout/components/Sidebar/components/Collapse.vue b/frontend/src/layout/components/Sidebar/components/Collapse.vue index f8e8a9683..b02373e46 100644 --- a/frontend/src/layout/components/Sidebar/components/Collapse.vue +++ b/frontend/src/layout/components/Sidebar/components/Collapse.vue @@ -14,7 +14,7 @@ - {{ loadCurrentName() }} + {{ loadCurrentName() }} @@ -121,10 +121,7 @@ const loadCurrentName = () => { if (globalStore.currentNode === 'local') { return i18n.global.t('xpack.node.master'); } - if (globalStore.currentNode.length <= 15) { - return globalStore.currentNode; - } - return globalStore.currentNode.substring(0, 12) + '...'; + return globalStore.currentNode; } return i18n.global.t('xpack.node.master'); }; @@ -315,4 +312,11 @@ onMounted(() => { .dropdown-item:hover { background: var(--el-menu-item-bg-color-active); } +.ellipsis-text { + display: inline-block; + max-width: 120px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +}