NuxtImg Migration (#279)

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
formsdev
2024-01-05 16:11:49 +05:30
committed by GitHub
parent 8b92f24094
commit 27ece34226
24 changed files with 67 additions and 75 deletions

View File

@@ -22,7 +22,7 @@
</div>
<div v-else class="h-6 text-gray-600 dark:text-gray-400 flex">
<div class="flex-grow">
<img :src="currentUrl" class="h-6 rounded shadow-md">
<NuxtImg :src="currentUrl" class="h-6 rounded shadow-md"/>
</div>
<a href="#" class="hover:text-nt-blue flex" @click.prevent="clearUrl">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"

View File

@@ -4,7 +4,7 @@
:title="file.file.name"
>
<div v-if="file.src && !isImageHide" class="h-20 overflow-hidden flex">
<img class="block object-cover object-center w-full" :src="file.src" @error="isImageHide=true">
<NuxtImg class="block object-cover object-center w-full" :src="file.src" @error="isImageHide=true"/>
</div>
<div v-else class="h-20 flex items-center justify-center">
<svg class="w-10 h-10 text-gray-500" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"