diff --git a/src/components/widgets/SyllabusWidget.vue b/src/components/widgets/SyllabusWidget.vue index 48027cb..7b7fbb1 100644 --- a/src/components/widgets/SyllabusWidget.vue +++ b/src/components/widgets/SyllabusWidget.vue @@ -34,22 +34,25 @@
- - - - - - - - - - - - - -
节{{ day.name }}
{{ cnNum(slot.slotNo) }} - {{ subjectOf(slot, day.index) }} -
+ +
+ + + + + + + + + + + + + +
节{{ day.name }}
{{ cnNum(slot.slotNo) }} + {{ subjectOf(slot, day.index) }} +
+
@@ -225,11 +228,11 @@ function reportHeight() { white-space: nowrap; &:hover { - background: #f5f8fb; + background: #f4f7ff; } &.on { - color: #2d8cf0; - background: #f0f7ff; + color: var(--color-primary, #5979ea); + background: var(--color-primary-weak, #eef2ff); font-weight: 600; } } @@ -240,6 +243,24 @@ function reportHeight() { .table-wrap { padding: 8px 8px 10px; } +/* 最多露出 7 节课(表头 44 + 7×44 = 352),再多则纵向滚动,表头 sticky 常驻 */ +.tt-scroll { + max-height: 352px; + overflow-y: auto; + scrollbar-width: thin; + scrollbar-color: #d5dbe3 transparent; + + &::-webkit-scrollbar { + width: 6px; + } + &::-webkit-scrollbar-thumb { + background: #d5dbe3; + border-radius: 3px; + } + &::-webkit-scrollbar-track { + background: transparent; + } +} .tt { width: 100%; border-collapse: collapse; @@ -255,7 +276,12 @@ function reportHeight() { // 否则表头文字按基线对齐、偏上,视觉上像"贴住卡片 header" vertical-align: middle; border: 0; - border-bottom: 1px solid #e9edf1; + // sticky + border-collapse 时 cell 的 border 会随滚动丢失 ⇒ 用 inset box-shadow 画分隔线 + box-shadow: inset 0 -1px 0 #e9edf1; + position: sticky; + top: 0; + z-index: 1; + background: #fff; } th:first-child, td:first-child {