账户登录
蒲公英账户可直接登录
还没有账号?免费注册
忘记密码 ?
注册账号
注册的账号通用蒲公英旗下的所有产品
已有账号,直接登录
发布
发布小程序
发布组件
小程序tabBar组件
上传者:李泽辰 上传时间:2018-09-28 15:52:10
125 0
导航菜单
下载 喜欢
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 博客链接:https://blog.csdn.net/qq_29729735/article/details/78933721
发布小程序组件
查看小程序
小程序组件
窝推荐
小程序统计工具
电话:400 866 0210 (工作日 9:00 ~ 18:00)
QQ群:385046190
客服:service@pgyer.com
商务:bd@pgyer.com
版权所有 © 西安点测网络科技有限公司 2014 - 2017 陕ICP备15010407号-4
小程序tabBar组件
上传者:李泽辰 上传时间:2018-09-28 15:52:10
125 0
导航菜单
下载 喜欢
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
博客链接:https://blog.csdn.net/qq_29729735/article/details/78933721