mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
22 lines
426 B
Vue
22 lines
426 B
Vue
<script setup lang="ts">
|
|
defineProps<{
|
|
src: string
|
|
loading: 'lazy' | 'eager'
|
|
alt?: string
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<picture>
|
|
<source :srcset="`${src}.avif`" type="image/avif">
|
|
<source :srcset="`${src}.webp`" type="image/webp">
|
|
<img
|
|
:src="src"
|
|
:loading="loading"
|
|
:alt="alt"
|
|
block w-full h-full object="[inherit]" aspect-inherit
|
|
rounded-inherit
|
|
>
|
|
</picture>
|
|
</template>
|