图片固定比例
16:9
html
<div class="itemImg">
<el-image :src="item.cover" fit="cover" />
</div>
less
.itemImg{
width: 100%;
position: relative;
height: 0;
padding-bottom: 56%;
cursor: pointer;
.el-image{
position: absolute;
width: 100%;
height: 100%;
border-radius: 8px;
}
}