import { View } from '@tarojs/components' import Taro from '@tarojs/taro' interface NavigationBarProps { title?: string showBack?: boolean showMore?: boolean onBack?: () => void onMore?: () => void } function NavigationBar({ title = '分销中心', showBack = true, showMore = true, onBack, onMore }: NavigationBarProps) { const handleBack = () => { if (onBack) { onBack() } else { Taro.navigateBack() } } const handleMore = () => { if (onMore) { onMore() } else { Taro.showActionSheet({ itemList: ['分享', '设置', '帮助'] }) } } return ( {/* 状态栏占位 */} {/* 导航栏 */} {/* 左侧返回按钮 */} {showBack && ( )} {/* 中间标题 */} {title} {/* 右侧更多按钮 */} {showMore && ( )} ) } export default NavigationBar