From 0a59b5e6828504764c6fdef014473096bc3897b0 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 16:41:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E5=B7=A6=E5=8F=B3=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/model-custom/components/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/model-custom/components/index.vue b/src/components/model-custom/components/index.vue index c8c75414..a2cb52a7 100644 --- a/src/components/model-custom/components/index.vue +++ b/src/components/model-custom/components/index.vue @@ -1092,12 +1092,13 @@ const handleKeyUp = (e: KeyboardEvent) => { diy_data.value.forEach(item => { // 只更新选中的数据 if (item.show_tabs == '1') { + const { id = '', type = 'left' } = item.com_data?.data_follow || { id: '', type: 'left' }; // x 轴不小于0 并且不大于容器宽度 - if (isWithinBounds(item.location.x + x, item.com_data.com_width, 390)) { + if (isWithinBounds(item.location.x + x, item.com_data.com_width, 390) && (id === '' || (id != '' && type == 'top'))) { item.location.x += x; } // Y轴不小于0 并且不大于容器高度 - if (isWithinBounds(item.location.y + y, item.com_data.com_height, center_height.value)) { + if (isWithinBounds(item.location.y + y, item.com_data.com_height, center_height.value) && (id === '' || (id != '' && type == 'left'))) { item.location.y += y; item.location.staging_y += y; }