From 71aad8dacb8e9b53bd720eeb3e6407459042d122 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Tue, 10 Dec 2024 17:21:48 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E5=AE=B9=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/custom-module/model-icon/index.vue | 2 +-
src/components/common/custom-module/model-image/index.vue | 2 +-
src/components/common/custom-module/model-text/index.vue | 4 ++--
.../common/custom-module/model-text/model-text-style.vue | 5 ++++-
src/components/common/data-filter/index.vue | 8 ++++----
src/components/common/url-value/link-articles.vue | 2 +-
src/components/common/url-value/link-brand.vue | 2 +-
src/components/common/url-value/link-coupon.vue | 2 +-
src/components/common/url-value/link-goods.vue | 4 ++--
src/components/common/url-value/url-value-dialog.vue | 4 ++--
src/components/model-coupon/model-coupon-content.vue | 2 +-
src/components/model-custom/components/index.vue | 6 +++---
12 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/src/components/common/custom-module/model-icon/index.vue b/src/components/common/custom-module/model-icon/index.vue
index 82645434..ee37d3de 100644
--- a/src/components/common/custom-module/model-icon/index.vue
+++ b/src/components/common/custom-module/model-icon/index.vue
@@ -48,7 +48,7 @@ const icon_class = computed(() => {
if (!isEmpty(props.sourceList)) {
let icon = '';
// 取出数据源ID
- const data_source_id = !isEmpty(form.value?.data_source_field?.id || '') ? form.value?.data_source_field?.id : form.value.data_source_id;
+ const data_source_id = !isEmpty(form.value?.data_source_field?.id || '') ? form.value?.data_source_field?.id : '';
// 数据源内容
const option = form.value?.data_source_field?.option || {};
if (data_source_id.includes(';')) {
diff --git a/src/components/common/custom-module/model-image/index.vue b/src/components/common/custom-module/model-image/index.vue
index 57fb9e1c..8cc346e0 100644
--- a/src/components/common/custom-module/model-image/index.vue
+++ b/src/components/common/custom-module/model-image/index.vue
@@ -47,7 +47,7 @@ const img = computed(() => {
if (!isEmpty(props.sourceList)) {
let image_url = '';
// 取出数据源ID
- const data_source_id = !isEmpty(form.value?.data_source_field?.id || '') ? form.value?.data_source_field?.id : form.value.data_source_id;
+ const data_source_id = !isEmpty(form.value?.data_source_field?.id || '') ? form.value?.data_source_field?.id : '';
// 数据源内容
const option = form.value?.data_source_field?.option || {};
// 如果是商品,品牌,文章的图片, 其他的切换为从data中取数据
diff --git a/src/components/common/custom-module/model-text/index.vue b/src/components/common/custom-module/model-text/index.vue
index 1f0f86b4..24d98ed2 100644
--- a/src/components/common/custom-module/model-text/index.vue
+++ b/src/components/common/custom-module/model-text/index.vue
@@ -73,9 +73,9 @@ const text_title = computed(() => {
}
}
// 获取数据源ID
- const data_source_id = !isEmpty(formValue?.data_source_field?.id || '') ? formValue?.data_source_field?.id : [ formValue.data_source_id ];
+ const data_source_id = !isEmpty(formValue?.data_source_field?.id || []) ? formValue?.data_source_field?.id : [];
// 数据源内容
- const option = formValue?.data_source_field?.option || {};
+ const option = formValue?.data_source_field?.option || [];
// 文本信息
let text_title = '';
try {
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 ce3ff211..4c1ad72f 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
@@ -163,7 +163,10 @@ const text_change = (key: string) => {
if (form.value.data_source_field.id.length > 0) {
form.value.data_source_field.option = props.options.filter((item) => item.type == 'text' && form.value.data_source_field.id.includes(item.field))
} else {
- form.value.data_source_field = get_data_fields([], 'text', '');
+ form.value.data_source_field = {
+ id: [],
+ option: [],
+ };
}
} else {
// 如果没有数据,就赋值为空
diff --git a/src/components/common/data-filter/index.vue b/src/components/common/data-filter/index.vue
index 04321621..8146098b 100644
--- a/src/components/common/data-filter/index.vue
+++ b/src/components/common/data-filter/index.vue
@@ -16,12 +16,12 @@