紫川丶
紫川丶
  • 发布:2020-04-26 10:05
  • 更新:2020-04-26 14:16
  • 阅读:1353

【报Bug】2.6.16版本"navigationStyle":"custom"不生效,标题栏不会隐藏,测试demo已上传

分类:uni-app
{  
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages  
        {  
            "path" : "pages/index/signIn",  
            "style" : {  
                "navigationStyle":"custom"  
            }  
        }  
    ],  
    "globalStyle": {  
        "navigationBarTextStyle": "black",  
        "navigationBarTitleText": "标题",  
        "navigationBarBackgroundColor": "#FFFFFF",  
        "backgroundColor": "#F4F4F4",  
        "backgroundColorTop":"#F4F4F4",  
        "backgroundColorBottom":"#F4F4F4",  
        "app-plus":{  
            "titleNView":{  
                "titleSize":"17"  
            },  
            "scrollIndicator":"none",  
            "softinputNavBar":"none"  
        }  
    }  
}  
<template>  
    <view>  
        <view class="cutdown">  
            {{num||0}}s  
        </view>  
    </view>  
</template>  

<script>  
    export default {  
        data() {  
            return {  
                num:'', // 倒计时  
            };  
        },  
        methods:{  

        },  
    }  
</script>  

<style lang="less">  
    page{  
        background-color: #d2eaff;  
    }  
    .cutdown{  
        position: fixed;  
        top: calc(var(--status-bar-height) + 30rpx);  
        right: 30rpx;  
        width:96rpx;  
        height:48rpx;  
        background:rgba(44,163,252,.2);;  
        border-radius:8rpx;  
        color: #0091FF;  
        font-size:28rpx;  
        line-height: 48rpx;  
        text-align: center;  
    }  
</style>  

顶部白色标题栏未隐藏
ios 安卓 都有这个问题。测试环境安卓9 ios13.4.5 ios机型iphone xs 安卓机型sanxnote7 fe

2020-04-26 10:05 负责人:无 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

不是Bug,是你的配置生效了
titleNView 也是配置你说的“标题栏”,配置 titleNView 为对象启用,配置为 false 是关闭。

  • 紫川丶 (作者)

    那就是新旧版本存在差异,我2.6.15 非v3模式,"navigationStyle":"custom" 生效,切换到2.6.16不管什么模式都不生效

    2020-04-26 17:18

  • DCloud_UNI_GSQ

    回复 紫川丶: 你之前也配置了titleNView吗?titleNView 就是启用原生导航栏

    2020-04-26 17:37

  • 紫川丶 (作者)

    回复 DCloud_UNI_GSQ: 之前也配置的有 所有代码没有动过

    2020-04-27 09:14

  • yyk_2012

    回复 紫川丶: 配置 titleNView 为空,titleNView="" 就行了

    2020-05-22 10:34

该问题目前已经被锁定, 无法添加新回复