feat(ui): optional logo ui
This commit is contained in:
13
app.vue
13
app.vue
@@ -16,6 +16,7 @@ const qrCodeSrc = computed(() => qrCode.value ?? "/default.webp");
|
|||||||
const isApiModelOpen = ref(false);
|
const isApiModelOpen = ref(false);
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
hasLogo: false,
|
||||||
logo: undefined,
|
logo: undefined,
|
||||||
format: IMAGE_FORMATS[0],
|
format: IMAGE_FORMATS[0],
|
||||||
content: undefined,
|
content: undefined,
|
||||||
@@ -127,13 +128,23 @@ const arrayToUnion = (array: string[]) =>
|
|||||||
/>
|
/>
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UFormGroup label="Logo" name="logo">
|
<UFormGroup name="logo">
|
||||||
|
<template #label>
|
||||||
|
<UCheckbox
|
||||||
|
v-model="state.hasLogo"
|
||||||
|
class="mb-1.5"
|
||||||
|
label="Logo"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
v-model="state.logo"
|
v-model="state.logo"
|
||||||
icon="i-heroicons-photo"
|
icon="i-heroicons-photo"
|
||||||
:options="LOGOS"
|
:options="LOGOS"
|
||||||
|
:disabled="!state.hasLogo"
|
||||||
placeholder="Select logo"
|
placeholder="Select logo"
|
||||||
searchable
|
searchable
|
||||||
|
clear-search-on-close
|
||||||
@change="updateQRCode"
|
@change="updateQRCode"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
|||||||
Reference in New Issue
Block a user