touchstart事件:当手指触摸屏幕时候触发,即使已经有一个手指放在屏幕上也会触发。
touchmove事件:当手指在屏幕上滑动的时候连续地触发。在这个事件发生期间,调用preventDefault()事件可以阻止滚动。
touchend事件:当手指从屏幕上离开的时候触发。
touchcancel事件:当系统停止跟踪触摸的时候触发。
initTouchEvents: function () {
if (isPC()) {
this.touchstart = "mousedown";
this.touchmove = "mousemove";
this.touchend = "mouseup";
}
}
注:(1)pc端的用法为mosemove(mouseover),mouseleave;
(2)click和mousedown,mouseup不可同时对同一元素使用,click包含二者
原文地址:https://blog.csdn.net/huakaiwuxing/article/details/79074863