当前位置:网站首页>Implementation of navigation bar at the bottom of applet
Implementation of navigation bar at the bottom of applet
2022-07-07 08:29:00 【I eat slowly】
1、 The navigation bar at the bottom of the applet is the thing at the bottom

2、 This needs to be app.json Set at “tabBar”
Examples are as follows :
{
"pages": [
"pages/index/index",
"pages/pages1/pages1",
"pages/pages2/pages2"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTitleText": " Applet name ",
"navigationBarTextStyle": "black",
"backgroundColor": "#EA0000"
},
"sitemapLocation": "sitemap.json",
"tabBar": {
"color": "#666666",
"selectedColor": "#f10b2e",
"list": [
{
"pagePath": "pages/pages1/pages1",
"text": " page 1",
"iconPath": "*****",// Icon when not selected
"selectedIconPath": "*****"// The selected icon
},
{
"pagePath": "pages/pages2/pages2",
"text": " page 2",
"iconPath": "*****",// Icon when not selected
"selectedIconPath": "*****"// The selected icon
}
]
}
}
3、 example :
"tabBar": {
"color": "#000000",
"selectedColor": "#FF6900",
"borderStyle": "black",
"list": [
// {
// "iconPath": "/static/tabbar/index.png",
// "selectedIconPath": "/static/tabbar/index.png",
// "pagePath": "pages/index/index",
// "text": " home page "
// },
{
"iconPath": "/static/tabbar/workbench.png",
"selectedIconPath": "/static/tabbar/work.png",
"pagePath": "pages/workbench/work",
"text": " The workbench "
},
// {
// "iconPath": "/static/tabbar/msg.png",
// "selectedIconPath": "/static/tabbar/msg.png",
// "pagePath": "pages/message/mes",
// "text": " news "
// },
{
"iconPath": "/static/tabbar/my.png",
"selectedIconPath": "/static/tabbar/my.png",
"pagePath": "pages/my/my",
"text": " my "
}
]
},
4、 It should be noted that :
Other pages should jump to tabBar page , Need to use wx.switchTab, Examples are as follows :
wx.switchTab({
url: '../pages1/pages1'
})
边栏推荐
- 接口作为参数(接口回调)
- Tuowei information uses the cloud native landing practice of rainbow
- Opencv learning note 3 - image smoothing / denoising
- Wang Zijian: is the NFT of Tencent magic core worth buying?
- Pytoch (VI) -- model tuning tricks
- Rainbond 5.6 版本发布,增加多种安装方式,优化拓扑图操作体验
- Analysis of maker education in innovative education system
- Ebpf cilium practice (1) - team based network isolation
- 柯基数据通过Rainbond完成云原生改造,实现离线持续交付客户
- 解读创客思维与数学课程的实际运用
猜你喜欢
随机推荐
In go language, function is a type
Easy to understand SSO
Open3D ISS关键点
雅思考试自己的复习进度以及方法使用【日更版】
Obsidan之数学公式的输入
Go语言中,函数是一种类型
Rainbow 5.7.1 supports docking with multiple public clouds and clusters for abnormal alarms
PLSQL的安装和配置
POJ - 3616 Milking Time(DP+LIS)
One click deployment of highly available emqx clusters in rainbow
IP guard helps energy enterprises improve terminal anti disclosure measures to protect the security of confidential information
IP-guard助力能源企业完善终端防泄密措施,保护机密资料安全
[quick start of Digital IC Verification] 12. Introduction to SystemVerilog testbench (svtb)
Grpc, oauth2, OpenSSL, two-way authentication, one-way authentication and other column directories
Analysis of maker education in innovative education system
发挥创客教育空间的广泛实用性
The use of generics and vararg variable parameters in kotlin
Thirteen forms of lambda in kotlin
[go ~ 0 to 1] obtain timestamp, time comparison, time format conversion, sleep and timer on the seventh day
Ebpf cilium practice (2) - underlying network observability








