# vue-image-library2

> ```

Latest version **1.0.1** (published 2020-03-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-image-library2
pnpm add vue-image-library2
yarn add vue-image-library2
bun add vue-image-library2
```

## 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.1 |
| Published | 2020-03-03 |
| First published | 2020-03-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 23.6 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | lizhiyu |
| Maintainers | lizhiyu1996 |

## Links

- npm: https://www.npmjs.com/package/vue-image-library2
- npm.io page: https://npm.io/package/vue-image-library2

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.19.2

## Recent versions

- 1.0.1 (latest) — 2020-03-03
- 1.0.0 — 2020-03-03
- 0.1.0 — 2020-03-03

## README

### 素材选择组件
###### 使用环境：适合基于Vue+ElementUI搭建的管理后台项目
###### 引入方式：不同项目中存放组件的位置可能不同 这里以运营平台为例
###### 素材库组件位置：adminpro项目@/components/material
```
<ImageComponet ref="imageComponent" @chooseSuccess="chooseSuccess"></ImageComponet>

import Vue from 'vue'
import ImageComponet from 'vue-image-library2'

Vue.use(ImageComponet)
```
> **ref="imageComponent"** 用于在js中打开组件
```
chooseMaterial() { // 选择素材
  // 必填 single: 单选 or batch: 多选 
  // 不填默认为single: 单选
  this.$refs.imageComponent.show('single'); 
}
```
> **chooseSuccess** 选择成功返回的函数: 参数 val: Array （选中的数组）
```
chooseSuccess(val) {
  console.log('选择成功', val)
}
```

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