mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
test(slides): add test for slides and remove the second parameter on the move event
references #5379
This commit is contained in:
@ -284,7 +284,7 @@ export class Slides extends Ion {
|
|||||||
return this.options.onLazyImageReady && this.options.onLazyImageReady(swiper, slide, img);
|
return this.options.onLazyImageReady && this.options.onLazyImageReady(swiper, slide, img);
|
||||||
};
|
};
|
||||||
options.onSliderMove = (swiper, e) => {
|
options.onSliderMove = (swiper, e) => {
|
||||||
this.move.emit(swiper, e);
|
this.move.emit(swiper);
|
||||||
return this.options.onSliderMove && this.options.onSliderMove(swiper, e);
|
return this.options.onSliderMove && this.options.onSliderMove(swiper, e);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,6 +29,10 @@ class IntroPage {
|
|||||||
slider.isEnd ? this.continueText = "Continue" : this.continueText = "Skip";
|
slider.isEnd ? this.continueText = "Continue" : this.continueText = "Skip";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onSlideMove(slider) {
|
||||||
|
console.log("Slide move", slider);
|
||||||
|
}
|
||||||
|
|
||||||
skip() {
|
skip() {
|
||||||
this.nav.push(MainPage);
|
this.nav.push(MainPage);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<ion-slides pager (change)="onSlideChanged($event)" (slideChangeStart)="onSlideChangeStart($event)" loop="true">
|
<ion-slides pager (change)="onSlideChanged($event)" (slideChangeStart)="onSlideChangeStart($event)" (move)="onSlideMove($event)" loop="true">
|
||||||
<ion-slide>
|
<ion-slide>
|
||||||
<h3>Thank you for choosing the Awesome App!</h3>
|
<h3>Thank you for choosing the Awesome App!</h3>
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
|
Reference in New Issue
Block a user