npm install vue-lightbox> Simple lightbox component for vue
`` bashimport
import VueLightbox from 'vue-lightbox'
Vue.component("Lightbox",VueLightbox)
or
var VueLightbox = required('./vue-lightbox.js')
or
Vue.component("Lightbox",VueLightbox.VueLightbox)
``
| prop | type | required | default | desc |
|--------------------|---------|----------|---------------------------|------------------------------------------------------------------------------------------------|
| src | String | yes | | picture url |
| album | String | no | "" | group of pictures |
| caption | String | no | "" | some picture desc will display under the popup |
| show-index | Boolean | no | true | show the picture number index |
| index-tmpl | String | no | "${d} of ${total} images" | picture number index tmpl,${d} will be replace by index,${total} will be album's picture count |
| click-overlay-hide | Boolean | no | true | is click to close lightbox |
- add watch when props change
- test for different browser