# @mu-ui/mu-swipe

> swipe vue component for vue 2.x

Latest version **0.2.0** (published 2019-07-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mu-ui/mu-swipe
pnpm add @mu-ui/mu-swipe
yarn add @mu-ui/mu-swipe
bun add @mu-ui/mu-swipe
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-07-15 |
| First published | 2019-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | JR93 |
| Maintainers | jr93 |
| Keywords | swipe, vue, components |

## Links

- npm: https://www.npmjs.com/package/@mu-ui/mu-swipe
- npm.io page: https://npm.io/package/@mu-ui/mu-swipe

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-07-15
- 0.1.0 — 2019-03-29

## README

## mu-swipe 轮播

### 安装方式

```bash
yarn add @mu-ui/mu-swipe
```

### 使用指南

```js
import { Swipe, SwipeItem } from '@mu-ui/mu-swipe'

Vue.component('Swipe', Swipe)
Vue.component('SwipeItem', SwipeItem)

<Swipe :loop="false" @change="change">
  <SwipeItem v-for="n in list" :key="n" :style="{'background-color': n}">
    第一屏{{ n }}
  </SwipeItem>
  <div slot="indicator">
    {{ current + 1 }} / {{ list.length }}
  </div>
</Swipe>

export default {
  data() {
    return {
      list: ['red', 'blue', 'green'],
      current: 0
    }
  },
  methods: {
    change(index) {
      this.current = index
    }
  }
}
```

### mu-swipe Props

参数|说明|类型|默认值
---|---|---|---
loop|循环播放|Boolean|true
showIndicator|是否展示指示器|Boolean|true
indicatorColor|指示器选中颜色|String|#fff
duration|滑动过渡时间|Number|500
autoplay|自动播放时间间隔|Number|3000

### mu-swipe Slots

名称|说明
---|---
indicator|自定义指示器

### mu-swipe Events

名称|说明
---|---
change|返回当前页码下标

---
_Source: https://npm.io/package/@mu-ui/mu-swipe · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
