This commit is contained in:
张成
2025-11-14 22:21:54 +08:00
parent d6349d14e8
commit 6b560da897
9 changed files with 81 additions and 29 deletions

View File

@@ -28,8 +28,8 @@ const GeneralNavbar: React.FC<GeneralNavbarProps> = ({
onBack,
className = ''
}) => {
const { statusNavbarHeightInfo } = useGlobalState()
const { statusBarHeight, navBarHeight } = statusNavbarHeightInfo
const { statusNavbarHeightInfo } = useGlobalState() || {}
const { statusBarHeight = 0, navBarHeight = 44, totalHeight = 98 } = statusNavbarHeightInfo || {}
const handleBack = () => {
if (onBack) {
@@ -80,12 +80,12 @@ const GeneralNavbar: React.FC<GeneralNavbarProps> = ({
<View
className={`${styles.customNavbar} ${className}`}
style={{
height: `${navBarHeight}px`,
height: `${totalHeight}px`,
paddingTop: `${statusBarHeight}px`,
backgroundColor
backgroundColor: backgroundColor || '#FAFAFA'
}}
>
<View className={styles.navbarContent}>
<View className={styles.navbarContent} style={{ height: `${navBarHeight}px` }}>
<View className={styles.leftSection}>
{renderLeftContent()}
</View>