mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
[fix] Fix WidgetSelect component for combo widgets
- Add options prop to PrimeVue Select component - Extract options from widget.options.values array - Remove unnecessary debug comments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,12 @@
|
|||||||
<label v-if="widget.name" class="text-sm opacity-80">{{
|
<label v-if="widget.name" class="text-sm opacity-80">{{
|
||||||
widget.name
|
widget.name
|
||||||
}}</label>
|
}}</label>
|
||||||
<Select v-model="value" v-bind="filteredProps" :disabled="readonly" />
|
<Select
|
||||||
|
v-model="value"
|
||||||
|
:options="selectOptions"
|
||||||
|
v-bind="filteredProps"
|
||||||
|
:disabled="readonly"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -27,4 +32,15 @@ const props = defineProps<{
|
|||||||
const filteredProps = computed(() =>
|
const filteredProps = computed(() =>
|
||||||
filterWidgetProps(props.widget.options, PANEL_EXCLUDED_PROPS)
|
filterWidgetProps(props.widget.options, PANEL_EXCLUDED_PROPS)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Extract select options from widget options
|
||||||
|
const selectOptions = computed(() => {
|
||||||
|
const options = props.widget.options
|
||||||
|
|
||||||
|
if (options?.values && Array.isArray(options.values)) {
|
||||||
|
return options.values
|
||||||
|
}
|
||||||
|
|
||||||
|
return []
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user