Loop playback
This is the data part
data() {
return {
prizeList: [
{ name: 0 },
{ name: 1 },
{ name: 2 },
{ name: 3 },
{ name: 4 }
]
}
}
This is my current code, it can only switch in cycles and has no animation effect
setInterval(async () => {
let first = this.prizeList.splice(0, 1)
this.prizeList.push(...first)
}
You can change your mind and use transition to achieve it
Effect
Can be implemented using the transition component
vue official documentation
Animation effects library
Very easy to use: