view-img
a vue component for preview img
Last updated 3 months ago by newming .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install view-img 
SYNC missed versions from official npm registry.

view-img for vue.js

a component for mobile preview img with hammerjs. support move and zoom

demo

Usage

A.Globally

// in your app entry
import ViewImg from 'view-img'
Vue.use(ViewImg)

// then in your templete write
// <view-img :show="show" :img='img' @hide='hide'></view-img>

B.Single

// in your component
import {ViewImg} from 'img-view'
export default {
  components: {
    'view-img': ViewImg
  }
}

Properties

property required type default description
show true Boolean false if the model display
img true String '' the image url will show

Events

name required description
hide true the event for click the model, you can hide the model with this event

References

hammer

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 5
Last Month 1
Dependencies (0)
None
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |