修复个人页问题

This commit is contained in:
张成
2025-11-08 14:28:06 +08:00
parent c6ca2269f9
commit 40ea0f2eed
5 changed files with 65 additions and 53 deletions

View File

@@ -5,5 +5,5 @@
overflow: hidden;
z-index: 9991;
width: 100%;
background-color: #fff;
// 背景颜色通过 style 动态设置,默认透明
}

View File

@@ -4,17 +4,22 @@ import { useGlobalState } from "@/store/global";
interface IProps {
children: any;
backgroundColor?: string; // 背景颜色,不设置则透明
}
const CustomNavbar = (props: IProps) => {
const { children } = props;
const { children, backgroundColor } = props;
const { statusNavbarHeightInfo } = useGlobalState();
const { statusBarHeight, navBarHeight } = statusNavbarHeightInfo;
return (
<View
className={styles.customerNavbar}
style={{ height: `${navBarHeight}px`, paddingTop: `${statusBarHeight}px`, }}
style={{
height: `${navBarHeight}px`,
paddingTop: `${statusBarHeight}px`,
backgroundColor: backgroundColor || 'transparent'
}}
>
{children}
</View>