多图并列格式优化
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/59292f1092c945768b1248b7a2177092.png)
<view class="images">
<view class="image" :class="picArr.length == 1 ? 'only' : '' " v-for="img in picArr" :key="img">
<image src="../../static/images/avatar.jpg" mode="aspectFill"></image>
</view>
</view>
<style lang="scss">
.images {
display: flex;
justify-content: center;
align-items: center;
background-color: #ccc;
width: 100%;
.image {
width: 200rpx;
height: 200rpx;
overflow: hidden;
margin: 10rpx;
image {
width: 100%;
height: 100%;
}
&:first-child {
border-radius: 20rpx 0 0 20rpx;
}
&:last-child {
border-radius: 0 20rpx 20rpx 0;
}
&.only {
border-radius: 20rpx;
}
}
}
</style>