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;