Touchstart: // touchmove:// touchend:/// touchcancel :// triggered when the system cancels the touch event. As to when the system will be canceled, unknown
/ClientY:////pagex/pagey://screenx/screeny://// Unique ID of the touch object
http//blog.sina.com.cn/s/blog_65c2ec5e0101fexw.htmlHandling Touch Events allows you to track the location of each finger of the user. You can bind the following four kinds of touch events:1.touchstart://trigger When you put your finger on the screen2.touchmove://trigger when the finger moves on the screen3.touchend://trigger when the finger picks up from the screen4touchcancel://triggered when the system cancels the touch event. As to when the system will be canceled, unknownProperties1.client/clienty://the location of the touch point relative to the browser window viewport2.pagex/pagey://the position of the touch point relative to the page3.screenx/screeny://the position of the touch point relative to the screen4.identifier://unique ID of the touch object//Touchstart EventsfunctionTouchsatrtfunc (e) {//Evt.preventdefault ();//block browser zoom, scroll bar scrolling, etc. when blocking touch vartouch = e.touches[0];//get the first touch point varx = number (Touch.pagex);//page contact X coordinate vary = number (touch.pagey);//page Contact Y coordinate //Record Contact initial positionStartX =x; Starty=y; } //Touchmove EventsfunctionTouchmovefunc (e) {//Evt.preventdefault ();//block browser zoom, scroll bar scrolling, etc. when blocking touch vartouch = evt.touches[0];//get the first touch point varx = number (Touch.pagex);//page contact X coordinate vary = number (touch.pagey);//page Contact Y coordinate varText = ' Touchmove Event Trigger: (' + x + ', ' + y + ') '; //judging the sliding direction if(X-startx! = 0) { //Swipe left and right } if(Y-starty! = 0) { //swipe up and down } }
Vue----Implement the mobile side (left slide delete. Right stroke normal)