mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 08:44:06 +00:00
- WidgetSelect: Dropdown selection with Select component - WidgetMultiSelect: Multiple selection with MultiSelect component - WidgetSelectButton: Button group selection with SelectButton component - WidgetTreeSelect: Hierarchical selection with TreeSelect component
31 lines
760 B
Vue
31 lines
760 B
Vue
<template>
|
|
<div class="flex flex-col gap-1">
|
|
<label v-if="widget.name" class="text-sm opacity-80">{{
|
|
widget.name
|
|
}}</label>
|
|
<SelectButton v-model="value" v-bind="filteredProps" :disabled="readonly" />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import SelectButton from 'primevue/selectbutton'
|
|
import { computed } from 'vue'
|
|
|
|
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
|
|
import {
|
|
STANDARD_EXCLUDED_PROPS,
|
|
filterWidgetProps
|
|
} from '@/utils/widgetPropFilter'
|
|
|
|
const value = defineModel<any>({ required: true })
|
|
|
|
const props = defineProps<{
|
|
widget: SimplifiedWidget<any>
|
|
readonly?: boolean
|
|
}>()
|
|
|
|
const filteredProps = computed(() =>
|
|
filterWidgetProps(props.widget.options, STANDARD_EXCLUDED_PROPS)
|
|
)
|
|
</script>
|