- ElectricView 改为受控组件接收 sub prop(与 HydrogenView 对齐) - EnergyModule sticky 头部统一显示 sub-tabs:氢能、电能都给 每日 / 总览 ETC 仍不显示子 tab(建设中页) - 共享 sub state 抽 helper:activeTab 切换时自动用对应的 sub - 龙王路停车场充电站信息条移入 ElectricOverview 顶部(同氢能"数据自...") 进入电能默认显示「每日」(与氢能一致),切换「总览」看 KPI + 柱图 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
c3b463d9ca
commit
fe70ec389b
@@ -1,14 +1,12 @@
|
||||
import ElectricOverview from './ElectricOverview';
|
||||
import ElectricDaily from './ElectricDaily';
|
||||
|
||||
export default function ElectricView() {
|
||||
return (
|
||||
<>
|
||||
<div className="bg-white rounded-xl border border-slate-100 px-3 py-1.5 text-[11px] text-slate-400">
|
||||
龙王路停车场充电站,期初 2025-01-01,手工导入每日更新
|
||||
</div>
|
||||
<ElectricOverview />
|
||||
<ElectricDaily />
|
||||
</>
|
||||
);
|
||||
export type ElectricSubTab = 'daily' | 'overview';
|
||||
|
||||
interface Props {
|
||||
sub: ElectricSubTab;
|
||||
}
|
||||
|
||||
export default function ElectricView({ sub }: Props) {
|
||||
return sub === 'overview' ? <ElectricOverview /> : <ElectricDaily />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user