由于第一次开发微信小程序又是定制化开发,tabBar功能耗费了我一下午的时间,我会把我开发过程中遇到的问题列在下面,希望可以帮助到大家。[tabBar闪烁的问题]不显示tabBar问题(/qq_40793132/article/details/118709313)
第一情况,设置了csutom:true,该参数是启动自定义tarBar的意思,启动以后,就不会再去识别app.json里的tarBar配置
//解决办法:设置custom:false,就可以了"tabBar": {"custom": false,//关闭自定义tarBar}
第二种情况,tarBar属性中设置的pagePath地址,需要在pages参数中置顶默认首页显示。如下
`"pages": ["pages/index/index",//默认首页"pages/home/home"],"tabBar": {"list": [{"pagePath": "pages/index/index",//默认首页"iconPath": "images/icon_component.png","selectedIconPath": "images/icon_component_HL.png","text": "组件"},{"pagePath": "pages/home/home","iconPath": "images/icon_API.png","selectedIconPath": "images/icon_API_HL.png","text": "接口"}]},``
如果觉得《微信小程序tabBar不显示问题》对你有帮助,请点赞、收藏,并留下你的观点哦!