Skip to content

Commit

Permalink
feat(swiper): fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zouhangwithsweet committed Oct 30, 2019
1 parent eb44593 commit 2275b3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/swiper/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ export default {
if (!towards) {
return
}
/* istanbul ignore next */
if (options && options.index !== undefined) {
this.index = options.index
} else if (towards === 'prev') {
Expand Down Expand Up @@ -501,7 +502,7 @@ export default {
setTimeout(() => {
const isFirstItem = this.isFirstItem && this.isLoop
const isLastItem = this.isLastItem && this.isLoop
/* istanbul ignore next */
this.transitionEndHandler = () => {
// Recover first and last page
if (isLastItem) {
Expand Down Expand Up @@ -707,6 +708,7 @@ export default {
if (!this.ready) {
return
}
/* istanbul ignore next */
this.$nextTick(() => {
this.$_clearTimer()
this.$_reInitItems()
Expand All @@ -720,6 +722,7 @@ export default {
if (!this.ready) {
return
}
/* istanbul ignore next */
this.$nextTick(() => {
this.$_clearTimer()
this.$_reInitItems()
Expand Down

0 comments on commit 2275b3b

Please sign in to comment.