From 91bfcf61f44f353dfebc54a57b5b774721de3e9a Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 19 十月 2026 09:39:22 +0800
Subject: [PATCH] feat(auth): 更新门户认证页面布局和样式
---
src/packages/@core/ui-kit/layout-ui/src/vben-layout.vue | 33 ++++++++++++++-------------------
1 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/src/packages/@core/ui-kit/layout-ui/src/vben-layout.vue b/src/packages/@core/ui-kit/layout-ui/src/vben-layout.vue
index fd7c4a5..1baa58b 100644
--- a/src/packages/@core/ui-kit/layout-ui/src/vben-layout.vue
+++ b/src/packages/@core/ui-kit/layout-ui/src/vben-layout.vue
@@ -9,10 +9,10 @@
SCROLL_FIXED_CLASS,
useLayoutFooterStyle,
useLayoutHeaderStyle,
-} from '..\..\..\composables\src';
-import { IconifyIcon } from '..\..\..\base\icons\src';
-import { VbenIconButton } from '..\..\shadcn-ui\src';
-import { ELEMENT_ID_MAIN_CONTENT } from '..\..\..\base\shared\src\constants';
+} from '../../../composables/src';
+import { IconifyIcon } from '../../../base/icons/src';
+import { VbenIconButton } from '../../shadcn-ui/src';
+import { ELEMENT_ID_MAIN_CONTENT } from '../../../base/shared/src/constants';
import { useMouse, useScroll, useThrottleFn } from '@vueuse/core';
@@ -281,19 +281,13 @@
// 濡傛灉涓嶆槸娣峰悎瀵艰埅锛宼abbar 鐨勫搴︿负 100%
if (!isMixedNav.value || props.sidebarHidden) {
width = '100%';
- } else if (sidebarEnable.value) {
- // 榧犳爣鍦ㄤ晶杈规爮涓婃椂锛屼笖渚ц竟鏍忓睍寮�鏃剁殑瀹藉害
- const onHoveringWidth = sidebarExpandOnHover.value
- ? props.sidebarWidth
- : getSideCollapseWidth.value;
-
- // 璁剧疆 marginLeft锛屾牴鎹晶杈规爮鏄惁鎶樺彔鏉ュ喅瀹�
- marginLeft = sidebarCollapse.value
+ } else if (sidebarEnable.value && showSidebar.value && !props.isMobile) {
+ // 鏍囩鏍忎笌瀹為檯渚ф爮瀵归綈锛涗复鏃舵偓鍋滃睍寮�鏃舵墠淇濈暀鎶樺彔瀹藉害銆�
+ const occupiedWidth = sidebarExpandOnHovering.value && !sidebarExpandOnHover.value
? getSideCollapseWidth.value
- : onHoveringWidth;
-
- // 璁剧疆 tabbar 鐨勫搴︼紝璁$畻鏂瑰紡涓� 100% 鍑忓幓渚ц竟鏍忕殑瀹藉害
- width = `calc(100% - ${sidebarCollapse.value ? getSidebarWidth.value : onHoveringWidth}px)`;
+ : getSidebarWidth.value;
+ marginLeft = occupiedWidth;
+ width = `calc(100% - ${occupiedWidth}px)`;
} else {
// 榛樿鎯呭喌涓嬶紝tabbar 鐨勫搴︿负 100%
width = '100%';
@@ -495,7 +489,7 @@
</script>
<template>
- <div class="relative flex min-h-full w-full">
+ <div class="relative flex h-full min-h-0 w-full">
<LayoutSidebar
v-if="sidebarEnableState"
v-model:draggable="sidebarDraggable"
@@ -543,7 +537,7 @@
<div
ref="contentRef"
- class="flex flex-1 flex-col overflow-hidden transition-all duration-300 ease-in"
+ class="flex min-h-0 flex-1 flex-col overflow-hidden transition-all duration-300 ease-in"
>
<div
:class="[
@@ -573,6 +567,7 @@
<template #toggle-button>
<VbenIconButton
v-if="showHeaderToggleButton"
+ :aria-label="sidebarCollapse ? '灞曞紑瀵艰埅鑿滃崟' : '鏀惰捣瀵艰埅鑿滃崟'"
class="my-0 mr-1 rounded-md"
@click="handleHeaderToggle"
>
@@ -603,7 +598,7 @@
:padding-right="contentPaddingRight"
:padding-top="contentPaddingTop"
:style="contentStyle"
- class="transition-[margin-top] duration-200"
+ class="min-h-0 transition-[margin-top] duration-200"
>
<slot name="content"></slot>
--
Gitblit v1.9.3