欧美日韩国产一区,亚洲一区视频,色综合久久久久,私密按摩师舌头伸进去了,99re6这里只有精品,夜夜性日日交xxx性hd

swiper滑塊視圖容器

本文編輯: Owen Owen瀏覽 8365 版權(quán)所有,嚴禁轉(zhuǎn)載

組件說明:

  • 滑塊視圖容器,用于展示圖片,可以通過用戶拖拽和設置自動切換屬性控制圖片的切換

組件用法:

wxml

<swiper indicator-dots="{{indicatorDots}}"
  autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
  <block wx:for="{{imgUrls}}">
    <swiper-item>
      <image src="{{item}}" class="slide-image" width="355" height="150"/>
    </swiper-item>
  </block>
</swiper>
<button bindtap="changeIndicatorDots"> indicator-dots </button>
<button bindtap="changeAutoplay"> autoplay </button>
<slider bindchange="intervalChange" show-value min="500" max="2000"/> interval
<slider bindchange="durationChange" show-value min="1000" max="10000"/> duration

js

page({
  data: {
    imgUrls: [
      'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
    ],
    indicatorDots: false,
    autoplay: false,
    interval: 5000,
    duration: 1000
  },
  changeIndicatorDots: function(e) {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },
  changeAutoplay: function(e) {
    this.setData({
      autoplay: !this.data.autoplay
    })
  },
  intervalChange: function(e) {
    this.setData({
      interval: e.detail.value
    })
  },
  durationChange: function(e) {
    this.setData({
      duration: e.detail.value
    })
  }
})

wxss

.swiper-item{
    display: block;
    height: 150px;
}

主要屬性:

  • 設置界面的內(nèi)容樣式,用于wxml
屬性 類型 默認值 描述
indicator-dots Boolean false 是否顯示面板指示點
autoplay Boolean false 是否自動切換
current Number 0 當前所在頁面的 index
interval Number 5000 自動切換時間間隔
duration Number 1000 滑動動畫時長
bindchange EventHandle current 改變時會觸發(fā) change 事件,event.detail = {current: current}

相關鏈接:

如有技術(shù)問題或?qū)Ρ疚挠蟹答仯埣尤隥Q群:
微信小程序?qū)崙?zhàn)5營: 微信小程序Club實戰(zhàn)5營