图片自适应
废话不多说先上完整的代码
<template>
<div>
{
{
img_height | add_px}}
<el-carousel indicator-position="outside" :height= "img_height + 'px'" >
<el-carousel-item v-for="item in dataList" :key="item">
<img :src="item" @load="img_load" ref='img_ref' />
</el-carousel-item>
</el-carousel>
</div