From 3a7502f106d0449e45998fa093f492d27664c17b Mon Sep 17 00:00:00 2001 From: chenxing Date: Wed, 14 Oct 2026 08:44:27 +0800 Subject: [PATCH] =?UTF-8?q?style(=E8=AF=BE=E8=A1=A8=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E4=BB=B6):=20=E8=A1=A8=E5=A4=B4=E5=9E=82=E7=9B=B4=E5=B1=85?= =?UTF-8?q?=E4=B8=AD=E3=80=81=E5=B7=A6=E5=8F=B3=E7=95=99=E7=99=BD=208px?= =?UTF-8?q?=E3=80=81=E8=A1=8C=E9=AB=98=2044px=E3=80=81=E7=A7=91=E7=9B=AE?= =?UTF-8?q?=202=20=E8=A1=8C=E7=9C=81=E7=95=A5=E5=8F=B7=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - th 补 vertical-align: middle —— base/_reset.scss(meyerweb) 给 th/td 统一设了 baseline, scoped 只给 td 写了 middle 导致表头文字按基线对齐、偏上,视觉上像"贴住卡片 header" - .table-wrap padding 2px 15px 12px → 8px 8px 10px(小组件窄,收敛左右留白) - td height 52 → 44px - 科目包 ,-webkit-line-clamp:2:超长科目最多 2 行、省略号收尾、悬停看全文 --- src/components/widgets/SyllabusWidget.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/widgets/SyllabusWidget.vue b/src/components/widgets/SyllabusWidget.vue index f8ddb4a..48027cb 100644 --- a/src/components/widgets/SyllabusWidget.vue +++ b/src/components/widgets/SyllabusWidget.vue @@ -44,7 +44,9 @@ {{ cnNum(slot.slotNo) }} - {{ subjectOf(slot, day.index) }} + + {{ subjectOf(slot, day.index) }} + @@ -236,7 +238,7 @@ function reportHeight() { /* ⚠️ 表格类名必须用私有名(tt):用 my-table 会命中全局 componets/_my_table.scss, 带进 #c7c7c7 竖线与 th 灰底 ⇒「竖线明显 / 表头与卡头糊成一片 / 横线被压得看不见」 */ .table-wrap { - padding: 2px 15px 12px; + padding: 8px 8px 10px; } .tt { width: 100%; @@ -249,6 +251,9 @@ function reportHeight() { font-weight: 700; color: #344449; text-align: center; + // reset(meyerweb) 给 th/td 统一设了 vertical-align: baseline ⇒ 必须显式复位, + // 否则表头文字按基线对齐、偏上,视觉上像"贴住卡片 header" + vertical-align: middle; border: 0; border-bottom: 1px solid #e9edf1; } @@ -257,7 +262,7 @@ function reportHeight() { width: 46px; } td { - height: 52px; + height: 44px; border-bottom: 1px solid #eef1f4; padding: 4px 2px; text-align: center; @@ -272,6 +277,15 @@ function reportHeight() { font-weight: 700; } } +/* 科目文本:最多 2 行,超出以省略号收尾,title 悬停可看全文 */ +.sub { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + line-height: 1.35; + word-break: break-word; +} /* ---------- 空态(模板内联 SVG,不依赖外部图片 / CSS 背景) ---------- */ .wg-empty {