fix: 操作审计页移动端适配(窄屏筛选 2 列/隐藏题头/数据行堆叠)
桌面布局的 9 列筛选行在窄屏下每列仅剩数十像素(标签逐字换行、 输入框压扁),固定列宽列表合计约 61rem 必然横向溢出被截断。 ≤1023px(手机横竖屏/平板竖屏/半屏小窗口)改为: - 筛选栏 2 列、操作按钮独占整行;≤480px 手机竖屏单列 - 隐藏固定列宽列题头,entity 行纵向堆叠(覆盖组件内联 width) - 截断类字段放宽到 100%,分页条允许换行 ≥1024px 维持桌面布局不变。 新增 AuditLogList.mobile.spec.ts 结构性回归测试(8 项)。
This commit is contained in:
@@ -575,4 +575,70 @@ onMounted(fetchLogs)
|
||||
padding: 1rem;
|
||||
border-top: 1px solid #eaecf0;
|
||||
}
|
||||
|
||||
/* ===== 移动端适配(窄屏:手机 / 竖屏平板 / 半屏小窗口) =====
|
||||
桌面布局的 9 列筛选行在窄屏下每列仅剩数十像素(标签逐字换行、
|
||||
输入框被压扁),列表固定列宽合计约 61rem 必然横向溢出被截断。
|
||||
窄屏改为:筛选 2 列(更窄单列)、隐藏列题头、数据行字段纵向堆叠。
|
||||
断点取 1023px:覆盖手机横竖屏与平板竖屏;≥1024px 维持桌面布局不变。
|
||||
媒体查询置于文件末尾,同特异性规则按顺序覆盖桌面样式。 */
|
||||
@media (max-width: 1023px) {
|
||||
.audit-body {
|
||||
padding: 0.75rem 0.75rem 1.5rem;
|
||||
}
|
||||
.filter-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
.filter-actions {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.filter-actions > :deep(*) {
|
||||
flex: 1;
|
||||
}
|
||||
/* 固定列宽的题头在纵向堆叠布局下无从对齐,隐藏 */
|
||||
.audit-header {
|
||||
display: none;
|
||||
}
|
||||
/* entity 行由「表格行 + 固定列宽字段」改为纵向堆叠的块:
|
||||
tr/td 改块级、字段换行排列;组件通过内联 style 写死字段宽度,
|
||||
样式表须用 !important 才能覆盖内联样式 */
|
||||
.audit-row {
|
||||
display: block;
|
||||
}
|
||||
.audit-row :deep(.entity-start-wrapper),
|
||||
.audit-row :deep(.entity-end-wrapper) {
|
||||
display: block;
|
||||
}
|
||||
.audit-row :deep(.entity-end-wrapper) {
|
||||
padding-top: 0;
|
||||
}
|
||||
.audit-row :deep(.entity-start) {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.audit-row :deep(.entity-end) {
|
||||
justify-content: flex-start;
|
||||
gap: 1rem;
|
||||
}
|
||||
.audit-row :deep(.entity-field-wrapper) {
|
||||
width: auto !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
.row-sub,
|
||||
.action-desc {
|
||||
max-width: 100%;
|
||||
}
|
||||
/* 分页条(总数 + 翻页/条数控制器)窄屏下换行铺开,不横向溢出 */
|
||||
.audit-pagination :deep(.pagination),
|
||||
.audit-pagination :deep(.pagination__controller) {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
/* 手机竖屏:单列筛选,datetime-local 等宽控件不再被压扁 */
|
||||
.filter-grid {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user