fix: TypeScript error in terminalStyle computed

This commit is contained in:
2026-02-14 03:57:30 -06:00
parent 082616cb1c
commit edc96da4ed

View File

@@ -283,7 +283,7 @@ function stopResize() {
nextTick(() => fitAddon?.fit()) nextTick(() => fitAddon?.fit())
} }
const terminalStyle = computed(() => { const terminalStyle = computed((): Record<string, string> => {
// Mobile: bottom sheet with dynamic height // Mobile: bottom sheet with dynamic height
if (isMobile.value) { if (isMobile.value) {
// When keyboard is open, position above it // When keyboard is open, position above it
@@ -304,15 +304,17 @@ const terminalStyle = computed(() => {
} }
// Desktop: floating window // Desktop: floating window
const base = {
width: `${size.value.w}px`,
height: `${size.value.h}px`
}
if (!hasCustomPosition.value) { if (!hasCustomPosition.value) {
return { ...base, bottom: '16px', right: '16px' } return {
width: `${size.value.w}px`,
height: `${size.value.h}px`,
bottom: '16px',
right: '16px'
}
} }
return { return {
...base, width: `${size.value.w}px`,
height: `${size.value.h}px`,
top: `${position.value.y}px`, top: `${position.value.y}px`,
left: `${position.value.x}px`, left: `${position.value.x}px`,
bottom: 'auto', bottom: 'auto',