修炼中的小白
修炼中的小白
  • 发布:2025-04-01 16:08
  • 更新:2025-04-01 16:14
  • 阅读:77

iPhone 12 ;IOS: 16.7.2;问题:在我没配置需要tabBar的页面,也出现了部分tabBar

分类:uni-app

pages.json 的配置

{  
    "pages": [  
        {  
            "path": "pages/login/index",  
            "style": {  
                "navigationStyle": "custom",  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/homePage/index",  
            "style": {  
                "navigationStyle": "custom",  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
        {  
            "path": "pages/chatPage/index",  
            "style": {  
                "navigationStyle": "custom",  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/myPage/index",  
            "style": {  
                "navigationStyle": "custom",  
                "enablePullDownRefresh": false  
            }  
        }  
    ],  
    "tabBar": {  
        "color": "#9B9B9B",  
        "selectedColor": "#3373B9",  
        "borderStyle": "#FFE7D9",  
        "backgroundColor": "#FFE7D9",  
        "list": [  
            {  
                "pagePath": "pages/homePage/index",  
                "iconPath": "/static/shouye.png",  
                "selectedIconPath": "/static/shouye-xuanzhong.png",  
                "text": "首页"  
            },  
            {  
                "pagePath": "pages/chatPage/index",  
                "iconPath": "/static/duihua.png",  
                "selectedIconPath": "/static/duihua-xuanzhong.png",  
                "text": "对话"  
            },  
            {  
                "pagePath": "pages/myPage/index",  
                "iconPath": "/static/wode.png",  
                "selectedIconPath": "/static/wode-xuanzhong.png",  
                "text": "我的"  
            }  
        ]  
    },  
    "uniIdRouter": {}  
}

但是在 pages/login/index,也出现了tabBar的颜色

2025-04-01 16:08 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

hello , 这样通常是你在某个地方设置了全局的页面样式,你可以检查一下你的代码,如果还不行,可以提供一下一个可以复现的项目我看一下

  • 修炼中的小白 (作者)

    感谢大佬,我提供一个demo

    2025-04-01 16:33

  • 修炼中的小白 (作者)

    检查了一遍,目前没有设置这方面的全局样式

    2025-04-01 16:38

  • 恭喜n发财

    回复 修炼中的小白: 不知道你是不是必须登录页面在第一个,建议第一个放tabbar页面

    2025-04-01 17:10

  • 修炼中的小白 (作者)

    回复 恭喜n发财: 目前的业务场景需要首先进登录页(pages/login/index),等用户登录了,然后在进入带有tabBar的主页(pages/homePage/index)

    2025-04-01 17:18

  • 恭喜n发财

    回复 修炼中的小白: 试试

    "app-plus": {

    "safearea": {

    "bottom": "none",

    }, manifest

    2025-04-01 17:33

  • 恭喜n发财

    我怎么发现不加 "app-plus": {


    "safearea": {


    "bottom": "none",


    }, manifest 好像有底部安全距离的手机都有tabber的背景,为什么默认不是none

    2025-04-01 17:46

  • 修炼中的小白 (作者)

    回复 恭喜n发财: 你加了这个之后可以了吗,我加了看着好像还是不行

    2025-04-01 18:01

  • 恭喜n发财

    回复 修炼中的小白: 1、这个配置仅适配ios,我设置了tabbarff0000红色,加了这个后没了,2、安卓我看了我自己手机微信朋友圈的底部安全区域都有白色条条。3、修改了manifest文件需要重新编译,实在不行卸载重新编译安装


    如果有问题上传一个demo来看吧

    2025-04-01 18:30

  • 修炼中的小白 (作者)

    回复 恭喜n发财: 我IOS重新打包之后,可以了,感谢大佬

    2025-04-01 19:28

要回复问题请先登录注册