|
|
@@ -14,13 +14,18 @@
|
|
|
<view
|
|
|
class="item"
|
|
|
:style="{
|
|
|
+ height: `${height}rpx`,
|
|
|
backgroundImage: `url(${item})`,
|
|
|
backgroundSize: 'cover',
|
|
|
}"
|
|
|
>
|
|
|
<image
|
|
|
:src="item"
|
|
|
- :style="{ width: '100%', borderRadius: '20rpx' }"
|
|
|
+ :style="{
|
|
|
+ width: '100%',
|
|
|
+ height: `${height}rpx`,
|
|
|
+ borderRadius: '20rpx'
|
|
|
+ }"
|
|
|
mode="aspectFit"
|
|
|
@click="onPreviewImage(key)"
|
|
|
/>
|
|
|
@@ -50,6 +55,11 @@ const { onPreviewImage } = useSwiperImagePreview(() => props.images || [])
|
|
|
|
|
|
<style lang="scss">
|
|
|
.image-swiper {
|
|
|
+ .item {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
image {
|
|
|
border-radius: 20rpx;
|
|
|
}
|