|
|
@@ -819,14 +819,23 @@ watch(mapStations, () => renderStations(), { deep: true });
|
|
|
padding: 14px 6px 0;
|
|
|
overflow: hidden;
|
|
|
background: #eef2f7;
|
|
|
+ // 作为容器查询参照物:content-grid 宽度随侧边栏变化,视口宽度无法准确判断 summary-card 能否放下 3 个
|
|
|
+ container-type: inline-size;
|
|
|
}
|
|
|
|
|
|
.summary-grid {
|
|
|
display: grid;
|
|
|
- grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
|
+ grid-template-columns: 1fr;
|
|
|
gap: 14px;
|
|
|
}
|
|
|
|
|
|
+// 3 个 summary-card 最小宽度 480px + 2 个 14px 间隙 = 1468px;放得下时 3 列,放不下时单列 3 行
|
|
|
+@container (min-width: 1468px) {
|
|
|
+ .summary-grid {
|
|
|
+ grid-template-columns: repeat(3, minmax(480px, 1fr));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
.summary-card {
|
|
|
display: grid;
|
|
|
grid-template-columns: 126px 1fr;
|
|
|
@@ -1084,7 +1093,6 @@ watch(mapStations, () => renderStations(), { deep: true });
|
|
|
overflow: visible;
|
|
|
}
|
|
|
|
|
|
- .summary-grid,
|
|
|
.content-grid {
|
|
|
grid-template-columns: 1fr;
|
|
|
}
|