diff --git a/src/components/common/ComfyImage.vue b/src/components/common/ComfyImage.vue index aa6a66c55..351d1cde4 100644 --- a/src/components/common/ComfyImage.vue +++ b/src/components/common/ComfyImage.vue @@ -38,7 +38,10 @@ const { alt = 'Image content' } = defineProps<{ src: string - class?: any + class?: + | string + | Record + | (string | Record)[] contain?: boolean alt?: string }>() diff --git a/src/components/common/DeviceInfo.vue b/src/components/common/DeviceInfo.vue index 8e00fd16b..ab141cfbc 100644 --- a/src/components/common/DeviceInfo.vue +++ b/src/components/common/DeviceInfo.vue @@ -28,13 +28,17 @@ const deviceColumns: { field: keyof DeviceStats; header: string }[] = [ { field: 'torch_vram_free', header: 'Torch VRAM Free' } ] -const formatValue = (value: any, field: string) => { +const formatValue = (value: string | number, field: string) => { if ( ['vram_total', 'vram_free', 'torch_vram_total', 'torch_vram_free'].includes( field ) ) { - return formatSize(value) + const num = Number(value) + if (Number.isFinite(num)) { + return formatSize(num) + } + return value } return value } diff --git a/src/components/common/FormItem.vue b/src/components/common/FormItem.vue index 011f80753..b2161b2e7 100644 --- a/src/components/common/FormItem.vue +++ b/src/components/common/FormItem.vue @@ -47,7 +47,7 @@ import InputSlider from '@/components/common/InputSlider.vue' import UrlInput from '@/components/common/UrlInput.vue' import type { FormItem } from '@/platform/settings/types' -const formValue = defineModel('formValue') +const formValue = defineModel('formValue') const props = defineProps<{ item: FormItem id?: string @@ -61,7 +61,7 @@ function getFormAttrs(item: FormItem) { attrs['renderFunction'] = () => inputType( props.item.name, - (v: any) => (formValue.value = v), + (v: unknown) => (formValue.value = v), formValue.value, item.attrs ) diff --git a/src/components/common/FormRadioGroup.vue b/src/components/common/FormRadioGroup.vue index 6155bed0f..607a3c407 100644 --- a/src/components/common/FormRadioGroup.vue +++ b/src/components/common/FormRadioGroup.vue @@ -20,14 +20,14 @@ -