Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

app.component.scss 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /* 主应用布局 - 基于工作示例的grid布局 + 可拖动分割线 */
  2. :host {
  3. display: block;
  4. width: 100vw;
  5. height: 100vh;
  6. background-color: #f9fafb; /* gray-50 */
  7. }
  8. /* Grid布局容器 */
  9. .app-layout {
  10. display: grid;
  11. grid-template-columns: 320px 8px 1fr; /* 默认宽度 */
  12. height: 100vh;
  13. overflow: hidden;
  14. font-family: system-ui, -apple-system, sans-serif;
  15. }
  16. /* 左侧面板 */
  17. .left-panel {
  18. background: white;
  19. color: #333;
  20. display: flex;
  21. flex-direction: column;
  22. overflow-y: auto;
  23. border-right: 1px solid #e0e0e0;
  24. box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
  25. }
  26. .logo-section {
  27. padding: 20px;
  28. border-bottom: 1px solid #e0e0e0;
  29. background: linear-gradient(to right, #f8f9fa, #e9ecef);
  30. }
  31. .logo-section h2 {
  32. margin: 0;
  33. font-size: 18px;
  34. font-weight: 600;
  35. color: #2c3e50;
  36. display: flex;
  37. align-items: center;
  38. }
  39. .logo-section mat-icon {
  40. color: #3b82f6;
  41. }
  42. .tree-container {
  43. flex: 1;
  44. overflow-y: auto;
  45. padding: 10px;
  46. }
  47. .footer-info {
  48. margin-top: auto;
  49. padding: 16px 20px;
  50. border-top: 1px solid #e0e0e0;
  51. display: flex;
  52. justify-content: space-between;
  53. align-items: center;
  54. background: #f8f9fa;
  55. }
  56. .footer-info .flex {
  57. display: flex;
  58. align-items: center;
  59. transition: all 0.2s;
  60. }
  61. .footer-info .flex:hover {
  62. background-color: #e9ecef;
  63. }
  64. .footer-info mat-icon {
  65. font-size: 18px;
  66. }
  67. .footer-info span {
  68. color: #6c757d;
  69. font-size: 14px;
  70. }
  71. /* 可拖动分割线 */
  72. .splitter {
  73. background: #e5e7eb;
  74. cursor: col-resize;
  75. display: flex;
  76. align-items: center;
  77. justify-content: center;
  78. transition: background-color 0.2s;
  79. position: relative;
  80. user-select: none;
  81. }
  82. .splitter:hover,
  83. .splitter.dragging {
  84. background: #3b82f6;
  85. }
  86. .splitter-handle {
  87. width: 2px;
  88. height: 40px;
  89. background: #9ca3af;
  90. border-radius: 1px;
  91. transition: background-color 0.2s;
  92. }
  93. .splitter:hover .splitter-handle,
  94. .splitter.dragging .splitter-handle {
  95. background: white;
  96. }
  97. /* 右侧面板 */
  98. .right-panel {
  99. background: #f8f9fa;
  100. overflow: hidden;
  101. position: relative;
  102. }
  103. /* 关键:滚动容器 - sticky-header检测此容器 */
  104. .content-container {
  105. height: 100%;
  106. overflow-y: auto;
  107. background: white;
  108. }
  109. /* 滚动条样式 */
  110. .content-container::-webkit-scrollbar {
  111. width: 8px;
  112. }
  113. .content-container::-webkit-scrollbar-track {
  114. background: #f1f2f6;
  115. border-radius: 4px;
  116. }
  117. .content-container::-webkit-scrollbar-thumb {
  118. background: #bdc3c7;
  119. border-radius: 4px;
  120. }
  121. .content-container::-webkit-scrollbar-thumb:hover {
  122. background: #95a5a6;
  123. }
  124. /* 响应式设计 */
  125. @media (max-width: 1024px) {
  126. .app-layout {
  127. grid-template-columns: 240px 8px 1fr;
  128. }
  129. }
  130. @media (max-width: 768px) {
  131. .app-layout {
  132. grid-template-columns: 1fr;
  133. grid-template-rows: auto 8px auto;
  134. }
  135. .left-panel {
  136. max-height: 300px;
  137. border-right: none;
  138. border-bottom: 1px solid #e0e0e0;
  139. }
  140. .logo-section {
  141. padding: 16px;
  142. }
  143. .splitter {
  144. cursor: row-resize;
  145. }
  146. .splitter-handle {
  147. width: 40px;
  148. height: 2px;
  149. }
  150. }