vue-pc-swipe
Overview
A lightweight vue swipe component that making the slides fade work in pc.
Install
Install vue-pc-swipe
npm install vue-pc-swipe
Import vue-pc-swipe
ES6/commonjs import style is supported.
// ES6; // commonjsvar Swipe = Swipe;var SwipeItem = SwipeItem;
Usage
slide0 slide1 slide2
expand
you can use change function add indicators、prev or next button.demo
options
Attributes
Option | Description |
---|---|
continuous | Boolean(default: true) create an infinite feel with no endpoints |
auto | Number(default: 5000) speed of prev and next transitions in milliseconds |
startSlide | Number(defalut: 0) index position Swipe should start at |
Events
Option | Description |
---|---|
prev() | slide to prev |
next() | slide to next |
getPos() | returns current slide index position |
getNumSlides() | returns the total amount of slides |
slide(index) | slide to set index position |
change(index) | runs at slide change, index is the current slide index position |
LICENSE
MIT@PLDaily