Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-image-viewer

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-image-viewer

a simple and lightweight image viewer.

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
92
decreased by-16.36%
Maintainers
1
Weekly downloads
 
Created
Source

npm version MIT Licence

vue-image-viewer

a simple and lightweight picture viewer. Demo

一个用于Vue2.0的简单且轻量化的图片查看器。

Install

npm install vue-image-viewer --save

Usage

import imageViewer from "vue-image-viewer";
import "vue-image-viewer/lib/vue-image-viewer.css";

Vue.use(imageViewer);

export default {
    name : "demo",
    components : {
        imageViewer
    },
    data() {
        return {
            imageViewerParams : {
                index : 0,
                page : 0,
                images : [
                    {
                        name : "image1",
                        url : "/static/images/1.jpg"
                    },
                    {
                        name : "image2",
                        url : "/static/images/2.png"
                    },
                    {
                        url : "/static/images/3.gif"
                    }
                ]
            }
        }
    },
    methods : {
        imageViewShow() {
            this.$imageViewer.show(this.imageViewerParams);
        },
        imageViewHide() {
            this.$imageViewer.hide();
        }
    }
}
<button @close="imageViewShow">open</button>
<button @close="imageViewHide">close</button>

Props

NameTypeDefaultDescriptionRequired
indexNumber0Which image to show first.No
pageNumber0The page of the thumbnail list.No
imagesArray[]Image list.Yes

Keywords

FAQs

Package last updated on 11 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc