手机预览的时候导航栏消失
发布于 6 年前 作者 yan35 4535 次浏览 来自 问答

开发者工具中的模拟器导航栏正常显示,到了手机预览是却消失了。

这是app.json里的

{

"pages":[

"pages/homePage/homePage",

"pages/index/index",

"pages/shoping/shoping",

"pages/my/my",

"pages/index/details/details"

],

"window":{

"navigationBarBackgroundColor": "black",

"navigationBarTextStyle":"white"

},

"tabBar": {

"borderStyle": "white",

"position": "bottom",

"list": [

{

"pagePath": "pages/homePage/homePage",

"text": "首页",

"iconPath": "images/tab/yuedu.png",

"selectedIconPath": "images/tab/yuedu_hl.png"

},

{

"pagePath": "pages/index/index",

"text": "商品",

"iconPath": "images/tab/yuedu.png",

"selectedIconPath": "images/tab/yuedu_hl.png"

},

{

"pagePath": "pages/shoping/shoping",

"text": "购物车",

"iconPath": "images/tab/yuedu.png",

"selectedIconPath": "images/tab/yuedu_hl.png"

},

{

"pagePath": "pages/my/my",

"text": "我的",

"iconPath": "images/tab/yuedu.png",

"selectedIconPath": "images/tab/yuedu_hl.png"

}

]

}

}


这是其他的单独页面的json文件里的

{

"navigationBarTitleText": "商品"

}

3 回复

你好,请提供一下导航栏相关的设置。如果有设置导航栏相关的代码,也请提供一下。

这是app.json里的

{

“pages”:[

“pages/homePage/homePage”,

“pages/index/index”,

“pages/shoping/shoping”,

“pages/my/my”,

“pages/index/details/details”

],

“window”:{

“navigationBarBackgroundColor”: “black”,

“navigationBarTextStyle”:“white”

},

“tabBar”: {

“borderStyle”: “white”,

“position”: “bottom”,

“list”: [

{

“pagePath”: “pages/homePage/homePage”,

“text”: “首页”,

“iconPath”: “images/tab/yuedu.png”,

“selectedIconPath”: “images/tab/yuedu_hl.png”

},

{

“pagePath”: “pages/index/index”,

“text”: “商品”,

“iconPath”: “images/tab/yuedu.png”,

“selectedIconPath”: “images/tab/yuedu_hl.png”

},

{

“pagePath”: “pages/shoping/shoping”,

“text”: “购物车”,

“iconPath”: “images/tab/yuedu.png”,

“selectedIconPath”: “images/tab/yuedu_hl.png”

},

{

“pagePath”: “pages/my/my”,

“text”: “我的”,

“iconPath”: “images/tab/yuedu.png”,

“selectedIconPath”: “images/tab/yuedu_hl.png”

}

]

}

}

这是其他的单独页面的json文件里的

{

“navigationBarTitleText”: “商品”

}

回到顶部