1 Star 0 Fork 0

Jason / wx-tabbar

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

tabbar

WeChat small program tabbar
1、在template.js按照对应的key配置对应数据,其中current表示是否 选择当前的tab,直接配置为0即可
2、在对应的js引用template文件夹中的templalte.js------>var template = require('../../template/template.js');
3、然后在onLoad生命周期中注册对应的tabbar-------> template.tabbar("tabBar", 0, this)//0表示第一个tabbar,1表示第二个tabbar如此类推
4、在对应的wxml中引入template.wxml------>
5、使用模板------------->

注意:第5点data属性中格式必定为该格式,原因如下:
1、与template.wxml中的绑定的tabBar对应
......
2、template.js中使用that.setData({ bindData });表明bindData作为key
3、index.js或其他页面js使用template.tabbar("tabBar", 0, this)来使用注册template,其中的"tabBar"对应bindData.tabBar中tabBar

Comments ( 0 )

Sign in for post a comment

About

自定义tabbar spread retract
JavaScript
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
JavaScript
1
https://gitee.com/lau686/wx-tabbar.git
git@gitee.com:lau686/wx-tabbar.git
lau686
wx-tabbar
wx-tabbar
master

Search