From 709fcd5d644f1c0f3bc61613db103bfb1cbe1d0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Wed, 8 Jan 2025 10:34:32 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=89=E9=A1=B9=E5=8D=A1?=
=?UTF-8?q?=E8=BD=AE=E6=92=AD=E7=9A=84=E6=98=BE=E7=A4=BA=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../model-custom-group/index.vue | 5 +-
.../model-carousel/model-carousel-styles.vue | 4 ++
src/components/model-custom/index.vue | 5 +-
.../components/custom/index.vue | 6 ++-
src/components/model-tabs-carousel/index.vue | 7 +--
.../model-tabs/model-tabs-styles.vue | 7 +++
src/config/const/tabs-carousel.ts | 48 +++++++++++++++++++
7 files changed, 73 insertions(+), 9 deletions(-)
diff --git a/src/components/common/custom-module/model-custom-group/index.vue b/src/components/common/custom-module/model-custom-group/index.vue
index c5bd272f..65802d63 100644
--- a/src/components/common/custom-module/model-custom-group/index.vue
+++ b/src/components/common/custom-module/model-custom-group/index.vue
@@ -198,11 +198,12 @@ watchEffect(() => {
if (!isEmpty(data_source_content_list.value)) {
num = new_style.value.rolling_fashion == 'translation' ? data_source_content_list.value.length : Math.ceil(data_source_content_list.value.length / Number(data_source_carousel_col));
}
+ const { padding_top, padding_bottom, margin_bottom, margin_top } = new_style.value.data_style;
// 轮播图高度控制
if (form.value.data_source_direction == 'horizontal') {
- swiper_height.value = props.dataHeight * custom_scale.value;
+ swiper_height.value = props.dataHeight * custom_scale.value + padding_top + padding_bottom + margin_bottom + margin_top;
} else {
- swiper_height.value = (props.dataHeight * custom_scale.value) * col + ((data_source_carousel_col - 1) * space_between.value);
+ swiper_height.value = (props.dataHeight * custom_scale.value + padding_top + padding_bottom + margin_bottom + margin_top) * col + ((data_source_carousel_col - 1) * space_between.value);
}
dot_list.value = Array(num);
// 更新轮播图的key,确保更换时能重新更新轮播图
diff --git a/src/components/model-carousel/model-carousel-styles.vue b/src/components/model-carousel/model-carousel-styles.vue
index 31436d54..ed30f05d 100644
--- a/src/components/model-carousel/model-carousel-styles.vue
+++ b/src/components/model-carousel/model-carousel-styles.vue
@@ -16,6 +16,10 @@