修改轮和选项卡轮播内容

master
于肖磊 2024-12-17 17:21:44 +08:00
parent 8ddb8d66c3
commit 878ecdef2f
2 changed files with 25 additions and 7 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="pr re" :style="style_container + swiper_bg_style"> <view class="pr" :style="style_container + swiper_bg_style">
<view class="pa top-0 wh-auto ht-auto" :style="swiper_bg_img_style"></view> <view class="pa top-0 wh-auto ht-auto" :style="swiper_bg_img_style"></view>
<view class="pr re" :style="style_img_container + (!isEmpty(swiper_bg_img_style) ? 'background-image: url(null);' : '')"> <view class="pr" :style="style_img_container + (!isEmpty(swiper_bg_img_style) ? 'background-image: url(null);' : '')">
<swiper circular="true" :autoplay="form.is_roll == '1'" :interval="form.interval_time * 1000" :display-multiple-items="slides_per_group" :duration="500" :style="{ height: swiper_height }" :previous-margin="previousMargin" :next-margin="nextMargin" @change="slideChange"> <swiper circular="true" :autoplay="form.is_roll == '1'" :interval="form.interval_time * 1000" :display-multiple-items="slides_per_group" :duration="500" :style="{ height: swiper_height }" :previous-margin="previousMargin" :next-margin="nextMargin" @change="slideChange">
<block v-if="form.carousel_type == 'card'"> <block v-if="form.carousel_type == 'card'">
<swiper-item v-for="(item, index) in new_list" :key="index"> <swiper-item v-for="(item, index) in new_list" :key="index">
@ -228,8 +228,17 @@
if (!this.propIsCommon) { if (!this.propIsCommon) {
return ''; return '';
} }
if (!isEmpty(form.carousel_list[actived_index]?.style?.background_img)) { const { carousel_img, style = {} } = form?.carousel_list[actived_index] || {};
return background_computer(form.carousel_list[actived_index].style) + (form?.carousel_list[actived_index].is_background_img_blur == '1' ? `filter: blur(14px);opacity: 0.6;` : ''); //
if (!isEmpty(carousel_img) && style?.background_type == 'carousel') {
// 使
const data = {
background_img: carousel_img,
background_img_style: style?.background_img_style || '2',
}
return background_computer(data) + (style.is_background_img_blur == '1' ? `filter: blur(14px);opacity: 0.6;` : '');
} else if (!isEmpty(style?.background_img)) {
return background_computer(style) + (style.is_background_img_blur == '1' ? `filter: blur(14px);opacity: 0.6;` : '');
} }
return ''; return '';
}, },

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="ou re" :style="style_container + swiper_bg_style"> <view class="ou pr" :style="style_container + swiper_bg_style">
<view class="pa top-0 wh-auto ht-auto" :style="swiper_bg_img_style"></view> <view class="pa top-0 wh-auto ht-auto" :style="swiper_bg_img_style"></view>
<view class="flex-col ou wh-auto" :style="style_img_container + (!isEmpty(swiper_bg_img_style) ? 'background-image: url(null);' : '')"> <view class="flex-col ou wh-auto" :style="style_img_container + (!isEmpty(swiper_bg_img_style) ? 'background-image: url(null);' : '')">
<componentDiyTabs :propContentPadding="propContentPadding" :propValue="propValue" :propTop="propTop" :propNavIsTop="propNavIsTop" :propTabsIsTop="propTabsIsTop" :propIsCommon="false" :propsTabsContainer="tabs_container" :propsTabsImgContainer="tabs_img_container" :propSpacingCommonStyle="spacing_common_style" @onComputerHeight="tabs_height_event" @onTabsTap="tabs_click_event"></componentDiyTabs> <componentDiyTabs :propContentPadding="propContentPadding" :propValue="propValue" :propTop="propTop" :propNavIsTop="propNavIsTop" :propTabsIsTop="propTabsIsTop" :propIsCommon="false" :propsTabsContainer="tabs_container" :propsTabsImgContainer="tabs_img_container" :propSpacingCommonStyle="spacing_common_style" @onComputerHeight="tabs_height_event" @onTabsTap="tabs_click_event"></componentDiyTabs>
@ -172,8 +172,17 @@
return ''; return '';
}, },
get_swiper_bg_img_style(form, actived_index) { get_swiper_bg_img_style(form, actived_index) {
if (!isEmpty(form.carousel_list[actived_index]?.style?.background_img)) { const { carousel_img, style = {} } = form?.carousel_list[actived_index] || {};
return background_computer(form.carousel_list[actived_index].style) + (form?.carousel_list[actived_index].is_background_img_blur == '1' ? `filter: blur(14px);opacity: 0.6;` : ''); //
if (!isEmpty(carousel_img) && style?.background_type == 'carousel') {
// 使
const data = {
background_img: carousel_img,
background_img_style: style?.background_img_style || '2',
}
return background_computer(data) + (style.is_background_img_blur == '1' ? `filter: blur(14px);opacity: 0.6;` : '');
} else if (!isEmpty(style?.background_img)) {
return background_computer(style) + (style.is_background_img_blur == '1' ? `filter: blur(14px);opacity: 0.6;` : '');
} }
return ''; return '';
}, },