diff --git a/src/components/common/custom-module/model-icon/index.vue b/src/components/common/custom-module/model-icon/index.vue index b67d9074..62870ce1 100644 --- a/src/components/common/custom-module/model-icon/index.vue +++ b/src/components/common/custom-module/model-icon/index.vue @@ -48,10 +48,8 @@ const icon_class = computed(() => { // 不输入商品, 文章和品牌时,从外层处理数据 let icon = props.sourceList[form.data_source_id]; // 如果是商品,品牌,文章的图片, 其他的切换为从data中取数据 - if (['goods', 'article', 'brand'].includes(props.sourceType)) { - if (!isEmpty(props.sourceList.data)) { - icon = props.sourceList.data[form.data_source_id]; - } + if (['goods', 'article', 'brand'].includes(props.sourceType) && !isEmpty(props.sourceList.data)) { + icon = props.sourceList.data[form.data_source_id]; } return icon; } else { diff --git a/src/components/common/custom-module/model-icon/model-icon-style.vue b/src/components/common/custom-module/model-icon/model-icon-style.vue index 27ce1630..a0ef26a2 100644 --- a/src/components/common/custom-module/model-icon/model-icon-style.vue +++ b/src/components/common/custom-module/model-icon/model-icon-style.vue @@ -26,7 +26,7 @@ - + diff --git a/src/components/common/custom-module/model-image/index.vue b/src/components/common/custom-module/model-image/index.vue index e11e4318..5c7bad63 100644 --- a/src/components/common/custom-module/model-image/index.vue +++ b/src/components/common/custom-module/model-image/index.vue @@ -50,13 +50,11 @@ const img = computed(() => { // 不输入商品, 文章和品牌时,从外层处理数据 let image_url = props.sourceList[form.data_source_id]; // 如果是商品,品牌,文章的图片, 其他的切换为从data中取数据 - if (['goods', 'article', 'brand'].includes(props.sourceType)) { - if (!isEmpty(props.sourceList.data)) { - if (form.data_source_id == keyMap[props.sourceType]) { - image_url = !isEmpty(props.sourceList.new_cover)? props.sourceList.new_cover[0]?.url || '' : props.sourceList.data[keyMap[props.sourceType]]; - } else { - image_url = props.sourceList.data[form.data_source_id]; - } + if (['goods', 'article', 'brand'].includes(props.sourceType) && !isEmpty(props.sourceList.data)) { + if (form.data_source_id == keyMap[props.sourceType]) { + image_url = !isEmpty(props.sourceList.new_cover)? props.sourceList.new_cover[0]?.url || '' : props.sourceList.data[keyMap[props.sourceType]]; + } else { + image_url = props.sourceList.data[form.data_source_id]; } } return image_url; diff --git a/src/components/common/custom-module/model-image/model-image-style.vue b/src/components/common/custom-module/model-image/model-image-style.vue index 6c0f0a16..4c84de3c 100644 --- a/src/components/common/custom-module/model-image/model-image-style.vue +++ b/src/components/common/custom-module/model-image/model-image-style.vue @@ -26,7 +26,7 @@ - + diff --git a/src/components/common/custom-module/model-text/index.vue b/src/components/common/custom-module/model-text/index.vue index a95613ee..4b1e4c6f 100644 --- a/src/components/common/custom-module/model-text/index.vue +++ b/src/components/common/custom-module/model-text/index.vue @@ -52,14 +52,12 @@ const text_title = computed(() => { let text = ''; let text_title = props.sourceList[form.data_source_id]; // 如果是商品的标题或者是品牌的名称,需要判断是否有新的标题,没有的话就取原来的标题 - if (['goods', 'article', 'brand'].includes(props.sourceType)) { - if (!isEmpty(props.sourceList.data)) { - // 其他的切换为从data中取数据 - if (form.data_source_id == keyMap[props.sourceType]) { - text_title = !isEmpty(props.sourceList.new_title) ? props.sourceList.new_title : props.sourceList.data[keyMap[props.sourceType]]; - } else { - text_title = props.sourceList.data[form.data_source_id]; - } + if (['goods', 'article', 'brand'].includes(props.sourceType) && !isEmpty(props.sourceList.data)) { + // 其他的切换为从data中取数据 + if (form.data_source_id == keyMap[props.sourceType]) { + text_title = !isEmpty(props.sourceList.new_title) ? props.sourceList.new_title : props.sourceList.data[keyMap[props.sourceType]]; + } else { + text_title = props.sourceList.data[form.data_source_id]; } } if (!isEmpty(form.text_title)) { diff --git a/src/components/common/custom-module/model-text/model-text-style.vue b/src/components/common/custom-module/model-text/model-text-style.vue index 0a3cf66d..4c6662de 100644 --- a/src/components/common/custom-module/model-text/model-text-style.vue +++ b/src/components/common/custom-module/model-text/model-text-style.vue @@ -26,7 +26,7 @@ - + diff --git a/src/components/common/data-filter/index.vue b/src/components/common/data-filter/index.vue index 2d3c832d..c0a8c5c0 100644 --- a/src/components/common/data-filter/index.vue +++ b/src/components/common/data-filter/index.vue @@ -12,6 +12,9 @@