vue-picture-viewer is a picture viewer for Vue.js.
$ npm install vue-picture-viewer
// in ES6 modules
import vuePictureViewer from 'vue-picture-viewer'
// in CommonJS
const vuePictureViewer = require('vue-picture-viewer')
Vue.use(vuePictureViewer)
<script src="../node_modules/vue-picture-viewer/vue-picture-viewer.js"></script>
// as a component reference
<vue-picture-viewer></vue-picture-viewer>
Work on Vue instance
<vue-picture-viewer :imgData="imgData" :switch="true"></vue-picture-viewer>
options | type | Description | Default |
---|---|---|---|
imgData | Array | imgUrl and imgName | - |
switch | Boolean | Whether to enable thumbnails | true |
MIT
Copyright (c) 2018-present, Joy Sang