mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 05:00:03 +00:00
[TS] Fix ts-strict errors in Vue components (Part 3) (#3126)
This commit is contained in:
@@ -131,7 +131,7 @@ import MirrorsConfiguration from '@/components/install/MirrorsConfiguration.vue'
|
||||
import { electronAPI } from '@/utils/envUtil'
|
||||
import BaseViewTemplate from '@/views/templates/BaseViewTemplate.vue'
|
||||
|
||||
const device = ref<TorchDeviceType>(null)
|
||||
const device = ref<TorchDeviceType | null>(null)
|
||||
|
||||
const installPath = ref('')
|
||||
const pathError = ref('')
|
||||
|
||||
@@ -64,7 +64,7 @@ const { t } = useI18n()
|
||||
|
||||
const electron = electronAPI()
|
||||
|
||||
const basePath = ref<string>(null)
|
||||
const basePath = ref<string | null>(null)
|
||||
const sep = ref<'\\' | '/'>('/')
|
||||
|
||||
const restartApp = (message?: string) => electron.restartApp(message)
|
||||
|
||||
@@ -74,7 +74,7 @@ const updateProgress = ({ status: newStatus }: { status: ProgressStatus }) => {
|
||||
|
||||
const terminalCreated = (
|
||||
{ terminal, useAutoSize }: ReturnType<typeof useTerminal>,
|
||||
root: Ref<HTMLElement>
|
||||
root: Ref<HTMLElement | undefined>
|
||||
) => {
|
||||
xterm = terminal
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ const login = async () => {
|
||||
userStore.login(user)
|
||||
router.push('/')
|
||||
} catch (err) {
|
||||
loginError.value = err.message ?? JSON.stringify(err)
|
||||
loginError.value = err instanceof Error ? err.message : JSON.stringify(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ onMounted(async () => {
|
||||
|
||||
electronAPI().changeTheme({
|
||||
...(props.dark ? darkTheme : lightTheme),
|
||||
height: topMenuRef.value.getBoundingClientRect().height
|
||||
height: topMenuRef.value?.getBoundingClientRect().height ?? 0
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user