在 app.json 里写下 如下代码
"tabBar": {
"selectedColor": "#1296db",
"list": [
{
"iconPath": "image/pj.png",
"pagePath": "pages/teachers/teacher",
"text": "评教",
"selectedIconPath": "image/pj.png"
},
{
"iconPath": "image/info.png",
"pagePath": "pages/myinfo/myinfo",
"text": "我的",
"selectedIconPath": "image/info.png"
}
]
}iconpath 是小图标的路径
pagepath 是跳转的页面
text 是写下的内容
selectediconpath 是点击是显示的图片的路径
selectedcolor 点击是 变色
本文介绍了如何在app.json中配置底部Tab栏,包括设置选中颜色、图标、页面路径及文字等内容。通过示例代码展示了两个Tab项的具体配置。
1987

被折叠的 条评论
为什么被折叠?



