uni-app 底部tabBar切换实现

uni-app 底部tabBar切换实现

工作中经常遇到需要首页tab页面的情况,类似于微信:实现逻辑也很简单

uni-app 底部tabBar切换实现_第1张图片

pages.json 增加:

"tabBar":

{"color":"#7A7E83","selectedColor":"#007AFF","borderStyle":"black","backgroundColor":"#F8F8F8",

"list": [        {"pagePath":"pages/index/index","iconPath":"static/tab_home.png","selectedIconPath":"static/tab_home_s.png","text":"主页"},        {"pagePath":"pages/index/indexme","iconPath":"static/tab_me.png","selectedIconPath":"static/tab_me_s.png","text":"我"}    ]}

uni-app 底部tabBar切换实现_第2张图片

喜欢可以加群号:913934649

更多详解:

简书: https://www.jianshu.com/u/88db5f15770d

csdn:https://me.csdn.net/beyondforme

掘金:https://juejin.im/user/5e09a9e86fb9a016271294a7

你可能感兴趣的:(uni-app)