提交 f6e3d819 编写于 作者: 杜庆泉's avatar 杜庆泉

swiper add rebound case

上级 96161484
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<page-head title="swiper,可滑动视图"></page-head> <page-head title="swiper,可滑动视图"></page-head>
<view class="uni-margin-wrap"> <view class="uni-margin-wrap">
<swiper class="swiper" :vertical="verticalSelect" :indicator-dots="dotsSelect" :autoplay="autoplaySelect" <swiper class="swiper" :vertical="verticalSelect" :indicator-dots="dotsSelect" :autoplay="autoplaySelect"
:rebound="reboundSelect"
:interval="intervalSelect" :circular="circularSelect" :indicator-color="indicatorColor" :interval="intervalSelect" :circular="circularSelect" :indicator-color="indicatorColor"
:indicator-active-color="indicatorColorActive" :disable-touch="disableTouchSelect" :current="currentVal" :indicator-active-color="indicatorColorActive" :disable-touch="disableTouchSelect" :current="currentVal"
:current-item-id="currentItemIdVal" @change="swiperChange" @transition="swiperTransition" :current-item-id="currentItemIdVal" @change="swiperChange" @transition="swiperTransition"
...@@ -34,6 +35,10 @@ ...@@ -34,6 +35,10 @@
<view class="uni-list-cell-db">是否循环</view> <view class="uni-list-cell-db">是否循环</view>
<switch :checked="circularSelect" @change="circularChange" /> <switch :checked="circularSelect" @change="circularChange" />
</view> </view>
<view class="uni-list-cell uni-list-cell-pd">
<view class="uni-list-cell-db">是否显示rebound效果</view>
<switch :checked="reboundSelect" @change="reboundSelectChange" />
</view>
<view class="uni-title">间隔时间(毫秒)</view> <view class="uni-title">间隔时间(毫秒)</view>
<view> <view>
<slider @change="sliderChange" :value="1000" :min="500" :max="5000" :show-value="true" /> <slider @change="sliderChange" :value="1000" :min="500" :max="5000" :show-value="true" />
...@@ -83,6 +88,7 @@ ...@@ -83,6 +88,7 @@
background: ['color1', 'color2', 'color3'], background: ['color1', 'color2', 'color3'],
interval: 2000, interval: 2000,
dotsSelect: false, dotsSelect: false,
reboundSelect:false,
autoplaySelect: false, autoplaySelect: false,
circularSelect: false, circularSelect: false,
indicatorColorSelect: false, indicatorColorSelect: false,
...@@ -163,6 +169,10 @@ ...@@ -163,6 +169,10 @@
this.circularSelect = e.detail.value this.circularSelect = e.detail.value
console.log(this.circularSelect) console.log(this.circularSelect)
}, },
reboundSelectChange: function (e : SwitchChangeEvent) {
this.reboundSelect = e.detail.value
console.log(this.reboundSelect)
},
sliderChange(e : SliderChangeEvent) { sliderChange(e : SliderChangeEvent) {
this.intervalSelect = e.detail.value this.intervalSelect = e.detail.value
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册