touchstart:接触了屏幕,延时500毫秒执行;
touchend:离开了屏幕,离开的时候清理延时事件;

代码 复制 - 运行

// 长按事件
    touchstart(){
     this.timeOutEvent = setTimeout(function() {
      console.log("长按事件触发");
     }, 500);
    },
    touchend(){
     clearTimeout(this.timeOutEvent);
    },