Vue----Implement the mobile side (left slide delete. Right stroke normal)

Source: Internet
Author: User
Tags unique id

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.