Coder Social home page Coder Social logo

libin1991 / vue-finger-directive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daughterrui/vue-finger-directive

0.0 1.0 0.0 4 KB

vue自定义手势手指指令(点击、单击、长按、双击、拖拽移动、多点触控、滑动、缩放、旋转)vue 自定义手势插件(点击、单击、长按、双击、拖拽移动、多点触控、滑动、缩放、旋转),基于腾讯AlloyFinger改造

License: MIT License

vue-finger-directive's Introduction

vue-finger-directive

vue 自定义手势插件,基于腾讯AlloyFinger改造

Use Setup

npm i vue-finger-directive -S

在main.js中导入、vue.use(),然后在子组件中就可以直接用v-tap="{methods:func , arg: args}"的方式使用

Use in SPA

1.点击事件

v-tap

2.单击事件,和tap的区别是相差250ms

v-singleTap

3.长按事件,当点击时长超过750ms时候触发

v-longTap

4.双击事件

v-doubleTap

5.拖拽移动事件

v-pressMove

6.多点触控事件开始事件

v-multipointStart

7.多点触控事件结束事件

v-multipointEnd

8.滑动事件

v-swipe

9.旋转事件

v-rotate

10.缩放事件

v-pinch

Example

<div
  :style="floatStyle"
  class="floating"
  v-pressMove="{methods: pressMove, args: 'args' }"
  ref="floating"
  v-tap="{methods: tap }"
>
methods: {
  pressMove(e, args){

  },
  tap(){

  }
}

vue-finger-directive's People

Contributors

daughterrui avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.