From 10a0f58ed6604b0d6b2489d433f6f0ecad10bd72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Mon, 25 Nov 2024 09:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/model-custom/index.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/model-custom/index.vue b/src/components/model-custom/index.vue index 758d2ac5..e12bcd20 100644 --- a/src/components/model-custom/index.vue +++ b/src/components/model-custom/index.vue @@ -108,17 +108,18 @@ const style_chunk_img_container = computed(() => common_img_computer(new_style.v let data_source_content_list = computed(() => { if (['goods', 'article', 'brand'].includes(form.value.data_source)) { if (form.value.data_source_content.data_type == '0') { - return form.value.data_source_content.data_list; + return form.value.data_source_content?.data_list || []; } else { - return form.value.data_source_content.data_auto_list.map((item: any) => ({ - id: Math.random(), - new_cover: [], - new_title: '', - data: item, - })); + return !isEmpty(form.value.data_source_content) ? + form.value.data_source_content.data_auto_list.map((item: any) => ({ + id: Math.random(), + new_cover: [], + new_title: '', + data: item, + })) : []; } } else { - return form.value.data_source_content.data_list; + return form.value.data_source_content?.data_list || []; } }) //#region 轮播图