Closed chryssalid closed 11 months ago
Hi, you can use HTML in v-slot:title
.
<vue-easy-lightbox>
<template #title>
<div class="vel-img-title">Test</div>
</template>
</vue-easy-lightbox>
@XiongAmao yes but does this allow me to use it for a group of images where every one has it's unique title?
You can use this feature: https://vuejs.org/guide/components/slots.html#scoped-slots
Current image { src?: string, title?: string, alt?: string }
passed by slotProps.
These come from what you passed to prop imgs
.
<template #title="{ currentImg }">
<div class="vel-img-title">{{ currentImg?.title }}</div>
</template>
Source code:
It would be great to use HTML in titles.