mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-01-29 02:30:26 +01:00
working
This commit is contained in:
@@ -33,6 +33,8 @@ async function handleCreate(event: FormSubmitEvent<CreateTabSchemaType>) {
|
||||
state.primary = false
|
||||
state.categoryId = props.category?.id
|
||||
}
|
||||
|
||||
const { loading, search } = useIcons()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -59,7 +61,31 @@ async function handleCreate(event: FormSubmitEvent<CreateTabSchemaType>) {
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup label="Icon " name="icon">
|
||||
<UInput v-model="state.icon" type="text" />
|
||||
<USelectMenu
|
||||
v-model="state.icon"
|
||||
:loading="loading"
|
||||
:searchable="search"
|
||||
placeholder="Select an icon"
|
||||
searchable-placeholder="Search an icon"
|
||||
>
|
||||
<template #label>
|
||||
<div v-if="state.icon" class="flex items-center gap-2">
|
||||
<UIcon size="20" :name="`i-${state.icon}`" />
|
||||
<span class="truncate">{{ state.icon }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #option="{ option }">
|
||||
<div class="flex items-center gap-2">
|
||||
<UIcon size="20" :name="`i-${option}`" />
|
||||
<span class="truncate">{{ option }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #empty>
|
||||
Enter an icon name, keyword or tag
|
||||
</template>
|
||||
</USelectMenu>
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup label="Color " name="color">
|
||||
|
||||
Reference in New Issue
Block a user