uniapp中使用微信小程序custom-tab-bar
今天把小程序项目中的 tabBar 改为使用自定义的tabbar
其实很简单,只要按照小程序开发文档中的步骤来做
1、配置信息
在 app.json 中的 tabBar 项指定 custom 字段,同时其余 tabBar 相关配置也补充完整。
所有 tab 页的 json 里需声明 usingComponents 项,也可以在 app.json 全局开启。
示例:
{
"tabBar": {
"custom": true,
"color": "#000000",
"selectedColor": "#000000",
"backgroundColor": "#000000",
"list": [{
"pagePath": "page/component/index",
"text": "组件"
},