Kaynağa Gözat

缩放改好-修改样式

qdy 1 ay önce
ebeveyn
işleme
973355f538

+ 1
- 1
src/app/app.component.html Dosyayı Görüntüle

@@ -39,7 +39,7 @@
39 39
     <div class="flex-1 h-full overflow-hidden bg-white flex flex-col">
40 40
 
41 41
       <div class="flex-1 overflow-auto content-area">
42
-        <div class="p-4 h-full">
42
+        <div class="pt-0 px-4 pb-4 h-full">
43 43
           <router-outlet></router-outlet>
44 44
         </div>
45 45
       </div>

+ 1
- 1
src/app/components/sticky-header/sticky-header.component.html Dosyayı Görüntüle

@@ -1,4 +1,4 @@
1
-<div class="sticky-header sticky top-0 z-10 transition-all duration-300 ease-in-out" [class.locked]="isLocked" [class.compact]="isCompact" [ngStyle]="isLocked ? {
1
+<div class="sticky-header sticky top-0 z-10 transition-all duration-300 ease-in-out" [style.min-height]="headerHeight" [class.locked]="isLocked" [class.compact]="isCompact" [ngStyle]="isLocked ? {
2 2
   width: headerWidth ? (typeof headerWidth === 'number' ? headerWidth + 'px' : headerWidth) : null,
3 3
   left: headerLeft ? (typeof headerLeft === 'number' ? headerLeft + 'px' : headerLeft) : null
4 4
 } : null">

+ 6
- 0
src/app/components/sticky-header/sticky-header.component.scss Dosyayı Görüntüle

@@ -21,6 +21,8 @@
21 21
       inset 0 0 0 1px rgba(255, 255, 255, 0.9), /* 内边缘高光,增强立体感 */
22 22
       0 1px 2px 0 rgba(0, 0, 0, 0.05); /* 轻微外阴影,保持与页面融合 */
23 23
     transition: all 0.3s ease-in-out;
24
+    height: 100%; /* 填充父容器高度 */
25
+    min-height: 100%; /* 确保填充最小高度 */
24 26
     /* 移除 overflow: hidden,防止内容裁剪 */
25 27
   }
26 28
 
@@ -70,6 +72,8 @@
70 72
       background: #f1f5f9;
71 73
       border: 1px solid #cbd5e1;
72 74
       margin: 0; /* 移除外边距,确保精确对齐 */
75
+      height: 100%; /* 填充父容器高度 */
76
+      min-height: 100%; /* 确保填充最小高度 */
73 77
       /* 保持原padding大小 */
74 78
     }
75 79
 
@@ -116,6 +120,8 @@
116 120
         inset 0 0 0 1px rgba(255, 255, 255, 0.8); /* 内边缘高光,增强一体感 */
117 121
       background: #f1f5f9; /* 稍微深一点的背景,强调状态变化 */
118 122
       border: 1px solid #cbd5e1; /* 保持一致的边框 */
123
+      height: 100%; /* 填充父容器高度 */
124
+      min-height: 100%; /* 确保填充最小高度 */
119 125
       
120 126
       > div:first-child {
121 127
         padding-top: 0.375rem;

+ 3
- 0
src/app/components/sticky-header/sticky-header.component.ts Dosyayı Görüntüle

@@ -95,6 +95,9 @@ export class StickyHeaderComponent implements AfterViewInit, OnDestroy {
95 95
   /** 宽度参考目标选择器(用于锁定状态宽度匹配),如未设置则使用滚动容器 */
96 96
   @Input() widthTarget: string | null = null;
97 97
 
98
+  /** 标题区域最小高度(用于测试或固定高度布局),如 '200px', '10rem',未设置则由内容决定 */
99
+  @Input() headerHeight: string | null = null;
100
+
98 101
   /** 按钮点击事件 */
99 102
   @Output() buttonClick = new EventEmitter<void>();
100 103
 

+ 1
- 1
src/app/pages/service-register-config/service-register-config.component.html Dosyayı Görüntüle

@@ -1,4 +1,4 @@
1
-<div class="h-full flex flex-col p-2 min-w-0">
1
+<div class="h-full flex flex-col pt-0 px-2 pb-2 min-w-0">
2 2
   <!-- 顶部标题区域 -->
3 3
   <app-sticky-header
4 4
     [title]="title"

+ 2
- 1
src/app/pages/tenant-list/tenant-list.component.html Dosyayı Görüntüle

@@ -1,4 +1,4 @@
1
-<div class="h-full flex flex-col p-4 min-w-0">
1
+<div class="h-full flex flex-col pt-0 px-4 pb-4 min-w-0">
2 2
    <app-sticky-header
3 3
     [title]="'租户管理'"
4 4
     [buttonText]="'新增租户'"
@@ -9,6 +9,7 @@
9 9
      [scrollThreshold]="20"
10 10
     [compactThreshold]="80"
11 11
     [widthTarget]="'#tenantMatCard'"
12
+    [headerHeight]="'200px'"
12 13
     (buttonClick)="openAddDialog()">
13 14
   </app-sticky-header>
14 15
 

Loading…
İptal
Kaydet