[TS] Fix ts-strict errors in Vue components (Part 2) (#3123)

Co-authored-by: Christian Byrne <cbyrne@comfy.org>
This commit is contained in:
Chenlei Hu
2025-03-18 10:51:23 -04:00
committed by GitHub
parent 0a6d3c0231
commit e8997a7653
19 changed files with 76 additions and 49 deletions

View File

@@ -89,7 +89,7 @@ eventBus.on((event: string, payload: any) => {
onMounted(() => {
if (isElectron()) {
electronAPI().changeTheme({
height: topMenuRef.value.getBoundingClientRect().height
height: topMenuRef.value?.getBoundingClientRect().height ?? 0
})
}
})

View File

@@ -68,7 +68,7 @@ const workspaceStore = useWorkspaceStore()
const workflowStore = useWorkflowStore()
const workflowService = useWorkflowService()
const workflowBookmarkStore = useWorkflowBookmarkStore()
const rightClickedTab = ref<WorkflowOption>(null)
const rightClickedTab = ref<WorkflowOption | undefined>()
const menu = ref()
const workflowToOption = (workflow: ComfyWorkflow): WorkflowOption => ({
@@ -114,7 +114,7 @@ const onCloseWorkflow = (option: WorkflowOption) => {
closeWorkflows([option])
}
const showContextMenu = (event, option) => {
const showContextMenu = (event: MouseEvent, option: WorkflowOption) => {
rightClickedTab.value = option
menu.value.show(event)
}