Socket
Socket
Sign inDemoInstall

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 - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

demo/.babelrc

2

config/index.js

@@ -11,3 +11,3 @@ // see http://vuejs-templates.github.io/webpack for documentation.

assetsPublicPath: '/',
productionSourceMap: true,
productionSourceMap: false,
// Gzip off by default as many popular static hosts such as

@@ -14,0 +14,0 @@ // Surge or Netlify already gzip all static assets for you.

{
"name": "vue-image-viewer",
"version": "1.0.2",
"version": "1.0.3",
"description": "a simple and lightweight image viewer.",

@@ -5,0 +5,0 @@ "main": "lib/vue-image-viewer.js",

[![npm version](https://img.shields.io/npm/v/vue-image-viewer.svg?style=flat-square)](https://www.npmjs.com/package/vue-image-viewer)
[![MIT Licence](https://img.shields.io/npm/l/vue-image-viewer.svg?style=flat-square)](https://github.com/ChiHai-Chuck/vue-image-viewer/blob/master/LICENSE)
[![MIT Licence](https://img.shields.io/npm/l/vue-image-viewer.svg?style=flat-square)](https://github.com/chiHai-chuck/vue-image-viewer/blob/master/LICENSE)
# vue-image-viewer
a simple and lightweight picture viewer.
a simple and lightweight picture viewer. [Demo](https://github.com/chiHai-chuck/vue-image-viewer/blob/master/dist/index.html)

@@ -19,2 +19,4 @@ >一个用于Vue2.0的简单且轻量化的图片查看器。

Vue.use(imageViewer);
export default {

@@ -28,3 +30,2 @@ name : "demo",

imageViewerParams : {
visible : false,
index : 0,

@@ -49,7 +50,7 @@ page : 0,

methods : {
imageViewShow(index) {
if(index !== void 0) {
this.imageViewerParams.index = index;
this.imageViewerParams.visible = true;
}
imageViewShow() {
this.$imageViewer.show(this.imageViewerParams);
},
imageViewHide() {
this.$imageViewer.hide();
}

@@ -60,7 +61,4 @@ }

```
<image-viewer :images="imageViewerParams.images"
:index="imageViewerParams.index"
:visible="imageViewerParams.visible"
:page="imageViewerParams.page"
@close="imageViewerParams.visible=false"></image-viewer>
<button @close="imageViewShow">open</button>
<button @close="imageViewHide">close</button>
```

@@ -71,5 +69,4 @@

|---|---|---|---|---|
| visible | `Boolean` | `false` | Show or hide. | Yes |
| index | `Number` | `0` | Which image to show first. | No |
| page | `Number` | `0` | The page of the thumbnail list. | No |
| images | `Array` | `[]` | Image list. | Yes |

@@ -1,2 +0,17 @@

import imageViewer from "./components/image-viewer.vue";
export default imageViewer;
import imageViewer from "./components/image-viewer";
const install = function(Vue) {
if(install.installed) return;
Vue.component("imageViewer", imageViewer);
Vue.prototype.$imageViewer = imageViewer;
};
if(typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}
const API = {
install
};
export default API;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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