Home > front end >  The annual meeting of the draw, how to make pictures, text fast scroll (vue)
The annual meeting of the draw, how to make pictures, text fast scroll (vue)

Time:10-04

As shown, click on the draw button, how to make the picture and text scrolling quickly, click the stop or interval after a few seconds to stop rolling


Test data


 


<script>
Export the default {
Name: "home",
Data () {
Return {
IsCollapse: true,
Input: "'
The arrays: [],
UserData: [
{
Nickname: "1" will be called,
Headimgurl: require ("../assets/home1. JPG "),
},
{
Nickname: "will call 2",
Headimgurl: require ("../assets/home1. JPG "),
},
{
Nickname: "3" will be called,
Headimgurl: require ("../assets/home1. JPG "),
},
{
Nickname: "4" will be called,
Headimgurl: require ("../assets/home1. JPG "),
},
{
Nickname: "will call 5",
Headimgurl: require ("../assets/home1. JPG "),
},
{
Nickname: "6" will be called,
Headimgurl: require ("../assets/home1. JPG "),
},
{
Will be called (nickname: "7",
Headimgurl: require ("../assets/home1. JPG "),
},
{
Nickname: "8" will be called,
Headimgurl: require ("../assets/home1. JPG "),
},
{
Nickname: "will call 9",
Headimgurl: require ("../assets/home1. JPG "),
},
{
Nickname: "0" will be called,
Headimgurl: require ("../assets/home1. JPG "),
},
],
};
},
Methods: {
GoFome () {
For (the let I=0; I & lt; Enclosing the userData. Length; I++) {
SetInterval (enclosing the arrays=this. UserData [I], 3000)
Window. The console. The log (enclosing the arrays)
}
},
}
}
</script>
  • Related