diff --git a/client/harmony/entry/src/main/ets/pages/MainPage.ets b/client/harmony/entry/src/main/ets/pages/MainPage.ets index 9e8b6e1..9acf807 100644 --- a/client/harmony/entry/src/main/ets/pages/MainPage.ets +++ b/client/harmony/entry/src/main/ets/pages/MainPage.ets @@ -2171,9 +2171,23 @@ struct ContactsTab { } .navDestination(this.DestinationBuilder) .mode(NavigationMode.Auto) - /* 会话列表栏宽度与通信页同一口径(320,范围 280–360) */ - .navBarWidth(320) - .navBarWidthRange([280, 360]) + /* + * ★★ 2026-09-20 修:联系人栏宽度**随视图模式变**(用户:「联系人页宽度」)。 + * + * WebUI `ContactPanel.tsx:59-62` 原文: + * // 卡片要放两行摘要 + 预算条,320px 会挤;列表视图保持紧凑 + * view === 'card' ? 'lg:w-[400px]' : 'lg:w-[320px]' + * + * 而鸿蒙原来**写死 320** —— 卡片视图与列表视图同宽。 + * 卡片视图比列表视图多一行(`mail_count 封 · 时间`)**再加一条预算胶囊** + * (见 `CardItem` 里 `budgetLabel(...)` 那一块),320 装不下, + * WebUI 早就为此单独放宽到 400,我们没跟上。 + * + * 范围上限也一起抬到 400(否则 `navBarWidth(400)` 会被 range 夹回 360 —— + * 那正是"改了宽度但没变"的典型症状,值被另一处静默覆盖)。 + */ + .navBarWidth(this.contactView === 'card' ? 400 : 320) + .navBarWidthRange([280, 400]) .minContentWidth(360) .hideTitleBar(true) .width('100%').height('100%')