Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在短时间连续调用goto会导致slide重合 #81

Open
Andrewuetyang opened this issue Aug 8, 2018 · 1 comment
Open

在短时间连续调用goto会导致slide重合 #81

Andrewuetyang opened this issue Aug 8, 2018 · 1 comment

Comments

@Andrewuetyang
Copy link

No description provided.

@zhushuanglong
Copy link

two modify of swipe.vue

// line 305
if (prevPage && options.goTowards === 'prev') {
  this.translate(currentPage, pageWidth, speed, callback);
  this.translate(prevPage, 0, speed);
} else if (nextPage && options.goTowards === 'next') {
  this.translate(currentPage, -pageWidth, speed, callback);
  this.translate(nextPage, 0, speed);
}
// line 344
if (newIndex < this.index) {
  this.doAnimate('goto', {
    newIndex,
    prevPage: this.pages[newIndex],
    goTowards: 'prev' // towards prev
  });
} else {
  this.doAnimate('goto', {
    newIndex,
    nextPage: this.pages[newIndex],
    goTowards: 'next' // towards next
  });
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants