Skip to content

MaZhaolin/prevue-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preview Image Vue Plugin

Install

npm  i -S prevue-image

Usage

import Vue from 'vue'
import PrevueImage from 'prevue-image'
Vue.use(PrevueImage)

html

<div v-prevue-image>
  <img src="http://placekitten.com/408/287" alt="" />
  <img src="http://placekitten.com/408/287" alt="" />
  <img src="http://placekitten.com/408/287" alt="" />
</div>

Browser

<div id="app" v-prevue-image>
  <div style="text-align: center">
    <img src="http://placekitten.com/800/500" alt="" />
    <img src="http://placekitten.com/800/500" alt="" />
  </div>
  <div style="text-align: center">
    <img src="http://placekitten.com/800/600" alt="" />
    <img src="http://placekitten.com/800/600" alt="" />
  </div>
</div>
<script src="https://cdn.bootcss.com/vue/2.6.4/vue.js"></script>
<script src="/dist/prevue-image.js"></script>
<script>
  Vue.use(PrevueImage)
  new Vue({
    el: '#app'
  })
</script>

License

The MIT License (MIT). Please see License File for more information.