diff --git a/pages/diy/components/diy/carousel.vue b/pages/diy/components/diy/carousel.vue index e50adff2..2a786694 100644 --- a/pages/diy/components/diy/carousel.vue +++ b/pages/diy/components/diy/carousel.vue @@ -5,21 +5,19 @@ - + - + - - - + - + {{ item.video_title }} @@ -29,19 +27,17 @@ - - + + - + - - - + - + {{ item.video_title }} @@ -120,6 +116,8 @@ img_fit: '', dot_style: '', video_style: '', + video_img_style: '', + video_icon_size: '', popup_width: '0rpx', popup_height: '0rpx', // 样式二的处理 @@ -183,12 +181,16 @@ indicator_style: get_indicator_style(new_style), // 指示器的样式 indicator_location_style: get_indicator_location_style(new_style), dot_style: `bottom: ${ new_style.indicator_bottom * scale }px;`, // 指示器位置 + video_img_style: `width:${(new_style?.video_image_width || 14) * 2 }rpx;height:${ (new_style?.video_image_height || 14) * 2 }rpx;`, + video_icon_size: `${ (new_style?.video_icon_size || 14) * 2 }rpx`, img_fit: fit, // 图片风格 默认为aspectFill video_style: this.get_video_style(new_style), // 视频播放按钮显示逻辑 swiper_height: new_form.height * scale + 'px', // 轮播图高度 swiper_bg_style: this.get_swiper_bg_style(new_form, 0), swiper_bg_img_style: this.get_swiper_bg_img_style(new_form, 0), }); + console.log(this.video_img_style); + // 风格二显示逻辑 if (new_form.carousel_type == 'card') { // this.$nextTick(() => { @@ -356,12 +358,7 @@ transform: scale(1.1); } } - .video_img { - max-width: 120rpx; - height: 28rpx; - } .video-class { - max-width: 100%; padding-right: 20rpx; padding-left: 20rpx; } diff --git a/pages/diy/components/diy/title.vue b/pages/diy/components/diy/title.vue index 7a6615c2..dee8c37c 100644 --- a/pages/diy/components/diy/title.vue +++ b/pages/diy/components/diy/title.vue @@ -107,20 +107,24 @@ right_size: right_size * 2 + 'rpx', // 右边按钮设置 right_style: `color:${right_color}; font-size: ${right_size * 2}rpx;`, //右侧按钮样式 title_style: `color:${title_color}; font-size: ${title_size * 2}rpx; ${common_styles}`, // 标题样式设置 - subtitle_style: this.get_subtitle_style(new_style), // 副标题样式设置 + subtitle_style: this.get_subtitle_style(new_form, new_style), // 副标题样式设置 style_container: common_styles_computer(common_style), // 通用样式区 style_img_container: common_img_computer(common_style, this.propIndex), // 通用图片样式区 }); }, // 副标题样式设置 - get_subtitle_style(new_style) { + get_subtitle_style(new_form, new_style) { let common_styles = ''; if (new_style.subtitle_weight == 'italic') { common_styles += `font-style: italic`; } else if (['bold', '500'].includes(new_style.subtitle_weight)) { common_styles += `font-weight: bold;`; } - return `color:${new_style.subtitle_color}; font-size: ${new_style.subtitle_size * 2}rpx; ${common_styles}`; + let flex = ''; + if (new_form.is_subtitle_center == '1') { + flex = 'display: flex; justify-content: center;'; + } + return `color:${new_style.subtitle_color}; font-size: ${new_style.subtitle_size * 2}rpx; ${common_styles} ${ flex }`; }, url_event(e) { app.globalData.url_event(e);