历史记录修改

v1.2.0
于肖磊 2025-01-14 09:38:04 +08:00
parent 53db2e39f4
commit 34bbad0b3c
1 changed files with 3 additions and 2 deletions

View File

@ -297,7 +297,7 @@ const del = (index: null | number) => {
message: '删除成功!',
});
const show_tabs_index = diy_data.value.findIndex((item: any) => item.show_tabs == '1');
operation_end(get_history_name(diy_data.value.find((item: any) => item.show_tabs == '1')));
const new_name = get_history_name(cloneDeep(diy_data.value[show_tabs_index == -1 ? 0 : show_tabs_index]));
//
if (show_tabs_index == index) {
//
@ -316,6 +316,7 @@ const del = (index: null | number) => {
diy_data.value.splice(index, 1);
}
select_index.value = diy_data.value.length > 0 ? select_index.value : null;
operation_end(new_name);
});
}
};
@ -525,11 +526,11 @@ const drop = (event: any) => {
const dragEndHandle = (item: any, index: number) => {
const old_location = diy_data.value[index].location;
const new_location = { x: item.x, y: item.y, record_x: item.x, record_y: item.y, staging_y: item.y };
diy_data.value[index].location = new_location;
//
if (!isEqual(old_location, new_location)) {
operation_end(get_history_name(diy_data.value[index]));
}
diy_data.value[index].location = new_location;
};
// {x: number, y: number, w: number, h: number}
const resizingHandle = (new_location: any, key: string, index: number, type: string) => {