<el-carousel-item v-for="(item,index) in dialogData.lookDetail.picList" :key="index" > <img class='width100' @load="getHeight" :src="item" ref='image' alt="" > </el-carousel-item> //一、 撐起el-carousel__containe <img :src="dialogData.lookDetail.picList[0]" class="toolImg" alt=""> </el-carousel> 二、css: .el-carousel__container{ height: auto!important; } 三、設置負責撐起容器的圖片的css .toolImg{ width: 100%; opacity: 0; }