import { Component, OnInit } from '@angular/core';
import { Swiper } from '../../../server/declares';
@Component({
selector: 'app-swiper-adv-1',
templateUrl: './swiper-adv-1.component.html',
styleUrls: ['./swiper-adv-1.component.css']
})
export class SwiperAdv1Component implements OnInit {
bannerSwiper: any;
items: any = [];
constructor() {
}
ngOnChanges(){
console.log('change');
}
_init(){
this.items.push({
title: '',
image: 'http://img.chwlsq.com/1/config/1701151154381248736.jpg'
});
this.items.push({
title: '',
image: 'http://img.chwlsq.com/1/config/1701151154528930188.jpg'
});
}
ngOnInit() {
this._init();
setTimeout(()=>{
this._init();
},3000);
this.bannerSwiper = new Swiper('.banner-swiper .list-guanggaowei', {
loop: true,
speed: 1000,
autoplay: 2000,
autoplayDisableOnInteraction: false,
pagination: '.banner-swiper .swiper-pagination'
});
}
}