# vue-photo-preview-fork

> "基于vue-photo-preview的组件进行ie兼容性适配，支持typescript"

Latest version **1.0.9** (published 2019-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-photo-preview-fork
pnpm add vue-photo-preview-fork
yarn add vue-photo-preview-fork
bun add vue-photo-preview-fork
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2019-07-13 |
| First published | 2019-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 513.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | tangfeng |
| Maintainers | usebtfeng |

## Links

- npm: https://www.npmjs.com/package/vue-photo-preview-fork
- Repository: https://github.com/tfeng-use/vue-photo-preview-fork
- Homepage: https://github.com/tfeng-use/vue-photo-preview-fork#readme
- Issues: https://github.com/tfeng-use/vue-photo-preview-fork/issues
- npm.io page: https://npm.io/package/vue-photo-preview-fork

## Dependencies (4)

- [vue](https://npm.io/package/vue.md) ^2.4.4
- [photoswipe](https://npm.io/package/photoswipe.md) ^4.1.2
- [resolve-url-loader](https://npm.io/package/resolve-url-loader.md) ^2.1.1
- [autoprefixer-loader](https://npm.io/package/autoprefixer-loader.md) ^3.2.0

## Recent versions

- 1.0.9 (latest) — 2019-07-13
- 1.0.8 — 2019-07-13
- 1.0.7 — 2019-07-13
- 1.0.6 — 2019-07-13
- 1.0.5 — 2019-07-13
- 1.0.4 — 2019-07-05
- 1.0.3 — 2019-07-05
- 1.0.2 — 2019-07-05
- 1.0.1 — 2019-07-05
- 1.0.0 — 2019-07-05

## README

# vue-photo-preview-fork

> 基于vue-photo-preview插件进行ie兼容性处理，并且支持typeScript


## 使用
``` bash
# 安装
npm install vue-photo-preview-fork --save
```

```
# 引入
import preview from 'vue-photo-preview-fork'
import 'vue-photo-preview-fork/dist/skin.css'
Vue.use(preview)
//或者 
//var option={....} option配置请查看 http://photoswipe.com/documentation/options.html
//Vue.use(preview,option)
```

```
# umd
<link rel="stylesheet" type="text/css" href="路径/dist/skin.css"/>

<script src="路径/dist/vue-photo-preview.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	var options={
		fullscreenEl:false //关闭全屏按钮
	}
	
	Vue.use(vuePhotoPreview,options)
	
	new Vue({
		el:'#app'
	})
</script>
```
```
# html
//在img标签添加preview属性 preview值相同即表示为同一组
<img src="xxx.jpg" preview="0" preview-text="描述文字">

//分组
<img src="xxx.jpg" preview="1" preview-text="描述文字">
<img src="xxx.jpg" preview="1" preview-text="描述文字">

<img src="xxx.jpg" preview="2" preview-text="描述文字">
<img src="xxx.jpg" preview="2" preview-text="描述文字">

<img src="xxx.jpg" large="xxx_3x.jpg" preview="2" preview-text="缩略图与大图模式">
```

## 在vue项目中引入babel-polyfill（处理项目中的promise问题）
```
npm i babel-polyfill --save

// 在main.ts顶部引入
import 'babel-polyfill'
```

## 原插件地址
[vue-photo-preview](https://github.com/826327700/vue-photo-preview)

## Options   
[插件配置文档](http://photoswipe.com/documentation/options.html) 

## DEMO
[地址](https://826327700.github.io/vue-photo-preview/demo/)

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