import React from 'react'; import { IcAdd, IcMoreVert, IcNavigation } from '../res/icons'; interface HeaderProps { locationName: string; currentIndex: number; // 当前页面索引:0=定位,1+=城市 cityCount: number; // 已添加的城市数量(不含定位) } export const Header: React.FC = ({ locationName, currentIndex, cityCount }) => { const isLocationPage = currentIndex === 0; return (
{/* Top Bar: Icons only */}
{/* Location Area */}
{locationName}
{/* 定位箭头:当前是定位页面时白色,否则暗色 */} {/* 城市圆点指示器 */}
{Array.from({ length: cityCount }).map((_, idx) => (
))}
); };