Need help with vue-touch?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

904790204
146 Stars 77 Forks 10 Commits 13 Opened issues

Description

vue移动端touch事件

Services available

!
?

Need anything else?

Contributors list

# 461,846
JavaScr...
HTML
2 commits

kim-vue-touch

Installation

npm install kim-vue-touch

Usage

import vueTouch from 'kim-vue-touch'

Vue.use(vueTouch)

  • kim-vue-touch提供了点击、长按、左滑、右滑、上滑、下滑等事件,
  • 当你不需要传参时可以通过v-tap="vueTouch"的形式调用方法,
  • 当你需要传参时v-tap="(e)=>vueTouch('点击',e)"的方式调用,e是event对象
  • 当指令搭配v-for使用时,一定要确保key值的唯一性,否则不能保证数据刷新之后事件被重新绑定(参考vue就地复用机制)
  • 尽量避免对数组、对象的直接赋值操作,可能会导致参数不更新

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.