修改选项卡轮播显示逻辑

master
于肖磊 2025-08-04 17:08:21 +08:00
parent 957257dc36
commit 6242d61227
2 changed files with 7 additions and 7 deletions

View File

@ -78,7 +78,7 @@
return {};
},
},
propIsCommon: {
propIsCommonStyle: {
type: Boolean,
default: true,
},
@ -178,8 +178,8 @@
new_list: new_form.carousel_list.concat(this.get_seat_list(new_form)),
popup_width: block * 16 * 2 + 'rpx', // 16:9
popup_height: block * 9 * 2 + 'rpx', //
style_container: this.propIsCommon ? common_styles_computer(common_style) : '', //
style_img_container: this.propIsCommon ? common_img_computer(common_style, this.propIndex) : '', //
style_container: this.propIsCommonStyle ? common_styles_computer(common_style) : '', //
style_img_container: this.propIsCommonStyle ? common_img_computer(common_style, this.propIndex) : '', //
img_style: new_form.carousel_type == 'inherit' ? '' : radius_computer(new_style), //
outer_img_style: new_form.carousel_type == 'inherit' ? radius_computer(new_style) + 'overflow: hidden;' : '',
indicator_style: get_indicator_style(new_style), //
@ -214,7 +214,7 @@
}
},
get_swiper_bg_style(form, actived_index) {
if (!this.propIsCommon) {
if (!this.propIsCommonStyle) {
return '';
}
const style = form?.carousel_list?.[actived_index]?.style;
@ -233,7 +233,7 @@
return '';
},
get_swiper_bg_img_style(form, actived_index) {
if (!this.propIsCommon) {
if (!this.propIsCommonStyle) {
return '';
}
const { carousel_img, style = {} } = form?.carousel_list[actived_index] || {};
@ -282,7 +282,7 @@
actived_index = 0;
}
}
if (!this.propIsCommon) {
if (!this.propIsCommonStyle) {
this.$emit('slideChange', actived_index);
}
this.setData({

View File

@ -6,7 +6,7 @@
<view :style="carousel_margin_top">
<view :style="carousel_container">
<view :style="carousel_img_container">
<component-diycarousel :propValue="propValue" :propIsCommon="false" @onVideoPlay="video_play" @slideChange="slideChange"></component-diycarousel>
<component-diycarousel :propValue="propValue" :propIsCommonStyle="false" @onVideoPlay="video_play" @slideChange="slideChange"></component-diycarousel>
</view>
</view>
</view>