From ad16c4d4adb4bca5d63135f2357d7d3902b145e9 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 7 May 2025 15:22:08 +0000 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=20ToolHeader.vue?= =?UTF-8?q?=20=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dhb52 --- src/layout/components/ToolHeader.vue | 63 +++++++++++++++------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/src/layout/components/ToolHeader.vue b/src/layout/components/ToolHeader.vue index 276eed1bb..8160e28c8 100644 --- a/src/layout/components/ToolHeader.vue +++ b/src/layout/components/ToolHeader.vue @@ -51,6 +51,39 @@ const hasTenantVisitPermission = computed( export default defineComponent({ name: 'ToolHeader', setup() { + const renderLeftSection = () => { + if (layout.value === 'top') return null + + return ( +
+ {hamburger.value && layout.value !== 'cutMenu' && ( + + )} + {breadcrumb.value && } +
+ ) + } + + const renderRightSection = () => ( +
+ {hasTenantVisitPermission.value && } + {screenfull.value && ( + + )} + {search.value && } + {size.value && ( + + )} + {locale.value && ( + + )} + {message.value && ( + + )} + +
+ ) + return () => (
- {layout.value !== 'top' ? ( -
- {hamburger.value && layout.value !== 'cutMenu' ? ( - - ) : undefined} - {breadcrumb.value ? : undefined} -
- ) : undefined} -
- {hasTenantVisitPermission.value ? : undefined} - {screenfull.value ? ( - - ) : undefined} - {search.value ? : undefined} - {size.value ? ( - - ) : undefined} - {locale.value ? ( - - ) : undefined} - {message.value ? ( - - ) : undefined} - -
+ {renderLeftSection()} + {renderRightSection()}
) } -- Gitee