Files
laravel-manager-packagist/resources/blocks/vue/ImageBlock.vue
T
2026-12-04 17:50:18 +00:00

15 lines
476 B
Vue

<script setup lang="ts">
import { classes, safeUrl } from './support';
defineProps<{ data: Record<string, any>; style?: Record<string, string> }>();
</script>
<template>
<section :class="['mb-block mb-image', classes(style)]">
<figure class="mb-inner">
<img :src="safeUrl(data.photo)" :alt="data.caption || ''" loading="lazy" />
<figcaption v-if="data.caption">{{ data.caption }}</figcaption>
</figure>
</section>
</template>