用Taro开发微信小程序,想配置底部tabBar,我的配置如下,但是不生效
app.config.js 配置,
export default defineAppConfig({
pages: [
"pages/bar/bar1",
"pages/bar/bar2",
],
window: {
backgroundTextStyle: "light",
navigationBarBackgroundColor: "#fff",
navigationBarTitleText: "WeChat",
navigationBarTextStyle: "black",
},
tabBar: {
custom: true,
color: '#000000',
selectedColor: '#000000',
backgroundColor: '#000000',
list: [
{
pagePath: "pages/bar/bar1",
text: "测试bar-one",
},
{
pagePath: "pages/bar/bar2",
text: "测试bar-two",
},
],
},
"usingComponents": {}
});
tabBar
的话需要在src
目录下添加custom-tab-bar
组件custom
设置为false