mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 14:54:37 +00:00
[automated] Apply ESLint and Prettier fixes
This commit is contained in:
@@ -103,7 +103,7 @@ function normalizeWidgetValue(value: unknown): WidgetValue {
|
||||
if (
|
||||
Array.isArray(value) &&
|
||||
value.length > 0 &&
|
||||
value.every((item): item is File => item instanceof File)
|
||||
value.every((item): item is File => item instanceof File)
|
||||
) {
|
||||
return value
|
||||
}
|
||||
@@ -115,14 +115,14 @@ function normalizeWidgetValue(value: unknown): WidgetValue {
|
||||
return undefined
|
||||
}
|
||||
|
||||
function getControlWidget(widget: IBaseWidget): (() => Ref<ControlOptions>)|undefined {
|
||||
function getControlWidget(
|
||||
widget: IBaseWidget
|
||||
): (() => Ref<ControlOptions>) | undefined {
|
||||
const cagWidget = widget.linkedWidgets?.find(
|
||||
(w) => w.name == 'control_after_generate'
|
||||
)
|
||||
if (!cagWidget) return
|
||||
const cagRef = ref<ControlOptions>(
|
||||
normalizeControlOption(cagWidget.value)
|
||||
)
|
||||
const cagRef = ref<ControlOptions>(normalizeControlOption(cagWidget.value))
|
||||
watch(cagRef, (value) => {
|
||||
cagWidget.value = normalizeControlOption(value)
|
||||
cagWidget.callback?.(cagWidget.value)
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<WidgetLayoutField :widget>
|
||||
<div class="relative">
|
||||
<Select
|
||||
v-model="modelValue"
|
||||
:invalid
|
||||
:filter="selectOptions.length > 4"
|
||||
:auto-filter-focus="selectOptions.length > 4"
|
||||
:options="selectOptions"
|
||||
v-bind="combinedProps"
|
||||
:class="cn(WidgetInputBaseClass, 'w-full text-xs')"
|
||||
:aria-label="widget.name"
|
||||
size="small"
|
||||
:pt="{
|
||||
option: 'text-xs',
|
||||
dropdown: 'w-8',
|
||||
label: cn('truncate min-w-[4ch]', slots.default && 'mr-5'),
|
||||
overlay: 'w-fit min-w-full'
|
||||
}"
|
||||
data-capture-wheel="true"
|
||||
/>
|
||||
<Select
|
||||
v-model="modelValue"
|
||||
:invalid
|
||||
:filter="selectOptions.length > 4"
|
||||
:auto-filter-focus="selectOptions.length > 4"
|
||||
:options="selectOptions"
|
||||
v-bind="combinedProps"
|
||||
:class="cn(WidgetInputBaseClass, 'w-full text-xs')"
|
||||
:aria-label="widget.name"
|
||||
size="small"
|
||||
:pt="{
|
||||
option: 'text-xs',
|
||||
dropdown: 'w-8',
|
||||
label: cn('truncate min-w-[4ch]', slots.default && 'mr-5'),
|
||||
overlay: 'w-fit min-w-full'
|
||||
}"
|
||||
data-capture-wheel="true"
|
||||
/>
|
||||
<div class="absolute top-5 right-8 h-4 w-7 -translate-y-4/5">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -68,7 +68,6 @@ export interface SimplifiedWidget<
|
||||
spec?: InputSpecV2
|
||||
|
||||
controlWidget?: () => Ref<ControlOptions>
|
||||
|
||||
}
|
||||
export type SimplifiedControlWidget<T extends WidgetValue = WidgetValue> =
|
||||
SimplifiedWidget<T> & Required<Pick<SimplifiedWidget<T>, 'controlWidget'>>
|
||||
|
||||
Reference in New Issue
Block a user