From 4dad15f548c8ee421d774098e34bdc487ed97f86 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, 26 Feb 2025 14:45:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/modules/custom/data-group-rendering.vue | 2 +- components/diy/modules/custom/data-rendering.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/diy/modules/custom/data-group-rendering.vue b/components/diy/modules/custom/data-group-rendering.vue index f9e85d42..e5a9e423 100644 --- a/components/diy/modules/custom/data-group-rendering.vue +++ b/components/diy/modules/custom/data-group-rendering.vue @@ -120,7 +120,7 @@ export default { return (num, data_follow, type, is_auto = '0', max_size = 0) => { // 检查类型是否为'left'或'top',如果是,则根据跟随数据计算样式 if (['left', 'top'].includes(type)) { - const { id = '', type: follow_type = 'left' } = data_follow; + const { id = '', type: follow_type = 'left' } = data_follow || { id: '', type: 'left' }; // 如果id不为空且follow_type与type匹配,则返回原始值的字符串表示 if (id !== '' && follow_type === type) { return `${num}px`; diff --git a/components/diy/modules/custom/data-rendering.vue b/components/diy/modules/custom/data-rendering.vue index bdf44fb6..4ffa05a3 100644 --- a/components/diy/modules/custom/data-rendering.vue +++ b/components/diy/modules/custom/data-rendering.vue @@ -131,7 +131,7 @@ export default { return (num, data_follow, type, is_auto = '0', max_size = 0) => { // 检查类型是否为'left'或'top',如果是,则根据跟随数据计算样式 if (['left', 'top'].includes(type)) { - const { id = '', type: follow_type = 'left' } = data_follow; + const { id = '', type: follow_type = 'left' } = data_follow || { id: '', type: 'left' }; // 如果id不为空且follow_type与type匹配,则返回原始值的字符串表示 if (id !== '' && follow_type === type) { return `${num}px`;