Mou*_*hir 11
如果状态栏隐藏,您可以使用它:
<DrawerContentScrollView
contentContainerStyle={{ paddingTop: 0 }}>
</DrawerContentScrollView>
Run Code Online (Sandbox Code Playgroud)
在 DrawerContentScrollView 中,@react-navigation/drawer 代码中添加了默认的 4 填充,因此要删除此值,只需在 contentContainerStyle 中传递 paddingTop 属性即可。
const insets = useSafeArea();
<DrawerContentScrollView
contentContainerStyle={{
paddingTop: insets.top,
}}
{...props}>
</DrawerContentScrollView>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4387 次 |
最近记录: |