// 轮播
methods:{
prevIndex(){
this.mark=this.mark - 1;
if(this.mark < 0){
this.mark=2;
}
console.log(this.mark);
},
nextIndex(){
this.mark=this.mark + 1;
if(this.mark==3){
this.mark=0;
}
console.log(this.mark);
},
handleClick(tab, event) {
console.log(tab, event);
},
autoPlay () {
this.mark++;
if (this.mark===3) { //当遍历到最后一张图片置零
this.mark=0
}
},
play () {
setInterval(this.autoPlay, 4000)
},
change (i) {
this.mark= i
}
},
created () {
this.play()
},
// 轮播