1.0.1 • Published 7 years ago

mokit-touch v1.0.1

Weekly downloads
-
License
Apache License
Repository
-
Last release
7 years ago

mokit touch 事件支持

安装

npm install mokit-transition --save-dev

使用

HTML:

<div id="app" m:on:tap="say('tap')" m:on:swipe="say('swipe')">
  {{name}}
</div>

JavaScript:

const mokit = require('mokit');
const touch = require('mokit-touch');

mokit.use(touch);

mokit({
  element: document.getElementById('app'),
  data: function () {
    return { name: '' };
  },
  say: function (name) {
    this.name = name;
  }
}).start();

所有事件

tap,taphold,dbltap,swipe,swipeup,swiperight,
swipedown,swipeleft,pointdown,pointmove,pointup