vue-motions

1.0.2 • Public • Published

vue-motions

Vue 轻量级手势方向指令。

安装

使用 npm 安装:

npm i vue-motions --save
import Vue from 'vue'
import motion from 'vue-motions'

Vue.use(motion)

使用

<template>
    <div class="motion" v-motion="motion"></div>
</template>
new Vue({
  methods: {
      motion: function (e) {        
          if(e==='Swipe-right'){
              console.log('右划')
          }
          if(e==='Swipe-left'){
              console.log('左划');
          }
      }
  }
})

Readme

Keywords

none

Package Sidebar

Install

npm i vue-motions

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • zard1996