# vue-mobile-event

> vue mobile event, such tap longTap and so on.

Latest version **1.2.6** (published 2020-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-mobile-event
pnpm add vue-mobile-event
yarn add vue-mobile-event
bun add vue-mobile-event
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.6 |
| Published | 2020-06-24 |
| First published | 2020-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | xiayefeng |
| Maintainers | xiayefeng12 |
| Keywords | vue, touch, event, mobile, tap, logTap, leftSlip, rightSlip, upSlip, downSlip |

## Links

- npm: https://www.npmjs.com/package/vue-mobile-event
- Repository: https://github.com/xiayefeng/vue-mobile-event
- Homepage: https://github.com/xiayefeng/vue-mobile-event#readme
- Issues: https://github.com/xiayefeng/vue-mobile-event/issues
- npm.io page: https://npm.io/package/vue-mobile-event

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.2.6 (latest) — 2020-06-24
- 1.2.5 — 2020-06-23
- 1.2.4 — 2020-06-23
- 1.2.3 — 2020-06-23
- 1.2.2 — 2020-06-22
- 1.2.1 — 2020-06-15
- 1.2.0 — 2020-06-15
- 1.1.3 — 2020-06-15
- 1.1.2 — 2020-06-12
- 1.1.1 — 2020-06-12
- 1.1.0 — 2020-06-12
- 1.0.3 — 2020-05-05
- 1.0.2 — 2020-05-05
- 1.0.1 — 2020-04-30
- 1.0.0 — 2020-04-29

## README

# vue-mobile-event
 vue mobile event

## install
npm
```
npm i vue-mobile-event -S
```

yarn

```
 yarn add vue-mobile-event
 ```

## use example

 ``` js
//  main.js 全局注册
  import Vue from 'vue'
  import VueMobileEvent from 'vue-mobile-event'
  Vue.use(VueMobileEvent)
 ```

 ``` html
 <!-- *.vue -->

<template>
   <!-- 点击事件 -->
  <div v-event:tap="tapEvent" />

  <!-- 长按事件 -->
  <div v-event:longTap="longTapEvent" />

  <!-- 长按带结束回调 -->

  <div v-event:longTap="{startHandle, endHandle}"></div>

  <!-- 左划事件 -->
  <div v-event:leftSlip="leftSlipEvent" />

  <!-- 右划事件 -->
  <div v-event:rightSlip="rightSlipEvent" />

  <!-- 上滑事件 -->
  <div v-event:upSlip="upSlipEvent" />

  <!-- 下滑事件 -->
  <div v-event:downSlip="downSlipEvent" />
</template>
<script>
export default {
  methods: {
    tapEvent(e){
    },
    longTapEvent(e){
    },
    startHandle(e) {
    },
    endHandle(e){
    }
    leftSlipEvent(e){
    },
    rightSlipEvent(e){},
    upSlipEvent(e){},
    downSlipEvent(e){}
  }
}
</script>
 ```

``` js 
// 局部注册
import {inserted} from 'vue-mobile-event'

directives: {
  event: { // 可自定义
    inserted
  }
}
```

---
_Source: https://npm.io/package/vue-mobile-event · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
