chore: bug fix #20

This commit is contained in:
engigu
2026-04-07 22:25:28 +08:00
parent 90ec815a69
commit 02b26d6e06
3 changed files with 25 additions and 4 deletions
+9 -1
View File
@@ -36,6 +36,13 @@ let historyIndex = -1
const statusMessage = ref<{ text: string; type: 'success' | 'error' | 'info' } | null>(null)
watch(() => props.fontSize, (newVal) => {
if (terminal && newVal) {
terminal.options.fontSize = newVal
handleResize()
}
})
watch(statusMessage, (newVal) => {
emit('status-change', newVal)
})
@@ -65,7 +72,8 @@ function initTerminal(forceConnect = false) {
terminal = new Terminal({
cursorBlink: true,
fontSize: props.fontSize,
fontFamily: 'Consolas, Monaco, monospace',
lineHeight: 1.15,
fontFamily: 'Consolas, Monaco, "Courier New", monospace',
theme: {
background: '#1e1e1e',
foreground: '#d4d4d4',