From c498037ec8078dc729bac060e17cb565d585b679 Mon Sep 17 00:00:00 2001 From: laoyang Date: Thu, 5 Nov 2026 15:52:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=A0=87=E9=A2=98=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E8=89=B2=E8=A1=A5=E5=AE=8C=20+=20=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=8E=BB=E5=8A=A0=E5=8F=B7=20+=20=E5=85=A8=E5=A4=A9=E5=9D=97?= =?UTF-8?q?=E4=B8=8A=E9=97=B4=E8=B7=9D=20(#60=20#61)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户二次反馈四项,全部是上一轮没做到位的: 1. 标题颜色没变 上一轮给 FbSectionTitle 加了 @Param accent(默认空串), 但首页 6 处调用点**一处都没传**。grep 到的 7 个 accent: 全在 FbEventSheet/FbTaskPanel/FbDayEditSheet/FbMovieDetailSheet/ FbPersonSheet 上 —— 那些组件本来就自带这个参数,与标题无关。 空串 ⇒ titleColor() 退回 #8A7A6D 灰 ⇒ 组件改得再对也不变。 补 5 处:日程/任务/纪念日/观影/联系人各自 fbModuleOf().brand。 往年的今天不传(混合来源,没有单一模块色)。 2. 条数与"新建"贴死 extra 后面直接接胶囊,Row 无 space、胶囊无 margin。 加 margin({left:12})。不用 8:胶囊有实体底色,视觉比纯文字更紧。 3. 去掉「+」前缀 5 处 addText 去加号;连带 3 处空态提示的「点右上角「+ 新建」」 同步改掉,否则提示里带着按钮上已不存在的符号。 4. 全天日程问题在上面不在下面 上一轮改 bottom 6->12,方向反了。 FbDayEventPanel 给 FbDayTimeline 的 padding 没有 top ⇒ 第一个全天色块上边直接压在白卡片顶边上。 改成 {top:10, bottom:12}。只加在有全天的分支里。 --- .../src/main/ets/components/FbDayTimeline.ets | 17 ++++++++++----- entry/src/main/ets/components/Widgets.ets | 5 +++++ entry/src/main/ets/pages/home/FbHomePage.ets | 21 ++++++++++++------- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/entry/src/main/ets/components/FbDayTimeline.ets b/entry/src/main/ets/components/FbDayTimeline.ets index 53edeef..2aa2592 100644 --- a/entry/src/main/ets/components/FbDayTimeline.ets +++ b/entry/src/main/ets/components/FbDayTimeline.ets @@ -443,12 +443,19 @@ export struct FbDayTimeline { }, (e: FbCalEvent): string => 'al_' + FbTimelineUtil.keyOf(e)) } .width('100%') - /* #61(用户 2026-11-05):「全天日程…跟下面那个白色的块是上边齐平的, - 这样视觉效果很不好…它们之间有几个像素的空隙。」 + /* 🔴 #61(用户 2026-11-05,二次反馈):「全天日程不是下面太窄了,是上面。 + 现在上面那个边和它下面白色框的边是重合的。」 - 原 6vp 在全天色块的实心背景下面几乎看不出缝,视觉上像贴着下边框。 - 加到 12:与 Column(space:4) 的行间距形成「行内紧、块间松」的层次。 */ - .padding({ bottom: 12 }) + 原来我只改了 `bottom`(6→12),**方向弄反了**: + 本组件的外层 `FbDayEventPanel` 只给了 `padding({left,right,bottom:8})`, + **没有 top** ⇒ 第一个全天色块的**上边直接压在白卡片的顶边上**, + 颜色块与卡片边缘重合,看起来像被裁掉一截。 + + 正确做法:给全天块补 **top: 10**。同时保留 bottom: 12 —— + 上边接卡片边缘、下边接时间轴,两处都是"块与块之间",都该有呼吸。 + ⚠️ 只加在**有全天的分支**里:没有全天日程时时间轴自己贴顶是正常的 + (时间轴顶部有小时刻度,视觉上不算挤压)。 */ + .padding({ top: 10, bottom: 12 }) } // ---- 时间轴主体 ---- diff --git a/entry/src/main/ets/components/Widgets.ets b/entry/src/main/ets/components/Widgets.ets index 5799f66..8e22c5d 100644 --- a/entry/src/main/ets/components/Widgets.ets +++ b/entry/src/main/ets/components/Widgets.ets @@ -224,6 +224,11 @@ export struct FbSectionTitle { .fontSize(FbMetric.fontTiny) .fontColor('#FFFFFF') .fontWeight(FontWeight.Medium) + /* 🔴 #60(用户 2026-11-05):「右边11条,这个和那个"新建"挨得太近了。」 + 原因:`extra` 后面直接接胶囊,Row 无 space、胶囊无 margin ⇒ 两者贴死。 + 加 12vp 左外边距(不是 8)—— 胶囊有实体底色,视觉间距会比纯文字 + 显得更紧,8vp 看着仍然像一坨;12vp 才有清晰的分隔感。 */ + .margin({ left: 12 }) .padding({ left: 10, right: 10, top: 5, bottom: 5 }) .backgroundColor(this.accent !== '' ? this.accent : '#A84A28') .borderRadius(999) diff --git a/entry/src/main/ets/pages/home/FbHomePage.ets b/entry/src/main/ets/pages/home/FbHomePage.ets index 26ed704..0a6d330 100644 --- a/entry/src/main/ets/pages/home/FbHomePage.ets +++ b/entry/src/main/ets/pages/home/FbHomePage.ets @@ -1464,11 +1464,12 @@ export struct FbHomePage { // ⚠️ 空态文案也换掉:首页没有"右下角 +"那个按钮。 FbSectionTitle({ title: '今天的日程', + accent: this.calAccent(), extra: this.todayEvents.length.toString() + ' 条', /* 🔴 v84(用户 2026-10-23):「日程,没有新建日程按钮」。 ⚠️ 别再删掉这颗按钮 —— 它是本条的**唯一可见证据**, 删了用户立刻又说"没有按钮"(上一轮就漏在端上)。 */ - addText: '+ 新建', + addText: '新建', onAdd: (): void => { this.openCalCreate(); } @@ -1503,10 +1504,11 @@ export struct FbHomePage { Column({ space: 0 }) { FbSectionTitle({ title: '近期任务', + accent: this.taskAccent(), extra: this.taskExtra(), /* 🔴 v86(用户「端上也全部都实现」):与 Web 端 v78 对齐,卡片上直接新建。 ⚠️ 别再删掉这颗按钮 —— 与日程那颗同理,它是本条需求的**唯一可见证据**。 */ - addText: '+ 新建', + addText: '新建', onAdd: (): void => { this.openTaskCreate(); } @@ -1555,6 +1557,7 @@ export struct FbHomePage { Column({ space: 0 }) { FbSectionTitle({ title: '最近纪念日', + accent: this.daysAccent(), extra: this.recentDays.length > 0 ? this.recentDays.length.toString() + ' 个' : '', @@ -1562,7 +1565,7 @@ export struct FbHomePage { 「如果是纪念日,就有一个『新增纪念日』」。 ⚠️ 空态文案原来写「在『纪念日』里添一个」,现在卡片上就能添, 文案改成指这颗按钮(否则用户会以为必须进模块)。 */ - addText: '+ 新建', + addText: '新建', onAdd: (): void => { this.openDayCreate(); } @@ -1573,7 +1576,7 @@ export struct FbHomePage { Text('还没有要过的日子') .fontSize(FbMetric.fontSmall) .fontColor(FbColors.ink) - Text('点右上角「+ 新建」添一个,或者给家人的资料里填上生日。') + Text('点右上角「新建」添一个,或者给家人的资料里填上生日。') .fontSize(FbMetric.fontTiny) .fontColor(FbColors.muted) } @@ -1611,12 +1614,13 @@ export struct FbHomePage { Column({ space: 0 }) { FbSectionTitle({ title: '最近观影', + accent: this.moviesAccent(), extra: this.mvRecent.length > 0 ? this.mvRecent.length.toString() + ' 部' : '', /* 文案照用户原话用「新增电影」—— 与 Web 端 `HomeCards` 的 `add` 一字不差。 ⚠️ 表单标题仍是模块里的「记一场」,不为了统一去改模块自己的措辞。 */ - addText: '+ 新增', + addText: '新增', onAdd: (): void => { this.openMovieCreate(); } @@ -1627,7 +1631,7 @@ export struct FbHomePage { Text(this.mvLoading ? '正在读观影记录…' : '还没有观影记录') .fontSize(FbMetric.fontSmall) .fontColor(FbColors.ink) - Text('点右上角「+ 新增」记一场,看过的片子都会留在这里。') + Text('点右上角「新增」记一场,看过的片子都会留在这里。') .fontSize(FbMetric.fontTiny) .fontColor(FbColors.muted) } @@ -1659,8 +1663,9 @@ export struct FbHomePage { Column({ space: 0 }) { FbSectionTitle({ title: '联系人', + accent: this.peopleAccent(), extra: this.pfTotal > 0 ? this.pfTotal.toString() + ' 人' : '', - addText: '+ 新增', + addText: '新增', onAdd: (): void => { this.openPersonCreate(); } @@ -1671,7 +1676,7 @@ export struct FbHomePage { Text(this.pfLoading ? '正在读名册…' : '名册里还没有人') .fontSize(FbMetric.fontSmall) .fontColor(FbColors.ink) - Text('点右上角「+ 新增」把家人加进来。') + Text('点右上角「新增」把家人加进来。') .fontSize(FbMetric.fontTiny) .fontColor(FbColors.muted) }