0.1.0 • Published 5 years ago
vue-fakin-slider v0.1.0
vue-fakin-slider
A Vue rotation module compatible with PC and mobile, very small size!
Demo
git clone https://github.com/CuteFakin/Vue-Fakin-Slider.git
npm install
npm run serve
Install
npm install vue-fakin-slider
Import
import { FakinSlider, FakinSliderItem } from 'vue-fakin-slider';
And register components:
Vue.component('fakin-slider', FakinSlider);
Vue.component('slider-item', FakinSliderItem);
Usage
<fakin-slider>
<fakin-item v-for="(item,index) in list">
<a :href="item.src">
<img :src="item.src" alt="">
</a>
</fakin-item>
</fakin-slider>
Options
Option | Type | Description | Default |
---|---|---|---|
direction | String | Direction of rotation(horizontal/vertical) | horizontal |
speed | Number | Rotational speed | 300 |
disabled | Boolean | Is dragging prohibited | false |
autoSwipe | Number | Delay time of automatic rotation | 3000 |
showIndicators | Boolean | Show small dots | true |
showButton | Boolean | Show switch buttons | true |
indicatorsCut | Boolean | Small dot switching | false |
indicatorsCut
和bashowButton
Triggered only on pc, prohibited on Mobile