From 5d7b8526f4100c28908ab61429760fd761d304ac Mon Sep 17 00:00:00 2001 From: chenxing Date: Fri, 16 Oct 2026 09:50:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=B8=80=E5=91=A8=E5=AE=89=E6=8E=92?= =?UTF-8?q?=E5=B0=8F=E7=BB=84=E4=BB=B6):=20=E9=9D=A2=E6=9D=BF=E5=85=B3?= =?UTF-8?q?=E6=A8=AA=E5=90=91=E6=BB=9A=E5=8A=A8=EF=BC=88=E4=BF=AE=E5=A4=96?= =?UTF-8?q?=E6=A1=86=20X=20=E8=BD=B4=E6=BB=9A=E5=8A=A8=E6=9D=A1=E3=80=81?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=9D=A1=E8=A2=AB=E8=A3=81=EF=BC=89+=20?= =?UTF-8?q?=E8=89=B2=E7=B3=BB=20#5979ea=E3=80=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=8C=BA=E5=9B=BA=E5=AE=9A=203=20=E6=9D=A1=E3=80=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=A1=8C=E5=85=A8=E7=A9=BA=E8=90=BD=E3=80=8C-?= =?UTF-8?q?=E3=80=8D=E3=80=81=E5=A4=87=E6=B3=A8=E6=97=A0=E5=88=99=E4=B8=8D?= =?UTF-8?q?=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 色系:#2d8cf0 / #1d4ed8 整族换 #5979ea(hover #4864d8),覆盖今日方块、圆点、查看概览、展开、今日星期 - 列表区:268px(≈5 条) → calc(var(--wk-row) * 3) = 171px(正好 3 条 + 滚动),新增 --wk-row: 57px - 条目等高 57px;信息行(地点 · 负责人 · 出席对象)恒渲染,三者全空落「-」,不再留白 - 备注:无备注整块不渲染;超 2 行才出「展开」且贴第二行末尾;remarkText 加 trim;换周重置 remarkOverflow - 「查看概览 ›」→「查看概览」(去掉箭头字符) - 修 X 轴滚动条根因(views/index.vue):widgetOptions 的 scrollPanel 关掉 scrollingX 原 scrollingX=true 时 vuescroll 给 .__view 内联 width:fit-content,包含块被最长文本撑到 ≈425px ⇒ 面板 scrollWidth 561 > clientWidth 391,外框出 #333 横向条、日期条 7 列被裁成 5 列、长条目省略号失效 同时 .content { min-width: 0 } 兜底(flex 项默认 min-width:auto 会让 nowrap 文本不收缩) --- src/components/widgets/WeekplanWidget.vue | 67 +++++++++++++++++------ src/views/index.vue | 13 ++++- 2 files changed, 61 insertions(+), 19 deletions(-) diff --git a/src/components/widgets/WeekplanWidget.vue b/src/components/widgets/WeekplanWidget.vue index 01bfae6..657572a 100644 --- a/src/components/widgets/WeekplanWidget.vue +++ b/src/components/widgets/WeekplanWidget.vue @@ -43,9 +43,9 @@ :href="overviewUrl" target="_blank" rel="noopener" - >查看概览 › + >查看概览 - +
-
{{ metaOf(item) }}
+ +
{{ metaOf(item) || "-" }}
{{ currentDayLabel }}
- -
+ +
{{ remarkText }}
{{ remarkExpanded ? "收起" : "展开" }}
@@ -139,7 +141,8 @@ const titleFull = computed(() => { * 真正无周对象(oapi 降级返回 {})才走大图标空态。 */ const hasWeek = computed(() => titleStr.value !== ""); -const remarkText = computed(() => weekData.value.remark || ""); +// trim:备注尾部换行/空格会多出一个空行,让「展开」在只有 2 行内容时也误判溢出 +const remarkText = computed(() => String(weekData.value.remark || "").trim()); const canPrev = computed(() => weekOffset.value > minWeek.value); const canNext = computed(() => weekOffset.value < maxWeek.value); @@ -185,6 +188,7 @@ async function loadWeek(week: number) { loading.value = false; // 换周/换数据后重置备注折叠态并重测溢出 remarkExpanded.value = false; + remarkOverflow.value = false; nextTick(measureRemark); reportHeight(); } @@ -246,7 +250,7 @@ function monthDay(day: any) { return String((day && day.dateText) || ""); } -/** 次要信息行:地点 / 负责人 / 参与人员,全部为空则不显示 */ +/** 次要信息行:地点 / 负责人 / 参与人员;三者全空时落「-」,不留白(条目保持等高) */ function metaOf(item: any) { if (!item) return ""; const parts: string[] = []; @@ -275,7 +279,15 @@ function reportHeight() {