From 794064e4adfbbce79b26fa0bca4e19cd3d74eaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Wed, 13 Nov 2024 18:46:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model-icon/model-icon-style.vue | 15 +++++++++++++-- .../model-image/model-image-style.vue | 17 +++++++++++++++-- .../model-text/model-text-style.vue | 17 +++++++++++++++-- 3 files changed, 43 insertions(+), 6 deletions(-) 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 221bcc24..83e3c07d 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 @@ -22,7 +22,12 @@ - + + + + + + @@ -130,7 +135,13 @@ const icon_change = (key: string) => { form.value.data_source_id = ''; } }; - +const link_change = (key: string) => { + if (key == '2') { + form.value.icon_link = ''; + } else { + form.value.data_source_link = ''; + } +}; const mult_color_picker_event = (arry: color_list[], type: number) => { form.value.color_list = arry; form.value.direction = type.toString(); 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 f1f49ec3..0d6694e7 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 @@ -22,7 +22,12 @@ - + + + + + + @@ -96,7 +101,7 @@ const img_radius_change = (radius: any) => { const border_radius_change = (radius: any) => { form.value.border_radius = Object.assign(form.value.border_radius, pick(radius, ['radius', 'radius_top_left', 'radius_top_right', 'radius_bottom_left', 'radius_bottom_right'])); }; - +// 数据字段切换时,更新另外一个数据 const img_src_change = (key: string) => { if (key == '2') { form.value.img = []; @@ -104,6 +109,14 @@ const img_src_change = (key: string) => { form.value.data_source_id = ''; } } +// 数据链接字段切换时,更新另外一个数据 +const img_link_change = (key: string) => { + if (key == '2') { + form.value.link = ''; + } else { + form.value.data_source_link = ''; + } +} // x轴变化时,更新记录的位置 const location_x_change = (val: number) => { 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 b09a4820..9e47b67e 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 @@ -22,7 +22,12 @@ - + + + + + + @@ -151,7 +156,7 @@ onBeforeMount(() => { form.value.line_text_size = form.value.text_size; } }); - +// 数据字段切换时,更新另外一个数据 const text_change = (key: string) => { if (key == '2') { form.value.text_title = ''; @@ -159,6 +164,14 @@ const text_change = (key: string) => { form.value.data_source_id = ''; } }; +// 数据字段切换时,更新另外一个数据 +const text_link_change = (key: string) => { + if (key == '2') { + form.value.text_link = ''; + } else { + form.value.data_source_link = ''; + } +}; // 文字大小变化时,同步更新行间距 const text_size_change = (size: number) => { form.value.line_text_size = size;