fix: 缓解调整字体时终端下方出现的空白问题

This commit is contained in:
Baobhan Sith
2025-05-05 09:33:48 +08:00
parent c1bfcf21ac
commit f31d5280e0
2 changed files with 56 additions and 18 deletions
@@ -39,6 +39,11 @@ const props = defineProps({
type: String as PropType<string | null>,
default: null,
},
// +++ Add layoutLocked prop +++
layoutLocked: {
type: Boolean,
default: false,
},
// Removed terminalManager prop definition
});
@@ -488,8 +493,10 @@ onMounted(() => {
<template v-if="layoutNode.type === 'container' && layoutNode.children && layoutNode.children.length > 0">
<splitpanes
:horizontal="layoutNode.direction === 'vertical'"
class="default-theme flex-grow"
:class="['default-theme flex-grow', { 'layout-locked': props.layoutLocked }]"
@resized="handlePaneResize"
:push-other-panes="false"
:dbl-click-splitter="!props.layoutLocked"
>
<pane
v-for="childNode in layoutNode.children"
@@ -756,5 +763,16 @@ onMounted(() => {
height: 1px !important;
}
/* --- Styles for Locked Layout --- */
.splitpanes.layout-locked .splitpanes__splitter {
pointer-events: none !important; /* Disable dragging */
cursor: default !important; /* Change cursor */
background-color: var(--border-color) !important; /* Ensure no hover effect */
}
.splitpanes.layout-locked .splitpanes__splitter:hover {
background-color: var(--border-color) !important; /* Override hover effect */
}
</style>