├── README.md ├── app.js ├── app.json ├── app.wxss ├── imgs ├── bland.png ├── bland_on.png ├── buy.png ├── buy_on.png ├── category.png ├── category_on.png ├── home.png ├── home_on.png ├── message.png ├── message_on.png ├── search.png ├── search1.png └── timg.gif ├── pages ├── index │ ├── index.js │ ├── index.wxml │ └── index.wxss └── news │ ├── news.js │ ├── news.json │ ├── news.wxml │ └── news.wxss ├── project.config.json ├── template ├── template.js ├── template.wxml └── template.wxss └── utils └── util.js /README.md: -------------------------------------------------------------------------------- 1 | # tabbar 2 | WeChat small program tabbar 3 | 1、在template.js按照对应的key配置对应数据,其中current表示是否 选择当前的tab,直接配置为0即可 4 | 2、在对应的js引用template文件夹中的templalte.js------>var template = require('../../template/template.js'); 5 | 3、然后在onLoad生命周期中注册对应的tabbar-------> template.tabbar("tabBar", 0, this)//0表示第一个tabbar,1表示第二个tabbar如此类推 6 | 4、在对应的wxml中引入template.wxml------> 7 | 5、使用模板------------->