005 - 微信小程序 仿美团分类菜单 swiper分类菜单
来源:互联网 发布:充值猫币软件下载 编辑:程序博客网 时间:2024/06/15 13:32
有同学要仿美团分类菜单.写了一个.
跟 微信小程序开发之选项卡(窗口顶部TabBar)页面切换很类似
代码:
js就这么一点
//index.js //获取应用实例 var app = getApp()Page({ data: { currentTab: 0, grids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], swiperList:[0, 1, 2, 3, 4] }, onLoad: function () { }, click: function (e) { console.log(e.currentTarget.dataset.id) console.log(e.currentTarget.dataset.index) wx.showToast({ title: '第' + e.currentTarget.dataset.id + '栏' + '第' + e.currentTarget.dataset.index + '个', icon: 'success', duration: 1500 }) }, /** * 滑动切换tab */ bindChange: function (e) { console.log(e.detail.current) this.setData({ currentTab: e.detail.current }); },})
demo下载地址
0 0
- 005 - 微信小程序 仿美团分类菜单 swiper分类菜单
- 微信小程序 仿美团分类菜单 swiper分类菜单
- 微信小程序 仿美团分类菜单 swiper分类菜单
- 微信小程序 仿美团分类菜单 swiper分类菜单
- 数组菜单分类
- ASP无限级分类菜单
- ASP二级分类联动菜单
- js三级分类菜单导航
- Android分类列表菜单实现
- 后管理分类导航菜单
- 美团商家分类菜单
- jQuery实现左侧分类菜单
- jQuery实现左侧分类菜单
- 多级分类菜单的实现
- ASP+Access+xml实现无限分类级联菜单(关联菜单)
- 无限分类树型菜单演示(asp)
- 无限级分类树型菜单
- 无限级分类树型菜单
- 简单的dns主从服务器搭建实验
- QFileInfo的简单用法
- JAVA之多态
- getResourceAsStream用法小结
- C语言实验——计算A+B(顺序结构)(sdut oj)
- 005 - 微信小程序 仿美团分类菜单 swiper分类菜单
- spark core 非实时计算滑动窗口
- 2016年总结
- 初识CSS
- java并发编程之CountDownLatch与CyclicBarrier
- MySQL基础知识学习
- 走进Reac
- 专注、耕耘、感谢--获评2016年CSDN博客之星!
- JAVA之接口