Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/21hook/vue-image-preview
An image preview component based on Vue
https://github.com/21hook/vue-image-preview
Last synced: 14 days ago
JSON representation
An image preview component based on Vue
- Host: GitHub
- URL: https://github.com/21hook/vue-image-preview
- Owner: 21hook
- Created: 2018-06-07T04:23:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-12T10:30:32.000Z (over 6 years ago)
- Last Synced: 2025-01-21T22:40:16.961Z (25 days ago)
- Language: Vue
- Size: 362 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-image-preview
> An image preview component based on Vue
##
[Demo](https://21hook.github.io/vue-image-preview/)## Build Setup
``` bash
# install dependencies
npm install# serve with hot reload at localhost:8080
npm run dev# build for production with minification
npm run build
```## Usage
```
// import as ES6 module
import VueImagePreview from 'vue-image-preview'// require as Node module
var VueImagePreview = require('vue-image-preview')// then, install the plugin
Vue.use(VueImagePreview)// load as JS file
```
## Props
name | type | default | description
------| --- |--------|-------------
visible | Boolean | true | visibility of the image preview dialog
imgSrc | Array | - | a list of image URLs
currentIndex | Number | 0 | the current index for the list of images## License
MIT