6

uniapp开发app,手机状态栏问题挡住问题,uni app 刘海屏适配

 2 years ago
source link: https://blog.p2hp.com/archives/8524
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

uniapp开发app,手机状态栏问题挡住问题,uni app 刘海屏适配

问题:在使用uniapp开发手机App时,因为HBuildX创建的应用默认是沉浸式样式,如果去除自带的导航栏之后,页面会直通手机顶部状态栏,解决办法如下:

方法1:使用uniapp官方文档提供的解决方案 https://uniapp.dcloud.io/collocation/pages?id=customnav

方法二:配置mainfest.json来关闭沉浸式。打开应用的manifest.json文件,打开源码视图,app-plus 下添加 statusbar >immersed节点并设置值为false

"app-plus" : {
    "statusbar": {  
        "immersed": false  
    },
}

方法二,测试成功!
标签: APP
« 4月    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
文章归档
日志总数:1891篇 评论总数:90条
分类总数:25个 标签总数:303个
友情链接:8个 网站运行:3739天
最后更新:2022年4月29日

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK