微信小程序—自定义tabbar
官方文档
https://developers.weixin.qq.com/miniprogram/dev/framework/ability/custom-tabbar.html
1.配置信息
首先要先在app.json中的 “tabbar”中加入一项“custom”:ture,然后再新建一个custom-tab-bar文件夹,再在里面建立index的四个文件。
2.使用Vant Weapp就行优化tabbar
网址如下:
https://youzan.github.io/vant-weapp/#/tabbar
2.1第一步,全局注册
以下按van网页即可
注意点:
①onChange函数是放到methods中