Нема описа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.component.html.backup 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. @if (isLoginPage) {
  2. <router-outlet></router-outlet>
  3. } @else {
  4. <!-- 使用可拖动分割线的布局 -->
  5. <div class="h-screen w-screen bg-gray-50 flex">
  6. <!-- 左侧导航栏 -->
  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. <h2 class="text-lg font-semibold text-gray-800 flex items-center">
  10. <mat-icon class="mr-2 text-blue-600">home</mat-icon>
  11. Talking - ERP
  12. </h2>
  13. </div>
  14. <div class="flex-1 overflow-auto">
  15. <app-tree-nav [treeData]="treeData" (refresh)="onTreeRefresh()"></app-tree-nav>
  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. {{ username }}
  25. </span>
  26. </div>
  27. </div>
  28. <!-- 可拖动分割线 -->
  29. <div class="w-2 h-full flex-shrink-0 cursor-ew-resize bg-gray-300 hover:bg-blue-400 active:bg-blue-500 transition-colors relative"
  30. (mousedown)="startDrag($event)"
  31. [class.bg-blue-400]="isDragging">
  32. <div class="absolute inset-0 flex items-center justify-center">
  33. <div class="w-1 h-8 bg-gray-400 rounded-full"></div>
  34. </div>
  35. </div>
  36. <!-- 右侧内容区 -->
  37. <div class="flex-1 h-full bg-white flex flex-col">
  38. <div class="flex-1 content-area">
  39. <router-outlet></router-outlet>
  40. </div>
  41. </div>
  42. </div>
  43. }