This commit is contained in:
Kseninia Mikhaylova 2024-08-12 16:38:57 +03:00
parent 666b38f2f9
commit 65de9d7fbd
1 changed files with 6 additions and 4 deletions

View File

@ -17,16 +17,18 @@ watch(imagesStore, () => {
<template> <template>
<template v-if="img.status == 'success'"> <template v-if="img.status == 'success'">
<template v-if="props.type == 'img'"> <template v-if="props.type == 'img'">
<NuxtImg :src="img.result" /> <a href="#" @click.prevent="openImage">
<NuxtImg :src="img.result" />
</a>
</template> </template>
<template v-else> <template v-else>
<a href="#" @click.prevent="openImage"> <a href="#" @click.prevent="openImage">
<Icon name="i-mdi-image" /> <Icon name="i-mdi-image" />
</a> </a>
<UModal v-model="isOpen" :ui="{ width: 'w-full', }">
<img :src="img.result" />
</UModal>
</template> </template>
<UModal v-model="isOpen" :ui="{ width: 'w-full', }">
<img :src="img.result" />
</UModal>
</template> </template>
<template v-else-if="img.status == 'error'"> <template v-else-if="img.status == 'error'">
<Icon name="i-mdi-close-circle-outline" /> <Icon name="i-mdi-close-circle-outline" />