本篇文章為大家展示了在小程序開發(fā)中如何實現一個tab標簽頁,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
具體內容如下
頁面效果:
HTML:
<view wx:if="{{userType==0}}" > <view class="tab_box" > <view class="tabs_v"> <block wx:for="{{tabs}}" wx:for-item="item" wx:key="index"> <view class="tab_v {{index<1?'tab_nature':'tab_course'}}" bindtap='changeCurrentTab_' data-index='{{index}}' data-current='{{index}}'> <text class="tab_txt {{currentTab==index? 'tab_v_active' : ''}}">{{item.label}}</text> </view> </block> </view> </view> <!-- tab 容器 --> <view class="tabWrap"> <swiper class="" current="{{currentTab}}" duration="300" bindchange="swiperTab" > <!-- 頁面1 --> <block> <swiper-item > <view class="" > <scroll-view scroll-y="true" bindscrolltolower='scrollToLower' bindscrolltoupper='scrollToUpper' lower-threshold='30' upper-threshold='30'> <view > 頁面1 </view> </scroll-view> </view> </swiper-item> </block> <!-- 頁面2 --> <block> <swiper-item > <view class="" > <scroll-view scroll-y="true" bindscrolltolower='scrollToLower' bindscrolltoupper='scrollToUpper' lower-threshold='30' upper-threshold='30'> <view > 頁面2 </view> </scroll-view> </view> </swiper-item> </block> </swiper> </view> </view>
網站欄目:在小程序開發(fā)中如何實現一個tab標簽頁-創(chuàng)新互聯
文章起源:http://sd-ha.com/article12/shjgc.html
成都網站建設公司_創(chuàng)新互聯,為您提供App開發(fā)、Google、響應式網站、域名注冊、軟件開發(fā)、網站營銷
聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯