Skip to content

Commit

Permalink
swiper: stop interval if auto is set to false #2027
Browse files Browse the repository at this point in the history
  • Loading branch information
airyland committed Oct 26, 2017
1 parent 32bd393 commit 3ba13bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/swiper/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ changes:
en:
- '[enhance] set shorter distance for first and last item for better experience'
- '[feature] add event:on-get-height #2112'
- '[enhance] stop interval if auto is set to false #2027'
zh-CN:
- '[enhance] 非循环模式下对第一张和最后一张使用更短的拖动距离'
- '[feature] 添加事件 event:on-get-height #2112'
- '[enhance] auto 支持动态设置 #2027'
v2.6.0:
en:
- '[enhance] support fallbackImg for prop:list #1923'
Expand Down
7 changes: 7 additions & 0 deletions src/components/swiper/swiper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ export default {
}
},
watch: {
auto (val) {
if (!val) {
this.swiper && this.swiper.stop()
} else {
this.swiper && this.swiper._auto()
}
},
list (val) {
this.rerender()
},
Expand Down

0 comments on commit 3ba13bb

Please sign in to comment.