打开微信小程序官方文档https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html,往下翻,就可以看到tabBar的相关api和注意事项
image.png image.png1.找到app.json,输入tabba回车,他就把我们基本的配置的设置好了
image.png
2.添加具体tabBar代码
image.png
pagePath:指定的页面路由
text:文本内容
iconPath:图片路径
selectedIconpath: 选中时的图片路径
点击普通编译运行效果图效果图
image.png
网友评论