lib-swipers
v0.0.3
Published
vue轮播图
Downloads
10
Readme
vue轮播图
第一步
npm i lib-swiper
第二步
import Swiper_UI from 'lib-swipers'
const app = createApp(App)
app.use(Swiper_UI)
第三步
<carousel
:autoplay="true"
:duration="3000"
:initial="0"
:hasDot="true"
:hasDirector="true"
>
<car-item v-for="(item, index) in banner" :key="index">
<img :src="item.imgUrl" alt="" />
</car-item
>
</carousel>
autoplay:是否开启自动轮播
duration:轮播的毫秒数
initial:从第几张开始
hasDot:是否显示底部小圆点
hasDirector:是否开启左右箭头