小程序 tab和swiper的结合效果
来源:互联网 发布:mac画图板 编辑:程序博客网 时间:2024/05/23 15:07
项目中遇到一个tab效果,并且能左右滑动的效果.总结一下:
html:
<view class="tab" style="height:{{heigh}}px"> <view class="tabTitle"> <scroll-view> <view id="0" class="{{activeIndex == 0 ?'titleActive':''}} titleItem" bindtap="tabClick" > 我的任务 <view class="arrow" wx:if="{{showArrow}}"></view> </view> <view id="1" class="{{activeIndex == 1 ?'titleActive':''}} titleItem" bindtap="tabClick"> 我的智库 <view class="arrow" wx:if="{{!showArrow}}"></view> </view> </scroll-view> </view> <view class="tabBody" > <view class="tabBodyWrap" > <swiper current="{{activeIndex}}" duration="500" bindchange="swiperChange" "> <swiper-item> 任务项目 </swiper-item> <swiper-item> 智库项目 </swiper-item> </swiper> </view> </view> </view>
js:
tabClick:function(e){ var that = this; var idIndex = e.currentTarget.id; this.setData({ activeIndex:idIndex, }); }, swiperChange:function(e){ var current = e.detail.current; this.setData({ activeIndex:current, }); },
阅读全文
0 0
- 小程序 tab和swiper的结合效果
- 小程序写tab和swiper切换结合效果
- 微信小程序实现tab和swiper切换结合效果viewpage+tab效果
- 微信小程序之swiper制作tab切换效果
- 小程序的swiper不显示图片
- android Tab和ViewPager结合的例子
- h5用swiper结合angularjs实现手机浏览器左右滑动切换图片的效果
- 程序中,调用Bison和Flex结合的小例子
- tab切换swiper不生效的解决
- 使用angular和swiper做的一个滑动小插件
- 论#POST异步加载的tab切换内容 swiper切换不起效果以及底部pagination 失效的解决办法#
- 论#POST异步加载的tab切换内容 swiper切换不起效果以及底部pagination 失效的解决办法#
- 小程序-swiper-item点击事件
- swiper组件构建小程序轮播图
- 小程序幻灯片组件swiper使用。
- js tab小程序
- 小程序-tab切换
- 结合多线程、Socket的聊天小程序
- ISCSI
- 小学生开始学Python,还有什么能够阻挡我对Python的向往?
- 17-CSS3 高级技巧 精灵图 滑动门
- Android APK反编译就这么简单 详解(附图)
- postgresql意外中止,无法启动
- 小程序 tab和swiper的结合效果
- 17-CSS3 高级技巧 精灵图 滑动门
- Java中HashMap
- FormValidation程序源码
- 线程与进程概述
- mysql、oracle删除重复数据
- 选择排序
- systemctl 精华篇
- HtmlAgilityPack 解析HTML利器