浏览代码

tree左边样式ok

qdy 1 个月前
当前提交
6d5c5f32f7
共有 1 个文件被更改,包括 14 次插入28 次删除
  1. 14
    28
      web/src/app/app.component.html

+ 14
- 28
web/src/app/app.component.html 查看文件

@@ -4,16 +4,26 @@
4 4
   <!-- 使用可拖动分割线的布局 -->
5 5
   <div class="h-screen w-screen bg-gray-50 flex overflow-hidden">
6 6
     <!-- 左侧导航栏 -->
7
-    <div class="h-full overflow-hidden bg-white border-r border-gray-200 flex-shrink-0" [style.width.px]="sidebarWidth">
8
-      <div class="p-4 border-b border-gray-200 bg-gradient-to-r from-blue-50 to-indigo-50">
7
+    <div class="h-full overflow-hidden bg-white border-r border-gray-200 flex-shrink-0 flex flex-col" [style.width.px]="sidebarWidth">
8
+      <div class="px-4 pt-[22px] pb-[10px] border-b border-gray-200 bg-gradient-to-r from-blue-50 to-indigo-50 flex items-start">
9 9
         <h2 class="text-lg font-semibold text-gray-800 flex items-center">
10 10
           <mat-icon class="mr-2 text-blue-600">home</mat-icon>
11 11
           Talking - ERP
12 12
         </h2>
13 13
       </div>
14
-      <div class="h-[calc(100%-80px)] overflow-auto">
14
+      <div class="flex-1 overflow-auto">
15 15
         <app-tree-nav></app-tree-nav>
16 16
       </div>
17
+      <!-- 底部退出区域 -->
18
+      <div class="p-3 border-t border-gray-200 bg-gray-50 flex items-center justify-between">
19
+        <div class="flex items-center cursor-pointer hover:bg-gray-200 rounded p-2 group" (click)="logout()" matTooltip="退出登录" matTooltipPosition="above">
20
+          <mat-icon class="mr-2 text-gray-600 group-hover:text-red-600">logout</mat-icon>
21
+          <span class="text-sm text-gray-700 group-hover:text-red-700">退出</span>
22
+        </div>
23
+        <span class="text-sm text-gray-700">
24
+          {{ authService.getCurrentUser()?.username || '用户' }}
25
+        </span>
26
+      </div>
17 27
     </div>
18 28
     
19 29
     <!-- 可拖动分割线 -->
@@ -27,31 +37,7 @@
27 37
     
28 38
     <!-- 右侧内容区 -->
29 39
     <div class="flex-1 h-full overflow-hidden bg-white flex flex-col">
30
-      <div class="px-4 py-2 border-b border-gray-200 bg-white flex items-center justify-between h-12 flex-shrink-0">
31
-        <!-- 面包屑导航 -->
32
-        <div class="flex items-center space-x-1 text-sm">
33
-          @for (item of breadcrumbPath; track item; let last = $last) {
34
-            <span class="text-gray-600">{{ item }}</span>
35
-            @if (!last) {
36
-              <span class="text-gray-400 mx-1">/</span>
37
-            }
38
-          }
39
-        </div>
40
-        
41
-        <!-- 右侧:用户名和退出按钮 -->
42
-        <div class="flex items-center space-x-4">
43
-          @if (authService.isAuthenticated()) {
44
-            <span class="text-sm text-gray-700">
45
-              {{ authService.getCurrentUser()?.username || '用户' }}
46
-            </span>
47
-          }
48
-          
49
-          <!-- 退出图标 -->
50
-          <button mat-icon-button (click)="logout()" class="text-gray-600 hover:text-red-600" matTooltip="退出登录">
51
-            <mat-icon>logout</mat-icon>
52
-          </button>
53
-        </div>
54
-      </div>
40
+
55 41
       <div class="flex-1 overflow-auto">
56 42
         <div class="p-4 h-full">
57 43
           <router-outlet></router-outlet>

正在加载...
取消
保存