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) {