mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
Cleanup
This commit is contained in:
@ -54,8 +54,6 @@ export class Slides extends Ion {
|
|||||||
super(elementRef, config);
|
super(elementRef, config);
|
||||||
}
|
}
|
||||||
onInit() {
|
onInit() {
|
||||||
//this.getNativeElement().classList.add('swiper-container');
|
|
||||||
|
|
||||||
var options = util.defaults({
|
var options = util.defaults({
|
||||||
pagination: '.swiper-pagination',
|
pagination: '.swiper-pagination',
|
||||||
paginationClickable: true,
|
paginationClickable: true,
|
||||||
@ -64,11 +62,13 @@ export class Slides extends Ion {
|
|||||||
|
|
||||||
var swiper = new Swiper(this.getNativeElement().children[0], options);
|
var swiper = new Swiper(this.getNativeElement().children[0], options);
|
||||||
|
|
||||||
console.log('Build swiper', swiper, options);
|
|
||||||
|
|
||||||
this.swiper = swiper;
|
this.swiper = swiper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the underlying slider implementation. Call this if you've added or removed
|
||||||
|
* child slides.
|
||||||
|
*/
|
||||||
update() {
|
update() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.swiper.update();
|
this.swiper.update();
|
||||||
@ -96,12 +96,10 @@ export class Slide {
|
|||||||
* @param {ElementRef} elementRef TODO
|
* @param {ElementRef} elementRef TODO
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
//@Host() slides: Slides,
|
|
||||||
elementRef: ElementRef
|
elementRef: ElementRef
|
||||||
) {
|
) {
|
||||||
this.ele = elementRef.nativeElement;
|
this.ele = elementRef.nativeElement;
|
||||||
this.ele.classList.add('swiper-slide');
|
this.ele.classList.add('swiper-slide');
|
||||||
//slides.add(this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user