1.0.1 • Published 7 years ago
top-test-swiper v1.0.1
插件的安装
npm i top-test-swiper
引入插件
import Vue from 'vue';
import swiper from 'top-test-swiper';
Vue.use(swiper);基本用法
<swiper
autoplay
:autoplay-speed=3
:value=3
dots="outside"
:width=400
:height=300>
</swiper>API
| 参数 | 说明 |
|---|---|
| value | 选中第几个,默认为0,从第一个开始 |
| width | 容器宽度 |
| height | 容器高度 |
| dots | 底部指示点,3个值(inside、outside、none),inside表示在slide里面,outside表示在外面,none不显示,默认inside |
| autoplay | 是否自动播放,默认为false |
| autoplay-speed | 自动播放速度,默认为2s |