比如如果是8张,最后两张两边对齐,第八张最后一张 放个占位符就OK了
<div class="previewPadding flex" >
<div class="picList picList3" v-for="(item,index) in picDataList" :key="index">
<img class="pic" :src="item.pic" />
</div>
<div v-if="picDataList.length == 8" class="picList picList3" ></div>
</div>
.flex{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.picList{
width:49%;
}
.picList3{
width:32%;
//margin-right: 3%;
}
}