Feat:礼品封面尺寸大小调整
This commit is contained in:
@@ -14,13 +14,13 @@
|
|||||||
:circular="true"
|
:circular="true"
|
||||||
:indicator-dots="false"
|
:indicator-dots="false"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
previous-margin="200rpx"
|
previous-margin="180rpx"
|
||||||
next-margin="180rpx"
|
next-margin="180rpx"
|
||||||
class="cover-swiper"
|
class="cover-swiper"
|
||||||
>
|
>
|
||||||
<swiper-item v-for="(item, index) in list" :key="index">
|
<swiper-item v-for="(item, i) in list" :key="i" class="cover-swiper-item" :class="{'n-actived' : currentIndex !== i}">
|
||||||
<view class="cover-item" >
|
<view class="cover-item" >
|
||||||
<view class="img-wrap" :class="currentIndex === index ? 'v12-mt-10' : 'v12-mt-18'">
|
<view class="img-wrap">
|
||||||
<view class="pro-img-wrap " :style="{
|
<view class="pro-img-wrap " :style="{
|
||||||
left: (item.productImageX*2 || 0) + 'rpx',
|
left: (item.productImageX*2 || 0) + 'rpx',
|
||||||
top: (item.productImageY*2 || -40) + 'rpx'
|
top: (item.productImageY*2 || -40) + 'rpx'
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
<image :src="product.image" class="pro-cover-image" mode="widthFix|heightFix" />
|
<image :src="product.image" class="pro-cover-image" mode="widthFix|heightFix" />
|
||||||
</view>
|
</view>
|
||||||
<image :src="item.cover" class="cover-image" mode="widthFix|heightFix" />
|
<image :src="item.cover" class="cover-image" mode="widthFix|heightFix" />
|
||||||
<view class="message-text" :style="{top: currentIndex !== index ? '260rpx' : '220rpx'}">{{ message }}</view>
|
<!-- <view class="message-text" :style="{top: currentIndex !== index ? '260rpx' : '220rpx'}">{{ message }}</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="cover-name">{{ item.name }} </view>
|
<!-- <view class="cover-name">{{ item.name }} </view> -->
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -84,6 +84,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onChange(e) {
|
onChange(e) {
|
||||||
this.currentIndex = e.detail.current
|
this.currentIndex = e.detail.current
|
||||||
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
this.$emit('confirm', this.list[this.currentIndex])
|
this.$emit('confirm', this.list[this.currentIndex])
|
||||||
@@ -94,6 +95,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
.n-actived{
|
||||||
|
.cover-item{
|
||||||
|
transform: scale(0.8);
|
||||||
|
margin-bottom: -40rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.cover-swiper-item{
|
||||||
|
height: fit-content !important;
|
||||||
|
bottom: 0;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
.message-text{
|
.message-text{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -105,24 +118,24 @@ export default {
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
.pro-cover-image{
|
.pro-cover-image{
|
||||||
width: 218rpx;
|
width: 320rpx;
|
||||||
height: 218rpx;
|
height: 320rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
.pro-img-wrap{
|
.pro-img-wrap{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 218rpx;
|
width: 320rpx;
|
||||||
height: 218rpx;
|
height: 320rpx;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
/*border: 10rpx solid #FDF0D3;*/
|
/*border: 10rpx solid #FDF0D3;*/
|
||||||
top: -40px;
|
top: -40px;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
.img-wrap{
|
.img-wrap{
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: all .2s ease-in-out;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
.tips{
|
.tips{
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@@ -146,9 +159,12 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
overflow: visible;
|
||||||
|
transition: all .3s ease-in-out;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
.cover-image {
|
.cover-image {
|
||||||
width: 340rpx;
|
width: 420rpx;
|
||||||
height: 560rpx;
|
height: 580rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
transition: all .2s ease-in-out;
|
transition: all .2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user