0.1.5 • Published 5 years ago

@wozien/vue-image-preview v0.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

基于 vue.js 实现的网页图片预览组件,支持拖拽,滚动缩放

开始使用

下载

npm install @wozien/vue-image-preview

引入组件

<template>
  <div id="#app">
    <v-image-preview
      ref="preview"
      :images="images"
      :start-index="index"
      :can-wheel="canWheel"
    ></v-image-preview>
  </div>
</template>

<script>
  import VImagePreview from '@wozien/vue-image-preview';

  export default {
    name: 'app',

    data() {
      return {
        images: ['.../a.jpg', '.../b.jpg'],
        index: 0,
        canWheel: false
      };
    },

    methods: {
      show() {
        this.$refs.preview.show();
      }
    }
  };
</script>

说明

属性

方法

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago