<el-carousel indicator-position="outside">
<el-carousel-item v-for="item in images" :key="item.id">
<img :src="item.src" alt="" style="width:100%">
</el-carousel-item>
<img :src="images[0].src" style="width:100%;opacity: 0;" alt="">
</el-carousel>
如上图代码,先创建一个img把内容撑开,再设置透明度为0,这样既不会显示,又可以撑开el-carousel