问题描述
在app.json
配置好tabBar
,发现页面毫无变化,甚至还报错了Component is not found in path "custom-tab-bar/index"
。配置是从微信小程序官网复制的,如下:
"tabBar": {
"custom": true,
"color": "#0000ff",
"selectedColor": "#00ff00",
"backgroundColor": "#0000ff",
"list": [{
"pagePath": "pages/index/index",
"text": "组件",
"iconPath": "/images/index.png",
"selectedIconPath": "/images/index_selected.png"
}, {
"pagePath": "pages/logs/logs",
"text": "接口"
}]
},
"usingComponents": {}
解决办法
把"custom": true
删除。
问题原理分析
"custom": true
表示的是自定义tabbar。