Skip to content

sangcz/vue-picture-viewer

Repository files navigation

vue-picture-viewer

vue-picture-viewer is a picture viewer for Vue.js.

component view

Demo

LiveDemo

Install

$ npm install vue-picture-viewer

Import

Import using module

  // in ES6 modules
  import vuePictureViewer from 'vue-picture-viewer'

  // in CommonJS
  const vuePictureViewer = require('vue-picture-viewer')
  
  Vue.use(vuePictureViewer)

Import using script tag

   <script src="../node_modules/vue-picture-viewer/vue-picture-viewer.js"></script>
   
   // as a component reference
   <vue-picture-viewer></vue-picture-viewer>

Usage

Work on Vue instance

   <vue-picture-viewer :imgData="imgData" :switch="true"></vue-picture-viewer>

Options

props

options type Description Default
imgData Array imgUrl and imgName -
switch Boolean Whether to enable thumbnails true

License

MIT

Copyright (c) 2018-present, Joy Sang