File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/ui/components/FaSelect Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
2+ import type { AcceptableValue } from ' reka-ui'
23import type { HTMLAttributes } from ' vue'
34import { cn } from ' @/utils'
45import {
@@ -18,13 +19,13 @@ const props = defineProps<{
1819 disabled? : boolean
1920 options: {
2021 label: string
21- value: string
22+ value: AcceptableValue
2223 disabled? : boolean
2324 }[]
2425 class? : HTMLAttributes [' class' ]
2526}>()
2627
27- const value = defineModel <string >()
28+ const value = defineModel <AcceptableValue >()
2829
2930const selectedOption = computed ({
3031 get() {
@@ -43,7 +44,7 @@ const selectedOption = computed({
4344 </SelectTrigger >
4445 <SelectContent >
4546 <SelectGroup >
46- <SelectItem v-for =" option in options" :key =" option.value " :value =" option.value" :disabled =" option.disabled" >
47+ <SelectItem v-for =" ( option, index) in options" :key =" index " :value =" option.value" :disabled =" option.disabled" >
4748 {{ option.label }}
4849 </SelectItem >
4950 </SelectGroup >
You can’t perform that action at this time.
0 commit comments