From 4c1539a41562dfba3d4d83802ee39ec08c8d2181 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, 21 Jan 2025 11:44:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model-custom/components/custom-config/index.vue | 7 +++++-- src/components/model-custom/components/index.vue | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/model-custom/components/custom-config/index.vue b/src/components/model-custom/components/custom-config/index.vue index e4fe0fdd..960f4375 100644 --- a/src/components/model-custom/components/custom-config/index.vue +++ b/src/components/model-custom/components/custom-config/index.vue @@ -201,10 +201,13 @@ const operation_end = (title:string, is_compare: boolean = true) => { let old_compare_data = {}; if (props.configType == 'custom') { old_index = data_source_store.custom_records_index; - old_compare_data = cloneDeep(data_source_store.custom_records[old_index].value) || {}; + old_compare_data = cloneDeep(data_source_store?.custom_records[old_index]?.value || {}) || {}; } else { old_index = data_source_store.custom_group_records_index; - old_compare_data = cloneDeep(data_source_store.custom_group_records[old_index].value) || {}; + old_compare_data = cloneDeep(data_source_store?.custom_group_records[old_index]?.value || {}) || {}; + } + if (old_index == -1) { + return; } // 新的数据 const new_compare_data = cloneDeep(draglist.value.diy_data); diff --git a/src/components/model-custom/components/index.vue b/src/components/model-custom/components/index.vue index e0fed0c2..1fd0c1bf 100644 --- a/src/components/model-custom/components/index.vue +++ b/src/components/model-custom/components/index.vue @@ -721,6 +721,7 @@ const start_drag_area_box = (index: number, event: MouseEvent) => { const { x, y } = cloneDeep(item.location); item.location.record_x = x; item.location.record_y = y; + item.location.staging_y = y; } }); if (hot_list?.data.length > 0) {