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

swiper add rebound case

上级 96161484
......@@ -5,7 +5,8 @@
<view>
<page-head title="swiper,可滑动视图"></page-head>
<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"
:indicator-active-color="indicatorColorActive" :disable-touch="disableTouchSelect" :current="currentVal"
:current-item-id="currentItemIdVal" @change="swiperChange" @transition="swiperTransition"
......@@ -33,7 +34,11 @@
<view class="uni-list-cell uni-list-cell-pd">
<view class="uni-list-cell-db">是否循环</view>
<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>
<slider @change="sliderChange" :value="1000" :min="500" :max="5000" :show-value="true" />
......@@ -82,7 +87,8 @@
return {
background: ['color1', 'color2', 'color3'],
interval: 2000,
dotsSelect: false,
dotsSelect: false,
reboundSelect:false,
autoplaySelect: false,
circularSelect: false,
indicatorColorSelect: false,
......@@ -162,7 +168,11 @@
circularChange: function (e : SwitchChangeEvent) {
this.circularSelect = e.detail.value
console.log(this.circularSelect)
},
},
reboundSelectChange: function (e : SwitchChangeEvent) {
this.reboundSelect = e.detail.value
console.log(this.reboundSelect)
},
sliderChange(e : SliderChangeEvent) {
this.intervalSelect = e.detail.value
},
......@@ -205,4 +215,4 @@
text-align: center;
line-height: 300rpx;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册