做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

微信小程序實現swiper切換卡內嵌滾動條不顯示的方法示例

來源:懂視網 責編:小采 時間:2020-11-27 22:02:32
文檔

微信小程序實現swiper切換卡內嵌滾動條不顯示的方法示例

微信小程序實現swiper切換卡內嵌滾動條不顯示的方法示例:本文實例講述了微信小程序實現swiper切換卡內嵌滾動條不顯示的方法。分享給大家供大家參考,具體如下: index.wxml文件: <view class=swiper-tab> <view class=swiper-tab-item {{currentTab==0 ? 'o
推薦度:
導讀微信小程序實現swiper切換卡內嵌滾動條不顯示的方法示例:本文實例講述了微信小程序實現swiper切換卡內嵌滾動條不顯示的方法。分享給大家供大家參考,具體如下: index.wxml文件: <view class=swiper-tab> <view class=swiper-tab-item {{currentTab==0 ? 'o

本文實例講述了微信小程序實現swiper切換卡內嵌滾動條不顯示的方法。分享給大家供大家參考,具體如下:

index.wxml文件:

<view class="swiper-tab">
 <view class="swiper-tab-item {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">為你推薦</view>
 <view class="swiper-tab-item {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">新品上架</view>
 <view class="swiper-tab-item {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">最熱商品</view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{clientHeight?clientHeight-'40'+'px':'auto'}}" bindchange="bindChange" >
 <swiper-item>
 <scroll-view scroll-y="{{true}}" style="height: {{clientHeight?clientHeight+'px':'auto'}}">
 <view style='height:200px'>為你推薦</view>
 <view style='height:200px'>為你推薦</view>
 <view style='height:200px'>為你推薦</view>
 <view style='height:200px'>為你推薦</view>
 <view style='height:200px'>為你推薦</view>
 </scroll-view>
 </swiper-item>
 <swiper-item>
 <view>新品上架</view>
 </swiper-item>
 <swiper-item>
 <view>最熱商品</view>
 </swiper-item>
</swiper>

index.wxss文件:

/**index.wxss**/
.userinfo {
 display: flex;
 flex-direction: column;
 align-items: center;
}
.userinfo-avatar {
 width: 128rpx;
 height: 128rpx;
 margin: 20rpx;
 border-radius: 50%;
}
.userinfo-nickname {
 color: #aaa;
}
.usermotto {
 margin-top: 200px;
}
.swiper-tab {
 width: 100%;
 text-align: center;
 line-height: 80rpx;
 margin-top:10rpx;
 margin-bottom: 20rpx;
}
.swiper-tab-item {
 font-size: 30rpx;
 display: inline-block;
 width: 33.33%;
 color: #666;
}
.on {
 color: #FEA611;
 border-bottom: 5rpx solid #FEA611;
}
.swiper-box {
 display: block;
 height: 100%;
 width: 100%;
 overflow: hidden;
}
.swiper-box view {
 text-align: center;
}

index.js文件:

//獲取應用實例
const app = getApp()
Page({
 data: {
 motto: 'Hello World',
 userInfo: {},
 hasUserInfo: false,
 canIUse: wx.canIUse('button.open-type.getUserInfo'),
 clientWidth: 0,
 clientHeight: 0,
 // tab切換
 currentTab: 0
 },
 //事件處理函數
 bindViewTap: function () {
 wx.navigateTo({
 url: '../logs/logs'
 })
 },
 onLoad: function () {
 var that = this;
 wx.getSystemInfo({
 success: function (res) {
 that.setData({
 clientHeight: res.windowHeight
 });
 }
 });
 if (app.globalData.userInfo) {
 this.setData({
 userInfo: app.globalData.userInfo,
 hasUserInfo: true
 })
 } else if (this.data.canIUse) {
 // 由于 getUserInfo 是網絡請求,可能會在 Page.onLoad 之后才返回
 // 所以此處加入 callback 以防止這種情況
 app.userInfoReadyCallback = res => {
 this.setData({
 userInfo: res.userInfo,
 hasUserInfo: true
 })
 }
 } else {
 // 在沒有 open-type=getUserInfo 版本的兼容處理
 wx.getUserInfo({
 success: res => {
 app.globalData.userInfo = res.userInfo
 this.setData({
 userInfo: res.userInfo,
 hasUserInfo: true
 })
 }
 })
 }
 },
 getUserInfo: function (e) {
 console.log(e)
 app.globalData.userInfo = e.detail.userInfo
 this.setData({
 userInfo: e.detail.userInfo,
 hasUserInfo: true
 })
 },
 bindChange: function (e) {
 var that = this;
 that.setData({ currentTab: e.detail.current });
 },
 swichNav: function (e) {
 var that = this;
 if (this.data.currentTab === e.target.dataset.current) {
 return false;
 } else {
 that.setData({
 currentTab: e.target.dataset.current
 })
 }
 }
})

希望本文所述對大家微信小程序開發有所幫助。

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

微信小程序實現swiper切換卡內嵌滾動條不顯示的方法示例

微信小程序實現swiper切換卡內嵌滾動條不顯示的方法示例:本文實例講述了微信小程序實現swiper切換卡內嵌滾動條不顯示的方法。分享給大家供大家參考,具體如下: index.wxml文件: <view class=swiper-tab> <view class=swiper-tab-item {{currentTab==0 ? 'o
推薦度:
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 连州市| 香河县| 福鼎市| 隆回县| 琼结县| 阜宁县| 临朐县| 来宾市| 奉节县| 淮阳县| 始兴县| 衡东县| 蓝山县| 原阳县| 禹城市| 德化县| 宁波市| 桐庐县| 手游| 历史| 临洮县| 体育| 都兰县| 壤塘县| 南阳市| 广灵县| 永泰县| 芮城县| 叶城县| 乐至县| 封丘县| 临泽县| 遵化市| 锡林郭勒盟| 南漳县| 通海县| 巫溪县| 尼勒克县| 绍兴县| 中卫市| 郧西县|