Commit 28a772b8 by 岑成威

fix: 长图比例修改

1 parent ec8c74ec
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<image <image
:key="viewKey" :key="viewKey"
class="content" class="content"
:mode="isLongImage ? 'widthFix' : undefined"
:src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')" :src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')"
/> />
</template> </template>
...@@ -34,6 +35,7 @@ ...@@ -34,6 +35,7 @@
<image <image
v-if="views.detailUrl" v-if="views.detailUrl"
class="content" class="content"
:mode="isLongImage ? 'widthFix' : undefined"
:src="views.detailUrl" :src="views.detailUrl"
/> />
<!-- <image <!-- <image
...@@ -59,7 +61,8 @@ export default { ...@@ -59,7 +61,8 @@ export default {
madiaId: Number, madiaId: Number,
isByd: Boolean, isByd: Boolean,
show: Boolean, show: Boolean,
hasCarBrand: Boolean hasCarBrand: Boolean,
isLongImage: Boolean
}, },
components: { components: {
PageTitle PageTitle
...@@ -90,6 +93,7 @@ export default { ...@@ -90,6 +93,7 @@ export default {
.layout { .layout {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden;
&-content { &-content {
height: 100%; height: 100%;
position: relative; position: relative;
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
</view> </view>
<image <image
class="content-image" class="content-image"
:mode="isLongImage ? 'widthFix' : undefined"
:src="contentUrl()" :src="contentUrl()"
/> />
</view> </view>
...@@ -88,7 +89,8 @@ export default { ...@@ -88,7 +89,8 @@ export default {
title: String, title: String,
views: [Array, Object], views: [Array, Object],
aitoCarModelIds: Array, aitoCarModelIds: Array,
isByd: Boolean isByd: Boolean,
isLongImage: Boolean
}, },
name: 'Reception', name: 'Reception',
data () { data () {
...@@ -215,7 +217,7 @@ export default { ...@@ -215,7 +217,7 @@ export default {
.layout { .layout {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden;
background-size: 100%; background-size: 100%;
&-content { &-content {
position: relative; position: relative;
......
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
<template v-if="detail.viewActiveIndex.includes(activeIndex)"> <template v-if="detail.viewActiveIndex.includes(activeIndex)">
<image <image
:key="imgKey" :key="imgKey"
:class="direction" :class="[direction, { 'content-image-long': isLongImage }]"
class="content-image" class="content-image"
:mode="isLongImage ? 'widthFix' : undefined"
:src="viewsImg()" :src="viewsImg()"
/> />
...@@ -58,8 +59,9 @@ ...@@ -58,8 +59,9 @@
<template v-else> <template v-else>
<image <image
:key="imgKey" :key="imgKey"
:class="direction" :class="[direction, { 'content-image-long': isLongImage }]"
class="content-image" class="content-image"
:mode="isLongImage ? 'widthFix' : undefined"
:src="viewsImg()" :src="viewsImg()"
/> />
</template> </template>
...@@ -79,6 +81,7 @@ export default { ...@@ -79,6 +81,7 @@ export default {
title: String, title: String,
madiaId: Number, madiaId: Number,
detail: Object, detail: Object,
isLongImage: Boolean,
}, },
name: 'MediaComponent', name: 'MediaComponent',
data () { data () {
...@@ -133,6 +136,7 @@ export default { ...@@ -133,6 +136,7 @@ export default {
.layout { .layout {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden;
position: relative; position: relative;
// background-image: url('@/assets/images/media/media-bg.webp'); // background-image: url('@/assets/images/media/media-bg.webp');
background-size: 100%; background-size: 100%;
...@@ -221,6 +225,9 @@ export default { ...@@ -221,6 +225,9 @@ export default {
width: toRpx(1778); width: toRpx(1778);
height: toRpx(1192); height: toRpx(1192);
} }
.content-image-long {
height: auto;
}
} }
.icon-car { .icon-car {
position: absolute; position: absolute;
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
:isPreview="isPreview" :isPreview="isPreview"
:isByd="isByd" :isByd="isByd"
:hasCarBrand="item.hasCarBrand" :hasCarBrand="item.hasCarBrand"
:isLongImage="isLongImageItem(item)"
:aitoCarModelIds="aitoCarModelIds" :aitoCarModelIds="aitoCarModelIds"
@brandPopupChange="brandPopupVisible = $event" @brandPopupChange="brandPopupVisible = $event"
/> />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!