Skip to content

maofaming/vue-preivew

 
 

Repository files navigation

img-vuer

An image viewer base on Vue.js for mobile

🙆‍♀️ Easy to use
👉 Swipe gesture
🔍 Zoom gesture
😂 Now you can use thumbnail ~ V 0.11.0

Please Use Mobile Browser 😆
live demo
or scan the QRcode

Install

npm i img-vuer --save

Usage

// import img-vuer and install
import gallery from 'img-vuer'
Vue.use(gallery)

// add direact to <img>
<img v-gallery :src="...">

// group images
<img v-gallery:groupName :src="...">
<img v-gallery:groupName :src="...">
<img v-gallery:groupName :src="...">

// OR ( dynamic bind )
<img v-gallery="'groupName'" :src="...">

// use thumbnail
<img v-gallery :src="thumbnailSrc" data-large="originSrc">

Development

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

Troubleshooting

abnormal with page scale
Add meta

<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=0, maximum-scale=1">

should not use index as key for component that added v-gallery

License

MIT

About

An image viewer base on Vue.js for mobile

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 70.8%
  • JavaScript 26.8%
  • HTML 2.3%
  • Batchfile 0.1%