File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -126,13 +126,15 @@ import styles from 'vue-pure-lightbox/dist/VuePureLightbox.css'
126126| open-at-index | integer | ** (Optional)** index of an image to show when opening the modal |
127127
128128### Available slots:
129+
129130| Slot | Description | Default |
130131| ------------- | ---------------------------------------------------- | ----------------------------------------- |
131132| content | DOM to be used in place of an image in the lightbox | < ; img> ; tag with src set to path |
132133| loader | DOM to be used when there is an image loading | LightboxDefaultLoader |
133134| icon-close | Icon to be used as a close button | × ; (& ; times;) |
134135| icon-previous | Icon to be used as the "next" arrow button | ![ ] ( https://i.imgur.com/HcdxJmd.png ) (svg) |
135136| icon-next | Icon to be used as the "previous" arrow button | ![ ] ( https://i.imgur.com/oErSVk3.png ) (svg) |
137+ | preview | DOM to be used in place of the default thumbnail | Clickable link with a thumbnail |
136138
137139## Contents
138140This package consists of just one ` .vue ` file. It is meant to be as small and simple as possible.
Original file line number Diff line number Diff line change 1717 />
1818 <img v-else :src =" url" >
1919 </div >
20+ <button slot =" preview" slot-scope =" { show }" @click =" show" >
21+ Open
22+ </button >
2023 </Lightbox >
2124</template >
2225
Original file line number Diff line number Diff line change 11<template >
22 <div >
3- <a :href =" images[0]" target =" _blank" @click.prevent =" show" class =" lightbox__thumbnail" >
4- <img :src =" thumbnail" :alt =" alternateText" >
5- </a >
3+ <slot name =" preview" :show =" show" >
4+ <a v-if =" thumbnail" :href =" images[0]" target =" _blank" @click.prevent =" show" class =" lightbox__thumbnail" >
5+ <img :src =" thumbnail" :alt =" alternateText" >
6+ </a >
7+ </slot >
68 <div class =" lightbox" v-if =" visible" @click =" hide" >
79 <div class =" lightbox__close" @click =" hide" >
810 <slot name =" icon-close" >× ; </slot >
5355 props: {
5456 thumbnail: {
5557 type: String ,
58+ default: null ,
5659 },
5760 images: {
5861 type: Array ,
You can’t perform that action at this time.
0 commit comments