uni-app 配置底部导航栏
uni-app About 586 words配置代码
在pages.json
中新增tabBar
节点,selectedColor
指定选中后的文字颜色,list
中指定各页面的pagePath
、iconPath
、text
。
{
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#6f2a6f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/home/home",
"iconPath": "/static/nav_home.png",
"text": "首页"
}, {
"pagePath": "pages/ls/index",
"iconPath": "/static/nav_profile.png",
"text": "我的"
}]
}
}
参考
Views: 46 · Posted: 2025-07-26
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓

Loading...