From 836bdeade389f49659986a6bd0b9ac1dfbf8fcf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Thu, 14 Nov 2024 11:50:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E9=AD=94?= =?UTF-8?q?=E6=96=B9=E5=92=8C=E8=87=AA=E5=AE=9A=E4=B9=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/model-custom/model-custom-content.vue | 2 +- src/components/model-data-magic/components/custom/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/model-custom/model-custom-content.vue b/src/components/model-custom/model-custom-content.vue index 0f4a0194..12e3c060 100644 --- a/src/components/model-custom/model-custom-content.vue +++ b/src/components/model-custom/model-custom-content.vue @@ -114,7 +114,7 @@ onBeforeMount(() => { if (!Object.keys(form.data_source_content).includes('data_auto_list') && !Object.keys(form.data_source_content).includes('data_list')) { form.data_source_content.data_list = [ form.data_source_content ]; } - if (!isEmpty(form.data_source) && form.data_source in source_list) { + if (!isEmpty(form.data_source) && typeof form.data_source_content_value == 'string' && form.data_source in source_list) { form.data_source_content_value = source_list[form.data_source as keyof typeof source_list]; } if (!data_source_store.is_data_source_api) { diff --git a/src/components/model-data-magic/components/custom/index.vue b/src/components/model-data-magic/components/custom/index.vue index eaaa6511..ff198c30 100644 --- a/src/components/model-data-magic/components/custom/index.vue +++ b/src/components/model-data-magic/components/custom/index.vue @@ -133,7 +133,7 @@ watchEffect(() => { form.value = props.value.data_content; new_style.value = props.value.data_style; - const { padding_left, padding_right } = new_style.value.chunk_padding; + const { padding_left, padding_right } = new_style.value.data_chunk_padding; const { margin_left, margin_right } = new_style.value.data_chunk_margin; // 当前容器的宽度 减去 左右两边的padding值 再减去 数据间距的一半 再除以 容器的宽度 得到比例 再乘以数据魔方的比例 const width = form.value.width - padding_left - padding_right - margin_left - margin_right - (props.dataSpacing / 2);