From 1324b84a37e58e9b5339e42eaa4c849e69e33db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Thu, 15 May 2025 16:25:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AE=E6=92=AD=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/model-carousel/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/model-carousel/index.vue b/src/components/model-carousel/index.vue index b3af0df5..eddf115d 100644 --- a/src/components/model-carousel/index.vue +++ b/src/components/model-carousel/index.vue @@ -185,9 +185,9 @@ const data_spacing = computed(() => { return ''; } }); - -const swiper_right_2 = computed(() => (swiper_Width.value - new_style.value.image_spacing) / 2 - new_style.value.data_left_spacing + 'px'); -const swiper_right_3 = computed(() => (swiper_Width.value - new_style.value.image_spacing) / 3 - new_style.value.data_left_spacing + 'px'); +// 模拟类似于右边固定大小的图片 +const swiper_right_2 = computed(() => (swiper_Width.value - new_style.value.image_spacing) / 2 - (new_style.value?.data_left_spacing || 0) + 'px'); +const swiper_right_3 = computed(() => (swiper_Width.value - new_style.value.image_spacing) / 3 - (new_style.value?.data_left_spacing || 0) + 'px'); const negative_swiper_right_2 = computed(() => '-' + swiper_right_2.value); const negative_swiper_right_3 = computed(() => '-' + swiper_right_3.value);