style(agents): 修 KPI 与下方块 0 间距 + 左右两栏恢复等高(版本 2.5.2 → 2.5.3)

老板圈红框指出 KPI 卡与下面内容之间空得太明显。先量后改,定位到两个叠加根因:

1. KPI 与下方块间距 = 0(kpis.bottom=219 == ag-layout.y=219,两排卡紧贴)
2. .ag-layout 被 min-height: calc(100vh - 300px) 撑到 733px,而左列表卡内容
   只有 ~150px → 卡下方 580px 空白

改法:
- .ag-kpis 加 margin-bottom: var(--gap-lg) → KPI 与下方 14px
- 去掉 .ag-layout 的 min-height 撑高;左卡改 align-self:stretch + 内部列表
  flex:1 滚动,不再单独设高度上限

验收实测:row-h 78→102 / 14px / kpis 116→219 / 14px / ag-layout 233→966,
左列表卡与右详情均 233→966 (h=733) 完全齐平。

测试 219 全过;ci_check 全绿。
This commit is contained in:
api-gateway committed 2026-09-30 11:31:58 +08:00
1 parent 389fd1b6fa
commit 267dc42db6
4 files changed
+42 -13

No files matched your search

+10 -4
View File
@@ -689,12 +689,18 @@ onMounted(load)
<style scoped>
.sub-hint { margin-left: 8px; color: var(--muted); font-size: 12.5px; }
.row-h { display: flex; align-items: center; gap: var(--gap-sm); margin-bottom: var(--gap-lg); }
.ag-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--gap-lg); align-items: start; min-height: calc(100vh - 300px); }
/* 左列表卡:撑到与右侧详情同高(原来只有内容高度 → 底部空一截) */
.ag-layout > .card:first-child { align-self: stretch; display: flex; flex-direction: column; }
.ag-layout {
display: grid; grid-template-columns: 320px minmax(0, 1fr);
gap: var(--gap-lg); align-items: start;
}
/* 左列表卡:与右侧详情同高(同排对齐),内部列表区滚动 */
.ag-layout > .card:first-child {
align-self: stretch; display: flex; flex-direction: column;
min-height: 320px;
}
.ag-layout > .card:first-child .ag-list { flex: 1; min-height: 0; overflow: auto; }
/* KPI 卡等高(第三十八轮:之前几张高度不一,因为内容行数不同) */
.ag-kpis { align-items: stretch; }
.ag-kpis { align-items: stretch; margin-bottom: var(--gap-lg); }
.ag-kpis .kpi .v { line-height: 1.15; }
/* 注脚统一贴底、单行省略 —— 否则第一张卡注脚两行会把四张卡的文字基线拉歪 */
.ag-kpis .kpi .f {