洛枫学院 » HTML/HTML5 » vue中如何用js的touchstart+touchend实现长按事件
页码: 1
- 一片云 2021-09-27 11:36
代码 复制 - 运行
// 长按事件 touchstart(){ this.timeOutEvent = setTimeout(function() { console.log("长按事件触发"); }, 500); }, touchend(){ clearTimeout(this.timeOutEvent); },