I have a list like this:
data:{
slides:[
{ slideImg: "images/necklace.webp"},
{ slideImg: "images/necklace2.webp"},
{ slideImg: "images/pants.webp"},
{ slideImg: "images/pants2.jpeg"},
],
}
I try with v-for:
<div class="slide" v-for="slide in slides">
<img :src="slide.slideImg">
</div>
V-for makes all items show. But i have an option list, example: when I click option "1 per page" then 1 slide will be shown, "2 per page" then 2 slides will be shown, then 3, 4, 5... Can someone show me how to do that?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…