动态渲染本地图片
<div class="wrap_left" v-for="item of array" :key="item.id">
<img :src="item.img ? require(`../assets/image/${item.img}`) : ''" alt="image" />
</div>
array: [
{
id: 0,
name: '小明',
job: '学生',
address: '北京市中心',
year: '居住10年',
img: 'xm.png'
}
]
所有评论(0)