fix: TypeScript error in terminalStyle computed
This commit is contained in:
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user