# @mu-ui/mu-touch

> touch vue component for vue 2.x

Latest version **0.1.0** (published 2019-03-29) · MIT license · 0 weekly downloads

## Install

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

## 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.1.0 |
| Published | 2019-03-29 |
| First published | 2019-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | JR93 |
| Maintainers | jr93 |
| Keywords | touch, vue, components |

## Links

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

## Recent versions

- 0.1.0 (latest) — 2019-03-29

## README

## mu-touch 滑动手势

### 安装方式

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

### 使用指南

```js
import Touch from '@mu-ui/mu-touch'

Vue.component('Touch', Touch)

<Touch @result="result">
  ...
</Touch>

...
methods: {
  result(res) {
    console.log(res) // top|bottom|left|right
  }
}
```

### mu-touch Props

参数|说明|类型|默认值
---|---|---|---
threshold|滑动生效的最小距离|Number|50
restraint|滑动时另一个方向的最大距离|Number|80

### mu-touch Events

名称|说明
---|---
result|返回触发方向的结果

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