# v-img-view

> 基于viewerjs的一款图片查看指令，支持方法调用

Latest version **1.0.2** (published 2020-12-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install v-img-view
pnpm add v-img-view
yarn add v-img-view
bun add v-img-view
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-12-10 |
| First published | 2020-10-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | huzaihao |
| Keywords | vue, img, viewerjs |

## Links

- npm: https://www.npmjs.com/package/v-img-view
- npm.io page: https://npm.io/package/v-img-view

## Dependencies (4)

- [vue](https://npm.io/package/vue.md) ^2.6.12
- [sass](https://npm.io/package/sass.md) ^1.27.0
- [viewerjs](https://npm.io/package/viewerjs.md) ^1.7.1
- [@vue/component-compiler-utils](https://npm.io/package/@vue/component-compiler-utils.md) ^3.2.0

## Recent versions

- 1.0.2 (latest) — 2020-12-10
- 1.0.1 — 2020-10-15
- 1.0.0 — 2020-10-15

## README

# v-img-view

    基于viewerjs的一款图片查看指令，支持方法调用

## 安装
```bash
$ npm install --save v-img-view
```

## 使用
    支持指令和服务，如使用指令需要全局注册
```js
// 全局注册
import viewImagePlugin from 'v-img-view'
Vue.use(viewImagePlugin)
```
```html
<p v-image-view="imgList">图片查看</p>
<p @click="view">方法调用</p>
```
```js
import {ImageViewService} from 'v-img-view'
export default {
    name: 'App',
    data() {
        return {
        // imgList 支持String 和 Array
        imgList: ['http://dummyimage.com/468x100&text=第一张',
                'http://dummyimage.com/468x200&text=第二张']
        }
    },
    methods: {
        view() {
            // 参数目前仅支持 Array
            ImageViewService.view(['http://dummyimage.com/468x260&text=方法调用'])
            }
        }
    }
```

---
_Source: https://npm.io/package/v-img-view · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
