A Vue integration PhotoSwipe image preview plugin
npm install vue-preview> 一 A Vue Integrated PhotoSwipe Image Preview Plugin


`` bash`
npm i vue-preview -S
Notice:
- This plugin currently support vue2.5 and above
` javascript
import VuePreview from 'vue-preview'
// defalut install
Vue.use(VuePreview)
// with parameters install
Vue.use(preview, {
mainClass: 'pswp--minimal--dark',
barsSize: {top: 0, bottom: 0},
captionEl: false,
fullscreenEl: false,
shareEl: false,
bgOpacity: 0.85,
tapToClose: true,
tapToToggleControls: false
})
`
`html
``
##### slide item options
| Property | Description
| :--- | :---
| src | main (large) image
| msrc | small image
| alt | image replacement text
| w | image width
| h | image height
| Event name | Description | parameter
| :--- | :--- | :---
| close | close gallery | nothing
MIT Copyright (c) 2018 liusong