From e6c0c9c7114e29e1d2acb8490ac5b6f779d6b9fc 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:33 +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
---
components/diy/custom.vue | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/components/diy/custom.vue b/components/diy/custom.vue
index 8c55923c..2ee0e55b 100644
--- a/components/diy/custom.vue
+++ b/components/diy/custom.vue
@@ -1,7 +1,7 @@
-
+
@@ -9,7 +9,7 @@
-
+
@@ -34,13 +34,13 @@
-
+
-
+
@@ -223,17 +223,18 @@
let list = [];
if (['goods', 'article', 'brand'].includes(new_form.data_source)) {
if (new_form.data_source_content.data_type == '0') {
- list = new_form.data_source_content.data_list;
+ list = new_form.data_source_content?.data_list || [];
} else {
- list = new_form.data_source_content.data_auto_list.map(item => ({
- id: Math.random(),
- new_cover: [],
- new_title: '',
- data: item,
- }));
+ list = !isEmpty(new_form.data_source_content) ?
+ new_form.data_source_content.data_auto_list.map(item => ({
+ id: Math.random(),
+ new_cover: [],
+ new_title: '',
+ data: item,
+ })) : [];
}
} else {
- list = new_form.data_source_content.data_list;
+ list = new_form.data_source_content?.data_list || [];
}
const new_list = list.length > 0 ? this.get_list(list, new_form, new_style) : [];
const { margin_left = 0, margin_right = 0, padding_left = 0, padding_right = 0 } = new_style.common_style;