Photoswipe plugin for Vue, based on https://github.com/ymyang/vue-photoswipe.
yarn add vue-simple-photoswipe
import Vue from 'vue'
import PhotoSwipe from 'vue-simple-photoswipe/dist/vue-simple-photoswipe'
Vue.use(PhotoSwipe)
It's important that ssr is set to false
, since the plugin needs the document
to be available. In nuxt.config.js
add the following plugin:
plugins: [
{src: 'vue-simple-photoswipe/nuxt', ssr: false}
]
- Photoswipe Vue component: https://github.com/ymyang/vue-photoswipe