mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-07 14:30:15 -03:00
fix(vue-widgets): resolve pre-existing typecheck errors
This commit is contained in:
@@ -98,7 +98,7 @@ interface LoraInfoWidget {
|
||||
onSetValue?: (v: unknown) => void
|
||||
callback?: unknown
|
||||
options?: {
|
||||
getValue?: () => LoraInfoWidgetValue
|
||||
getValue?: () => unknown
|
||||
setValue?: (v: unknown) => void
|
||||
}
|
||||
node?: { widgets?: Array<{ id?: string }>; widgets_values?: Array<unknown> }
|
||||
@@ -299,8 +299,12 @@ onMounted(() => {
|
||||
|
||||
// ComponentWidgetImpl.value getter/setter delegates to options.getValue/options.setValue.
|
||||
// These must be set for workflow JSON persistence (LGraphNode.serialize/configure) to work.
|
||||
props.widget.options.getValue = buildValue
|
||||
props.widget.options.setValue = applyValue
|
||||
if (props.widget.options) {
|
||||
props.widget.options.getValue = buildValue
|
||||
props.widget.options.setValue = applyValue
|
||||
} else {
|
||||
console.warn('[LoraInfoWidget] widget.options missing, value persistence disabled')
|
||||
}
|
||||
|
||||
// Also set serializeValue for prompt/API serialization path (executionUtil.ts)
|
||||
props.widget.serializeValue = async () => buildValue()
|
||||
|
||||
@@ -36,6 +36,9 @@ const AUTOCOMPLETE_TEXT_MIN_HEIGHT_DEFAULT = 300
|
||||
const AUTOCOMPLETE_METADATA_VERSION = 1
|
||||
const LORA_MANAGER_WIDGET_IDS_PROPERTY = '__lm_widget_ids'
|
||||
|
||||
// Access LiteGraph global for Vue DOM mode detection (matches AutocompleteTextWidget.vue)
|
||||
declare const LiteGraph: { vueNodesMode?: boolean } | undefined
|
||||
|
||||
// @ts-ignore - ComfyUI external module
|
||||
import { app } from '../../../scripts/app.js'
|
||||
// @ts-ignore - ComfyUI external module
|
||||
@@ -835,7 +838,7 @@ function createAutocompleteTextWidgetFactory(
|
||||
applyAutocompleteTextLayoutFix(
|
||||
widget,
|
||||
container,
|
||||
typeof LiteGraph !== 'undefined' && LiteGraph.vueNodesMode
|
||||
typeof LiteGraph !== 'undefined' && LiteGraph.vueNodesMode === true
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user