From 8357194fbe2dd2aed3834be518e6e9768b71a488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 13 Dec 2024 17:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=9B=BE=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=96=B0?= 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 b4055af4..e0967348 100644 --- a/src/components/model-carousel/index.vue +++ b/src/components/model-carousel/index.vue @@ -287,8 +287,8 @@ const swiper_bg_style = computed(() => { return ''; } const style = form.value?.carousel_list?.[actived_index.value]?.style; - if (style && !isEmpty(style.color_list)) { - const color_list = style.color_list; + if (style && !isEmpty(style?.color_list)) { + const color_list = style?.color_list || []; const list = color_list.filter((item: { color: string }) => !isEmpty(item.color)); if (list.length > 0) { try { @@ -306,7 +306,7 @@ const swiper_bg_img_style = computed(() => { if (!props.isCommon) { return ''; } - if (!isEmpty(form.value.carousel_list[actived_index.value].style.background_img)) { + if (!isEmpty(form.value.carousel_list[actived_index.value]?.style?.background_img)) { return background_computer(form.value.carousel_list[actived_index.value].style); } return '';