当前位置:网站首页>Tabbar settings
Tabbar settings
2022-07-03 06:03:00 【LAN Yan】
ask :tabbar What does it do ?
answer : Bottom navigation
ask : What are the components of
answer :
"pagePath": "pages/index/index" Page path
- "text": " home page " Page name
"iconPath":"/images/tabbar/home.png" When not selected , Pictures on display
"selectedIconPath":"/images/tabbar/home-active.png" Picture when selected
Pictured
1. The first problem is tabbar Set up
Document links 1 uni-app Official website
https://uniapp.dcloud.net.cn/collocation/pages.html#tabbar
Document links 2
uni.setTabBarItem(OBJECT) | uni-app Official website
https://uniapp.dcloud.io/api/ui/tabbar.html
2. Put what you need tabbar Put the picture of '“static” In the folder
3. Follow the example prompted by the document , Add our own tabbar( Because I have written Baidu applet here tabbar, After a look, the code is almost the same , So copy it directly )
chart 1
Code ( Among them xxx Replace with your own page folder name and page name )
"tabBar": {
"list": [{
"pagePath": "pages/index/index",
"text": " home page ",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home-active.png"
},
{
"pagePath": "pages/xxx/xxx",
"text": "xxx",
"iconPath": "static/images/tabbar/counrty.png",
"selectedIconPath": "static/images/tabbar/country-active.png"
},
{
"pagePath": "pages/xxx/xxx",
"text": "xxx",
"iconPath": "static/images/tabbar/news.png",
"selectedIconPath": "static/images/tabbar/news-active.png"
},
{
"pagePath": "pages/xxx/xxx",
"text": "xxx",
"iconPath": "static/images/tabbar/ask.png",
"selectedIconPath": "static//images/tabbar/ask-active.png"
},
{
"pagePath": "pages/xxx/xxx",
"text": "xxx",
"iconPath": "static/images/tabbar/me.png",
"selectedIconPath": "static//images/tabbar/me-active.png"
}
],
"backgroundColor": "#ffffff",
"borderStyle": "white",
"color": "#000",
"selectedColor": "#6495ED"
},
After doing this , Your project has a bottom navigation
Here's something else ,
- pages Configure the page path , A set of curly braces represents the configuration of a page
- path Is the path of the page in the project
- navigationBarTitleText It's the title of the page
边栏推荐
- Jedis source code analysis (II): jediscluster module source code analysis
- The programmer shell with a monthly salary of more than 10000 becomes a grammar skill for secondary school. Do you often use it!!!
- phpstudy设置项目可以由局域网的其他电脑可以访问
- [teacher Zhao Yuqiang] use the catalog database of Oracle
- Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)
- Understand one-way hash function
- Together, Shangshui Shuo series] day 9
- Today, many CTOs were killed because they didn't achieve business
- CKA certification notes - CKA certification experience post
- 88. 合并两个有序数组
猜你喜欢
Alibaba cloud OOS file upload
Es remote cluster configuration and cross cluster search
Kubernetes notes (10) kubernetes Monitoring & debugging
Multithreading and high concurrency (7) -- from reentrantlock to AQS source code (20000 words, one understanding AQS)
理解 期望(均值/估计值)和方差
[teacher Zhao Yuqiang] Cassandra foundation of NoSQL database
Qt读写Excel--QXlsx插入图表5
从小数据量 MySQL 迁移数据到 TiDB
Synthetic keyword and NBAC mechanism
Oauth2.0 - Introduction and use and explanation of authorization code mode
随机推荐
Ansible firewall firewalld setting
70 shell script interview questions and answers
Together, Shangshui Shuo series] day 9
Bio, NiO, AIO details
Oauth2.0 - using JWT to replace token and JWT content enhancement
What's the difference between using the Service Worker Cache API and regular browser cache?
[teacher Zhao Yuqiang] Alibaba cloud big data ACP certified Alibaba big data product system
Solve the problem of automatic disconnection of SecureCRT timeout connection
MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
[written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis
88. 合并两个有序数组
[minesweeping of two-dimensional array application] | [simple version] [detailed steps + code]
Analysis of the example of network subnet division in secondary vocational school
Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)
理解 期望(均值/估计值)和方差
[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence
Get a screenshot of a uiscrollview, including off screen parts
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
[Shangshui Shuo series together] day 10
Jetson AgX Orin platform porting ar0233 gw5200 max9295 camera driver