<template>
<div id = "app">
<div id = "lunbo" v-for="item in listOne" :key="item">
<img id = "img" :src = "item" width="100%" height="200px"/>
</div>
</div>
</template>
<script>
export default{
data(){
return{
imgurl: require('./../assets/yekong.png'),
listOne: [
require("./../assets/yekong.png"),
require("../assets/yekong.png"),
require("@/assets/yekong.png"),
],
}
},
}
</script>
记住几个方法
require("./../assets/yekong.png"),
require("../assets/yekong.png"),
require("@/assets/yekong.png")
网友评论