1、直接使用<img>标签的话 图片容易在规定的大小呢拉伸变形
2、目前能想到的比较能用的办法就是用:style 的方式给元素添加背景图片
3、背景图片的有有个好处,图片不变形,自动回截取规定大小
js:
<div class='bgimg' :style="{backgroundImage:'url('+item.img+')'}"></div>
background-position-y: center;水平居中 更多水平和垂直展示方式请自行解决
css:
background-repeat: no-repeat;
background-size: 100%;
background-position-y: center;
