vue-touch

by 904790204

904790204 / vue-touch

vue移动端touch事件

138 Stars 77 Forks Last release: Not found 10 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

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.