
如需要看下一篇文章-- 微信小程序 自定义底部导航闪烁解决 正在加急完成预计明天
⚠️ "tabBar"重点,自定义tabbar也需要写,但是在app.js中隐藏默认的tabbar
⚠️ this.getSystemInfo() === 获取设备信息,因为iosX系统适配信誉
tabbar.wxml
tabbar.wxss
c.js
tabbar.json
自定义导航基启袭本可以,下面在页面中引入并滑旁段使用
footer.wxml, header.wxml, my.wxml
footer.json, header.json, my.json
footer.js, header.js, my.js
首页小程序导航栏TabBar设置
1、注意区分属性值大小写的区别哗禅春,比如selectedIconPath如果写成selectediconpath则图片不显示。
2、如果tabBar中设置"postion":"top"则icopath的图片都不再显示。
3、注意{}中如果列出几项,这除最后一项外每一项结尾加逗号,最后一项不用加。
"tabBar": {
"selectedColor": "#1296db",
"list": [{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "images/ico-home.png",
"selectedIconPath": "images/ico-home-d.png"
},{
"pagePath": "pages/setting/setting",
"text": "设置",
"iconPath": "images/ico-setting.png",
"selectedIconPath": "images/ico-setting-d.png"
},{
"pagePath": "pages/help/help",
"text": "帮助",
"乱耐iconPath": "images/ico-help.png",
"selectedIconPath": "images/ico-help-d.png"
}]
袭仿 }
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)