diff --git a/components/diy/carousel.vue b/components/diy/carousel.vue index 972f2687..9977d8dd 100644 --- a/components/diy/carousel.vue +++ b/components/diy/carousel.vue @@ -128,11 +128,10 @@ const { common_style, actived_color } = new_style; // aspectFill 对应 cover aspectFit 对应 contain scaleToFill 对应 none - const { img_fit } = this.form; let fit = 'scaleToFill'; - if (img_fit == 'cover') { + if (new_form.img_fit == 'cover') { fit = 'aspectFill'; - } else if (img_fit == 'contain') { + } else if (new_form.img_fit == 'contain') { fit = 'aspectFit'; } this.$nextTick(() => { diff --git a/components/diy/coupon.vue b/components/diy/coupon.vue index 6bf8e03e..9010dc34 100644 --- a/components/diy/coupon.vue +++ b/components/diy/coupon.vue @@ -363,8 +363,8 @@ .item { flex-basis: auto; flex-shrink: 0; - width: 180rpx; - height: 180rpx; + width: 168rpx; + height: 168rpx; border-radius: 20rpx; margin-top: 20rpx; @@ -411,7 +411,7 @@ font-size: 18rpx; border-radius: 46rpx; position: relative; - top: -4rpx; + top: -10rpx; } } } @@ -803,14 +803,13 @@ .coupon-theme-6 { display: flex; - .item { flex-basis: auto; flex-shrink: 0; border-radius: 24rpx; padding: 12rpx; - width: 280rpx; - height: 200rpx; + width: 268rpx; + height: 188rpx; position: relative; box-sizing: border-box; @@ -876,12 +875,12 @@ } .bottom { - margin-top: 12rpx; + margin-top: 8rpx; text-align: center; .coupon-btn { position: relative; - font-size: 32rpx; + font-size: 28rpx; line-height: 44rpx; font-weight: 500; text-align: center; diff --git a/components/diy/diy.vue b/components/diy/diy.vue index 0a781544..666a1658 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -4,7 +4,7 @@ - + @@ -16,7 +16,7 @@ @@ -62,6 +62,7 @@ cube_cell: '', container_size: '', div_width: 0, + img_fit: '', }; }, watch: { @@ -90,6 +91,13 @@ const outer_sx = `-${new_style.image_spacing}rpx`; // 图片间距设置 const spacing = `${new_style.image_spacing}rpx`; + // aspectFill 对应 cover aspectFit 对应 contain scaleToFill 对应 none + let fit = 'scaleToFill'; + if (new_content.img_fit == 'cover') { + fit = 'aspectFill'; + } else if (new_content.img_fit == 'contain') { + fit = 'aspectFit'; + } const density = 4; this.setData({ form: this.propValue.content, @@ -99,6 +107,7 @@ content_img_radius: radius_computer(new_style), style_container: common_styles_computer(new_style.common_style) + 'box-sizing: border-box;', style_img_container: common_img_computer(new_style.common_style), + img_fit: fit, }); this.$nextTick(() => { diff --git a/components/diy/modules/custom/model-panel.vue b/components/diy/modules/custom/model-panel.vue index 0f8ef132..a4930b1d 100644 --- a/components/diy/modules/custom/model-panel.vue +++ b/components/diy/modules/custom/model-panel.vue @@ -1,5 +1,5 @@ @@ -72,7 +72,10 @@ background_img_style: form?.background_img_style || '2' } return background_computer(data); - } + }, + url_event(e) { + this.$emit('url_event', e); + }, }, }; diff --git a/components/diy/modules/tabs-view.vue b/components/diy/modules/tabs-view.vue index a7d1e195..bcee0261 100644 --- a/components/diy/modules/tabs-view.vue +++ b/components/diy/modules/tabs-view.vue @@ -5,12 +5,12 @@ - - + + {{ item.title }} {{ item.desc }} - + @@ -248,8 +248,8 @@ } .icon { position: absolute; - left: 0; - right: 0; + // left: 0; + // right: 0; bottom: 0; text-align: center; font-size: 40rpx; diff --git a/components/diy/notice.vue b/components/diy/notice.vue index 1c1ec710..7ffa8b3c 100644 --- a/components/diy/notice.vue +++ b/components/diy/notice.vue @@ -7,7 +7,7 @@