找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索本站精品资源

首页 教程频道 小程序开发 查看内容

微信小程序仿android fragment可滑动的底部导航栏

作者:模板之家 2017-12-2 17:04 2054人关注

底部3-5个选项的底部导航栏,目前在移动端上是主流布局之一因此腾讯官方特地做了,可以通过设置,就可以做出了一个底部的导航栏但是通过设置的这个底部的导航栏,功能上比较固

底部3-5个选项的底部导航栏,目前在移动端上是主流布局之一因此腾讯官方特地做了,可以通过设置,就可以做出了一个底部的导航栏但是通过设置的这个底部的导航栏,功能上比较固定 ...

 
 
 

底部3-5个选项的底部导航栏,目前在移动端上是主流布局之一 
因此腾讯官方特地做了,可以通过设置,就可以做出了一个底部的导航栏 
但是通过设置的这个底部的导航栏,功能上比较固定,它必须要设置与它对应的一个页面,而且并不能滑动。
在业务上,有时候会比较限制,并不能完全满足所需。

因此自定义就有这个必要性

下面介绍这个仿Android fragment可滑动的底部导航栏如何实现

下面介绍这个仿android fragment可滑动的底部导航栏如何实现

 

项目最终效果图:

 

wxml:

 

[html] view plain copy
 
  1. <swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 51}}px" bindchange="bindChange">  
  2.   
  3.   <!-- frag01 -->  
  4.   <swiper-item>  
  5.     <scroll-view class="hot-box" scroll-y="true" upper-threshold="50" lower-threshold="100" bindscrolltolower="scrolltolower">  
  6.   
  7.       <!-- 列表 -->  
  8.       <view class="themes-list">  
  9.         <view class="themes-list-box" wx:for="{{datalists}}">  
  10.           <view class="themes-list-main">  
  11.             <view class="themes-list-name">{{item}}</view>  
  12.           </view>  
  13.         </view>  
  14.       </view>  
  15.     </scroll-view>  
  16.   </swiper-item>  
  17.   
  18.   <!-- grag02 -->  
  19.   <swiper-item>  
  20.     <scroll-view class="hot-box" scroll-y="true" upper-threshold="50" lower-threshold="100" bindscrolltolower="scrolltolower">  
  21.   
  22.       <!-- 列表 -->  
  23.       <view class="themes-list">  
  24.         <view class="themes-list-box" wx:for="{{reslists}}">  
  25.           <view class="themes-list-main">  
  26.             <view class="themes-list-name">{{item}}</view>  
  27.           </view>  
  28.         </view>  
  29.       </view>  
  30.     </scroll-view>  
  31.   </swiper-item>  
  32.   
  33.   <!-- grag03 -->  
  34.   <swiper-item>  
  35.     <scroll-view class="hot-box" scroll-y="true" upper-threshold="50" lower-threshold="100" bindscrolltolower="scrolltolower">  
  36.   
  37.       <!-- 列表 -->  
  38.       <view class="themes-list">  
  39.         <view class="themes-list-box" wx:for="{{datalists}}">  
  40.           <view class="themes-list-main">  
  41.             <view class="themes-list-name">{{item}}</view>  
  42.           </view>  
  43.         </view 邀请

路过

雷人

握手

鲜花

鸡蛋
原作者: 模板之家 来自: 网络收集

全部回复(0)