added custom content

This commit is contained in:
Mamalizz
2025-02-18 23:40:06 +03:30
parent 2d268801ed
commit abde29cfe3
+4 -2
View File
@@ -6,7 +6,7 @@ type Props = {
disabled?: boolean; disabled?: boolean;
modelValue: string; modelValue: string;
error?: boolean; error?: boolean;
options: string[]; options?: string[];
placeholder?: string; placeholder?: string;
triggerRootClass?: string; triggerRootClass?: string;
}; };
@@ -71,7 +71,9 @@ const classes = computed(() => {
:side-offset="5" :side-offset="5"
> >
<SelectViewport class="p-[5px]"> <SelectViewport class="p-[5px]">
<SelectGroup> <slot v-if="!!$slots.content" name="content" />
<SelectGroup v-else>
<SelectItem <SelectItem
v-for="(option, index) in options" v-for="(option, index) in options"
:key="index" :key="index"