kkfluous
5958bb581e
Revert "fix(energy): 日期速选并入 sticky 头部,避免滚动时被遮挡"
...
This reverts commit 4153f329b8 .
2026-04-30 15:37:17 +08:00
kkfluous
4153f329b8
fix(energy): 日期速选并入 sticky 头部,避免滚动时被遮挡
...
ci/woodpecker/push/woodpecker Pipeline was successful
之前「本周/本月/近 15 天」放在 HydrogenDaily/ElectricDaily 的
内容区第一行,sticky 头部独占顶部。滚动后这一行会从 sticky
头部下方钻过去,露出半截,看起来像被切。
修复:把日期速选行也放进 sticky 头部白卡里:
- EnergyModule 持有 hydroPick / electricPick state
- 头部第三行(border-t 分割)渲染速选按钮,仅 daily 模式显示
- HydrogenView/ElectricView/ElectricDaily/HydrogenDaily 改为
通过 pick prop 接收,组件内不再 useState
现在头部「Top Tab + Sub Tab + 日期速选」是同一张白卡,
滚动时整体一起 sticky,不再有半截遮挡。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-30 15:34:41 +08:00
kkfluous
d24ce55a59
fix(energy): 顶部双 sticky 间隙泄露 + 加氢站名单价完整显示
...
ci/woodpecker/push/woodpecker Pipeline was successful
问题 1:原本「氢能/电能/ETC」与「每日/总览」是两个独立的 sticky
元素,分别 top:0 / top:[58px],中间 gap-3 +位置不精确导致滚动时
图表内容从 14px 缝隙里穿过。
修复:
- 把 HydrogenView 内部的 sub-tab 状态提到 EnergyModule
- top tab + 子 tab 合并到「同一张白色 rounded-2xl 卡片」里,无内部间隙
- 外层 sticky 容器 frosted glass:bg-[#F8F9FB]/85 + backdrop-blur-md
-mx -mt 扩到页面边,消除左右上的微缝
- HydrogenView 改为受控组件(接收 sub prop)
问题 2:站点行 mobile 上 name + ' · 价格' 共用一格还 truncate,
导致长名称(广州新锋交通联新…/上海浦江加氢站…)截断、单价不可见。
修复:
- 行改为「站名换行 + 下方单价 chip」纵向排列
- 单价用 amber 小徽章「单价 X 元/Kg」,不再 inline 跟着名字
- name 用 break-words 允许折行,items-start 顶部对齐
- 单价为 0(免费/赠送)时不显示徽章,desktop 列里显示「—」
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-30 15:08:22 +08:00
kkfluous
7de2d1ecd5
refactor(energy): split electric view into 总览/每日 sub-tabs
...
- Symmetry with hydrogen — both sides now have a 每日/总览 sub-tab pair
- New ElectricOverview (KPI + bar chart) and ElectricDaily (table)
- Sub-tab styling: pill fill (active = blue-50/blue-600) instead of the
underline-style used by parent — clearer visual hierarchy
- Tab order swapped to 每日 → 总览 with 每日 as default (daily ops focus)
- Today KPI: pill moves to absolute top-right corner so today's kwh
reading regains full row width (was getting truncated to "510...")
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-28 12:39:05 +08:00
kkfluous
e6880cba17
feat(energy): hydrogen overview KPI cards (4-card grid)
...
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-28 11:20:32 +08:00
kkfluous
09b9862f1f
feat(energy): add module shell, register in nav
...
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-28 11:15:55 +08:00