mfsy
mfsy
  • 发布:2020-06-03 10:54
  • 更新:2020-06-03 10:54
  • 阅读:687

【报Bug】设置标题栏无效

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10 1909

HBuilderX类型: 正式

HBuilderX版本号: 2.7.9

手机系统: Android

手机系统版本号: Android 9.0

手机厂商: 华为

手机机型: 雷电模拟器&&华为PAR-AL00

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
onReady() {  
    let lan = this.$i18n.locale;  
    if (lan != 'en') {  
        uni.setNavigationBarTitle({  
            title: '测试'  
        });  
        uni.setTabBarItem({  
            index: 0,  
            text: this.$i18n.messages[lan].tabBar.home  
        });  
        uni.setTabBarItem({  
            index: 1,  
            text: this.$i18n.messages[lan].tabBar.category  
        });  
        uni.setTabBarItem({  
            index: 2,  
            text: this.$i18n.messages[lan].tabBar.meal  
        });  
        uni.setTabBarItem({  
            index: 3,  
            text: this.$i18n.messages[lan].tabBar.cart  
        });  
        uni.setTabBarItem({  
            index: 4,  
            text: this.$i18n.messages[lan].tabBar.my  
        });  
    }  
    this.getCategory();  
    this.getHotGoods();  
    this.getGoods();  
},

操作步骤:
onReady() {  
    let lan = this.$i18n.locale;  
    if (lan != 'en') {  
        uni.setNavigationBarTitle({  
            title: '测试'  
        });  
        uni.setTabBarItem({  
            index: 0,  
            text: this.$i18n.messages[lan].tabBar.home  
        });  
        uni.setTabBarItem({  
            index: 1,  
            text: this.$i18n.messages[lan].tabBar.category  
        });  
        uni.setTabBarItem({  
            index: 2,  
            text: this.$i18n.messages[lan].tabBar.meal  
        });  
        uni.setTabBarItem({  
            index: 3,  
            text: this.$i18n.messages[lan].tabBar.cart  
        });  
        uni.setTabBarItem({  
            index: 4,  
            text: this.$i18n.messages[lan].tabBar.my  
        });  
    }  
    this.getCategory();  
    this.getHotGoods();  
    this.getGoods();  
},

预期结果:

打印success日志setNavigationBarTitle:ok,导航条标题更新

实际结果:

打印success日志setNavigationBarTitle:ok,导航条标题不更新

bug描述:

tabBar页面设置标题无效

2020-06-03 10:54 负责人:无 分享
已邀请:

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