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

swiper add rebound case

上级 96161484
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<view> <view>
<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"
...@@ -33,7 +34,11 @@ ...@@ -33,7 +34,11 @@
<view class="uni-list-cell uni-list-cell-pd"> <view class="uni-list-cell uni-list-cell-pd">
<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" />
...@@ -82,7 +87,8 @@ ...@@ -82,7 +87,8 @@
return { return {
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,
...@@ -162,7 +168,11 @@ ...@@ -162,7 +168,11 @@
circularChange: function (e : SwitchChangeEvent) { circularChange: function (e : SwitchChangeEvent) {
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
}, },
...@@ -205,4 +215,4 @@ ...@@ -205,4 +215,4 @@
text-align: center; text-align: center;
line-height: 300rpx; line-height: 300rpx;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册