vue-viewer

1.0.4 • Public • Published

Install

npm install vue-viewer  --save

仓库地址: ssh://git@github.com:yylgit/vue-viewer.git

API

props: {
  src: {
    type: String
  },
  alt: {
    type: String,
    default: ''
  },
  value: {
    type: Boolean,
    default: false
  }
}

Usage

<template>
    <div>
      <viewer v-model="showImage" :src="imageSrc">
      </viewer>
      <el-button  @click="showImageClick">显示</el-button>
    </div>
</template>

<script type="text/babel">
  import Viewer from '../dist/vue-viewer';
    export default {
      data: function() {
        return {
          showImage: false,
          imageSrc: 'http://p0.meituan.net/qcs/4662a009da0eafd379f3172a524127e1120196.jpg'
        }
      },
      components: {
        Viewer
      },
      methods: {
        showImageClick () {
          this.showImage = true;
        }
      }
    }
</script>

<style lang="scss" rel="stylesheet/scss" scoped>    
</style>


ScreenShot

image description

Package Sidebar

Install

npm i vue-viewer

Weekly Downloads

34

Version

1.0.4

License

MIT

Last publish

Collaborators

  • yyl