fix: TypeScript error in terminalStyle computed
This commit is contained in:
@@ -283,7 +283,7 @@ function stopResize() {
|
||||
nextTick(() => fitAddon?.fit())
|
||||
}
|
||||
|
||||
const terminalStyle = computed(() => {
|
||||
const terminalStyle = computed((): Record<string, string> => {
|
||||
// Mobile: bottom sheet with dynamic height
|
||||
if (isMobile.value) {
|
||||
// When keyboard is open, position above it
|
||||
@@ -304,15 +304,17 @@ const terminalStyle = computed(() => {
|
||||
}
|
||||
|
||||
// Desktop: floating window
|
||||
const base = {
|
||||
width: `${size.value.w}px`,
|
||||
height: `${size.value.h}px`
|
||||
}
|
||||
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 {
|
||||
...base,
|
||||
width: `${size.value.w}px`,
|
||||
height: `${size.value.h}px`,
|
||||
top: `${position.value.y}px`,
|
||||
left: `${position.value.x}px`,
|
||||
bottom: 'auto',
|
||||
|
||||
Reference in New Issue
Block a user