problem description
vue can"t get the picture src using v-for
related codes
/ / Please paste the code text below (do not replace the code with pictures)
< template >
<div class=imgBox>
<div class="imgList">
<div v-for="item in items">
<!--src-->
<img class="imgg" :src="item.src" alt="">
<h5>{{item.title}}</h5>
<P>{{item.info}}</P>
</div>
</div>
<!---->
<img src="../assets/images/Vue.png" alt="">
</div>
< / template >
< script >
export default {
name: "classify",
data(){
return{
items:[
{src:"../assets/images/Vue.png",title:"VUE",info:""},
{src:"../assets/images/Vue.png",title:"VUE",info:""},
{src:"../assets/images/Vue.png",title:"VUE",info:""},
{src:"../assets/images/Vue.png",title:"VUE",info:""},
{src:"../assets/images/Vue.png",title:"VUE",info:""},
],
}
}
}
< / script >
what result do you expect? What is the error message actually seen?
could you tell me how to write it and what went wrong?
if I get this path alone, I can display the picture.