Skip to content

Commit

Permalink
Merge pull request #45 from zhangbobell/master
Browse files Browse the repository at this point in the history
fix(api): make transition param optional
  • Loading branch information
zhangbobell authored Jan 10, 2019
2 parents fdb4834 + b932f24 commit c24eb42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fex-swiper",
"version": "1.0.4",
"version": "1.0.5",
"description": "a H5 swiper powered by FEX",
"main": "dist/swiper.umd.js",
"style": "dist/swiper.css",
Expand Down
6 changes: 3 additions & 3 deletions src/swiper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export class Swiper {
this.pageChange = false;
}

public swipeTo(toIndex: number, transition: Transition) {
public swipeTo(toIndex: number, transition?: Transition) {
if (this.sliding) {
return;
}
Expand Down Expand Up @@ -396,12 +396,12 @@ export class Swiper {
this._swipeTo();
}

public swipePrev(transition: Transition) {
public swipePrev(transition?: Transition) {
var currentIndex = this.currentPage.index;
this.swipeTo(currentIndex - 1, transition);
}

public swipeNext(transition: Transition) {
public swipeNext(transition?: Transition) {
var currentIndex = this.currentPage.index;
this.swipeTo(currentIndex + 1, transition);
}
Expand Down

0 comments on commit c24eb42

Please sign in to comment.