From 06148b402d9d4c2238a2f499d1d90d01cfbdbb3e Mon Sep 17 00:00:00 2001 From: LH_R Date: Thu, 20 Jun 2024 22:20:25 +0800 Subject: [PATCH] fix(ui): topology view error --- .../src/modules/cmdb/views/topology_view/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmdb-ui/src/modules/cmdb/views/topology_view/index.vue b/cmdb-ui/src/modules/cmdb/views/topology_view/index.vue index 726315cf..47fd3f91 100644 --- a/cmdb-ui/src/modules/cmdb/views/topology_view/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/topology_view/index.vue @@ -1252,9 +1252,12 @@ export default { 'download image': '下载图片' } - toolbarElements.forEach((toolbarElement) => { - if (toolbarElement?.children?.length) { - toolbarElement.children.forEach((node) => { + const toolbarElementArray = Array.from(toolbarElements ?? []) + toolbarElementArray.forEach((toolbarElement) => { + const childArray = Array.from(toolbarElement?.children || []) + + if (childArray?.length) { + childArray.forEach((node) => { const oldTitle = node?.getAttribute('title') if (oldTitle) { const newTitle = lang === 'en' ? zhlangMap[oldTitle] : enlangMap[oldTitle] @@ -1441,7 +1444,7 @@ export default { border-width: 2px; border-style: solid; background-color: transparent; - position: relative; + position: relative !important; display: flex; justify-content: center; align-items: center;