# good-swiper **Repository Path**: natsubi/good-swiper ## Basic Information - **Project Name**: good-swiper - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-18 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # A lightweight swiper component based on Vue ## Install > npm install good-swiper --save-dev ## Screenshots !["good-swiper"](/screenshots/1.gif) ## Live Demo [点击查看](https://konglingwen94.github.io/good-swiper/examples/index.html) ## Usage ```javascript // main.js import Vue from 'vue' import { Swiper, SwiperItem } from 'vue-swiper' Vue.component(Swiper.name, Swiper) Vue.component(SwiperItem.name, SwiperItem) ``` ```HTML ``` ## Swiper Props | Prop | Type | Description | Default | | :-------: | :-----: | :----------------------------------------: | :-----: | | interval | Number | 轮播图切换时间间隔 | 3000ms | | duration | Number | 切换一个轮播图的过渡时间 | 300ms | | autoplay | Boolean | 是否自动播放 | false | | trigger | String | 指示器触发方式(可选值为 click \| hover) | click | | direction | String | 轮播图默认滚动方向(可选值为:left \| right) | left | | height | String | 轮播图容器高度 (单位"px") | 300px | ## Swiper Methods | Name | Description | ReturnValue | | :---: | :---------: | :---------: | | play | 播放轮播图 | undefined | | pause | 暂停轮播图 | undefined |