| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- /* 主应用布局 - 基于工作示例的grid布局 + 可拖动分割线 */
- :host {
- display: block;
- width: 100vw;
- height: 100vh;
- background-color: #f9fafb; /* gray-50 */
- }
-
- /* Grid布局容器 */
- .app-layout {
- display: grid;
- grid-template-columns: 320px 8px 1fr; /* 默认宽度 */
- height: 100vh;
- overflow: hidden;
- font-family: system-ui, -apple-system, sans-serif;
- }
-
- /* 左侧面板 */
- .left-panel {
- background: white;
- color: #333;
- display: flex;
- flex-direction: column;
- overflow-y: auto;
- border-right: 1px solid #e0e0e0;
- box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
- }
-
- .logo-section {
- padding: 20px;
- border-bottom: 1px solid #e0e0e0;
- background: linear-gradient(to right, #f8f9fa, #e9ecef);
- }
-
- .logo-section h2 {
- margin: 0;
- font-size: 18px;
- font-weight: 600;
- color: #2c3e50;
- display: flex;
- align-items: center;
- }
-
- .logo-section mat-icon {
- color: #3b82f6;
- }
-
- .tree-container {
- flex: 1;
- overflow-y: auto;
- padding: 10px;
- }
-
- .footer-info {
- margin-top: auto;
- padding: 16px 20px;
- border-top: 1px solid #e0e0e0;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: #f8f9fa;
- }
-
- .footer-info .flex {
- display: flex;
- align-items: center;
- transition: all 0.2s;
- }
-
- .footer-info .flex:hover {
- background-color: #e9ecef;
- }
-
- .footer-info mat-icon {
- font-size: 18px;
- }
-
- .footer-info span {
- color: #6c757d;
- font-size: 14px;
- }
-
- /* 可拖动分割线 */
- .splitter {
- background: #e5e7eb;
- cursor: col-resize;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: background-color 0.2s;
- position: relative;
- user-select: none;
- }
-
- .splitter:hover,
- .splitter.dragging {
- background: #3b82f6;
- }
-
- .splitter-handle {
- width: 2px;
- height: 40px;
- background: #9ca3af;
- border-radius: 1px;
- transition: background-color 0.2s;
- }
-
- .splitter:hover .splitter-handle,
- .splitter.dragging .splitter-handle {
- background: white;
- }
-
- /* 右侧面板 */
- .right-panel {
- background: #f8f9fa;
- overflow: hidden;
- position: relative;
- }
-
- /* 关键:滚动容器 - sticky-header检测此容器 */
- .content-container {
- height: 100%;
- overflow-y: auto;
- background: white;
- }
-
- /* 滚动条样式 */
- .content-container::-webkit-scrollbar {
- width: 8px;
- }
-
- .content-container::-webkit-scrollbar-track {
- background: #f1f2f6;
- border-radius: 4px;
- }
-
- .content-container::-webkit-scrollbar-thumb {
- background: #bdc3c7;
- border-radius: 4px;
- }
-
- .content-container::-webkit-scrollbar-thumb:hover {
- background: #95a5a6;
- }
-
- /* 响应式设计 */
- @media (max-width: 1024px) {
- .app-layout {
- grid-template-columns: 240px 8px 1fr;
- }
- }
-
- @media (max-width: 768px) {
- .app-layout {
- grid-template-columns: 1fr;
- grid-template-rows: auto 8px auto;
- }
-
- .left-panel {
- max-height: 300px;
- border-right: none;
- border-bottom: 1px solid #e0e0e0;
- }
-
- .logo-section {
- padding: 16px;
- }
-
- .splitter {
- cursor: row-resize;
- }
-
- .splitter-handle {
- width: 40px;
- height: 2px;
- }
- }
|