This commit is contained in:
张成
2025-11-14 23:31:04 +08:00
parent 1226350099
commit 3c4897508a
6 changed files with 51 additions and 29 deletions

View File

@@ -28,7 +28,7 @@ const GeneralNavbar: React.FC<GeneralNavbarProps> = ({
titleClassName = '',
leftContent,
rightContent,
backgroundColor = '#fafafa', // 默认背景色改为 #fafafa
backgroundColor = 'transparent', // 默认背景色为透明
showBack = true,
showLeft = true,
showAvatar = false,
@@ -106,11 +106,16 @@ const GeneralNavbar: React.FC<GeneralNavbarProps> = ({
className={`${styles.customNavbar} ${className}`}
style={{
height: `${totalHeight}px`,
paddingTop: `${statusBarHeight}px`,
backgroundColor: backgroundColor || 'transparent'
}}
>
<View className={styles.navbarContent} style={{ height: `${navBarHeight}px` }}>
<View
className={styles.navbarContent}
style={{
height: `${navBarHeight}px`,
marginTop: `${statusBarHeight}px`
}}
>
<View className={styles.leftSection}>
{renderLeftContent()}
{titlePosition === 'left' && renderTitle()}