Fix Bug #568: 修复门诊日结页面排版混乱 - 使用auto-fit响应式网格布局
根因: 1. .cols-4使用repeat(4,1fr)固定4列网格,窄屏下列宽不足导致内容溢出和排版混乱 2. 1200px断点强制切换为2列,在中等屏幕上造成不必要的布局跳变 3. 报告容器无最小宽度,窄屏下网格列被过度压缩 修复: 1. 改用repeat(auto-fit, minmax(250px, 1fr))自适应网格,列数根据容器宽度自动调整 2. 移除1200px媒体查询断点,让auto-fit自然处理响应式 3. 添加min-width:900px确保报告容器最小宽度,防止列过度压缩 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -267,6 +267,7 @@ getPharmacyCabinetLists();
|
|||||||
.report-container {
|
.report-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
|
min-width: 900px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 24px 32px;
|
padding: 24px 32px;
|
||||||
@@ -298,7 +299,7 @@ getPharmacyCabinetLists();
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.cols-4 {
|
.cols-4 {
|
||||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
grid-template-columns: repeat(4, 1fr);
|
||||||
}
|
}
|
||||||
.span-2 {
|
.span-2 {
|
||||||
grid-column: span 2;
|
grid-column: span 2;
|
||||||
@@ -320,23 +321,13 @@ getPharmacyCabinetLists();
|
|||||||
color: #303133;
|
color: #303133;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
min-width: 0;
|
flex: 1;
|
||||||
overflow: hidden;
|
min-width: 0;}
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
.divider {
|
.divider {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background-color: #dcdfe6;
|
background-color: #dcdfe6;
|
||||||
margin: 16px 0;
|
margin: 16px 0;
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 1200px) {
|
|
||||||
.cols-4 {
|
|
||||||
grid-template-columns: repeat(2, 1fr);
|
|
||||||
}
|
|
||||||
.span-2 {
|
|
||||||
grid-column: span 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
.cols-4 {
|
.cols-4 {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
|||||||
Reference in New Issue
Block a user