上下进行翻滚样式
方法
startScroll(){
this.interval = setInterval(()=>{
this.offset -= this.rowHeight
if(Math.abs(this.offset)>= this.rowHeight){
this.offset = 0;
this.moveFirstToLast();
}
},8000);
}
stopScroll(){
clearInterval(this.interval)
}
moveFirstToLast(){
const firstRow = this.topRightListOne.shift() // topRightListOne 数组
if(firstRow){
this.moveFirstToLast.push(firstRow)
}
}
浙公网安备 33010602011771号