0.1.4 • Published 4 years ago

vue-cary-gallery v0.1.4

Weekly downloads
26
License
-
Repository
github
Last release
4 years ago

Vue-Cary-Gallery

Vue 2.x

A gallery plugin for vue2.

Note: Issue/PR is welcomed, I'll response as soon as possible.

Usage

install

npm install vue-cary-gallery --save

Quickstart

// global
import VueCaryGallery from 'vue-cary-gallery'
require('vue-cary-gallery/dist/gallery.css')

Vue.use(VueCaryGallery)

// in your code
<vue-cary-gallery :list="list" /> // list must required
Options
ParameterTypeDefaultRequiredDescription
listarray[]trueThe images list
heightnumber300falseThe container height
widthnumber800falseThe container width
imgWidthnumber120falseThe image width
imgHeightnumber160falseThe image height
autoplaybooleanfalsefalseWhether to auto play
delaynumber3000falseThe autoplay delay
paginationbooleanfalsefalseIs pagination
initIndexnumber0falseThe init index image
isBackbooleanfalsefalseIs back description
example
<template>
    <vue-cary-gallery :list="list" />
</template>

<script>
    import VueCaryGallery from 'vue-cary-gallery'
    require('vue-cary-gallery/dist/gallery.css')

    export default{
        components: {
            VueCaryGallery
        },
        data() {
            return {
                list: [
                    { 
                        src: 'http://xxx.com/1.png',
                        title: '1', // 
                        desc: 'The page 1'
                    },
                    { 
                        src: 'http://xxx.com/2.png',
                        title: '2', // 
                        desc: 'The page 2'
                    },
                    { 
                        src: 'http://xxx.com/3.png',
                    }
                ]
            }
        })
    }
</script>
TODO
  • more style? more animation

License

MIT

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago