fix: restore matrix landscape 90° rotation with ml-* CSS and overflow fix

Restores 0910774 rotation structure (external day header + rotated
stage with ml-* layout) and adds missing ml-* CSS rules. Changes
landscape-stage overflow from hidden to visible so viewport can
handle scrolling of time slot content.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-02 21:44:45 +08:00
parent ea8aff1803
commit bae33085ce
2 changed files with 115 additions and 4 deletions
+113 -3
View File
@@ -65,9 +65,9 @@
</div>
</div>
<!-- 横屏布局周几为 X 节次为 Y 表头固定上下滚动 -->
<!-- 横屏布局天为列时段为行固定表头纵向滚动 -->
<div v-else class="ml-wrap">
<div v-if="!hideLandscapeHeader" class="ml-header">
<div class="ml-header">
<div class="ml-corner">时段</div>
<div
v-for="day in weekDays"
@@ -473,7 +473,7 @@ export default defineComponent({
}
}
/* ═══ 横屏布局 ═══ */
/* ═══ 横屏布局(旋转容器内)═══ */
.matrix-wrapper--landscape {
width: 100%;
height: 100%;
@@ -614,4 +614,114 @@ export default defineComponent({
}
}
}
/* 转置布局:时段为列(横向 → 旋转后纵向滚动),天为行(纵向 → 旋转后横向排列) */
.rm-wrap {
width: 100%;
height: 100%;
overflow: hidden;
}
.rm-body {
display: flex;
flex-direction: row;
overflow-x: auto; /* 横向滚动 → 旋转后变成纵向滚动 */
height: 100%;
align-items: stretch;
}
.rm-col {
flex-shrink: 0;
display: flex;
flex-direction: column;
width: 1.6rem;
border-left: 1px solid #f0f0f0;
}
.rm-cell {
flex: 1;
min-height: 0;
display: flex;
flex-direction: row;
gap: 0.02rem;
align-items: stretch;
padding: 0.03rem;
border-bottom: 1px solid #f5f5f5;
overflow: hidden;
&--today {
background: #e6f7ff;
}
.event-block {
flex: 1;
min-width: 0;
padding: 0.04rem 0.06rem;
border-radius: 0.04rem;
cursor: pointer;
overflow: hidden;
.ev-title {
font-weight: 600;
font-size: 0.2rem;
line-height: 1.4;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ev-meta {
font-size: 0.16rem;
color: #888;
line-height: 1.3;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ev-teacher {
font-size: 0.16rem;
color: #555;
line-height: 1.3;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ev-students {
font-size: 0.16rem;
color: #777;
line-height: 1.3;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.cell-empty {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
min-height: 0.5rem;
color: #ccc;
font-size: 0.28rem;
cursor: pointer;
border-radius: 0.04rem;
&:active {
background: #f0f5ff;
color: #3788d8;
}
}
}
.rm-col-header {
flex-shrink: 0;
text-align: center;
padding: 0.08rem 0.04rem;
background: #f7f8fa;
border-bottom: 1px solid #e8e8e8;
border-top: 1px solid #e8e8e8;
.hdr-label { font-weight: 600; font-size: 0.2rem; line-height: 1.4; }
.hdr-time { font-size: 0.16rem; color: #888; line-height: 1.3; }
}
</style>
+2 -1
View File
@@ -1492,11 +1492,12 @@ export default defineComponent({
.landscape-stage {
width: var(--clazz-landscape-body-height);
height: 100dvw;
overflow: hidden;
overflow: visible;
transform: rotate(90deg) translateY(-100%);
transform-origin: top left;
}
/* ═══ 横屏矩阵表头(固定在旋转容器外部)═══ */
.landscape-matrix-header {
flex-shrink: 0;