mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-02 11:40:00 +00:00
Selection toolbox color picker button (#2637)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -34,15 +34,20 @@ import ColorPicker from 'primevue/colorpicker'
|
||||
import SelectButton from 'primevue/selectbutton'
|
||||
import { computed, onMounted, ref, watch } from 'vue'
|
||||
|
||||
const { modelValue, colorOptions } = defineProps<{
|
||||
const {
|
||||
modelValue,
|
||||
colorOptions,
|
||||
allowCustom = true
|
||||
} = defineProps<{
|
||||
modelValue: string | null
|
||||
colorOptions: { name: Exclude<string, '_custom'>; value: string }[]
|
||||
allowCustom?: boolean
|
||||
}>()
|
||||
|
||||
const customColorOption = { name: '_custom', value: '' }
|
||||
const colorOptionsWithCustom = computed(() => [
|
||||
...colorOptions,
|
||||
customColorOption
|
||||
...(allowCustom ? [customColorOption] : [])
|
||||
])
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
||||
Reference in New Issue
Block a user