更新提示数据

v1.2.0
于肖磊 2025-02-26 18:16:06 +08:00
parent e43c2cc77d
commit de14881d40
2 changed files with 4 additions and 4 deletions

View File

@ -1136,14 +1136,14 @@ const handleKeyUp = (e: KeyboardEvent) => {
if (isWithinBounds(item.location.x + x, item.com_data.com_width, 390) && (id === '' || (id != '' && type == 'top'))) {
item.location.x += x;
} else if (id != '' && type == 'left' && x !== 0) {
ElMessage.info('当前组件已经左跟随其他组件x轴不允许修改');
ElMessage.warning('当前组件已经左跟随其他组件x轴不允许修改');
}
// Y0
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;
} else if (id != '' && type == 'top' && y !== 0) {
ElMessage.info('当前组件已经上跟随其他组件y轴不允许修改');
ElMessage.warning('当前组件已经上跟随其他组件y轴不允许修改');
}
operation_end(get_history_name(item));
}

View File

@ -897,12 +897,12 @@ export const new_location_handle = (old_location: Location, data_follow: DataFol
if (data_follow.id != '') {
if (data_follow.type == 'left') {
if (old_location.x !== x) {
ElMessage.info('当前组件已经左跟随其他组件x轴不允许修改');
ElMessage.warning('当前组件已经左跟随其他组件x轴不允许修改');
}
new_y = y;
} else if (data_follow.type == 'top') {
if (old_location.y !== y) {
ElMessage.info('当前组件已经上跟随其他组件y轴不允许修改');
ElMessage.warning('当前组件已经上跟随其他组件y轴不允许修改');
}
new_x = x;
}