1 let timeOutEvent = 0
 2 $(function () {
 3   $('#debug').on({
 4     touchstart: function (e) {
 5       setTimeout(function () {
 6         longPress()
 7       }, 10000)
 8       e.preventDefault()
 9     },
10     touchmove: function () {
11       clearTimeout(timeOutEvent)
12       timeOutEvent = 0
13     },
14     touchend: function () {
15       clearTimeout(timeOutEvent)
16       return false
17     }
18   })
19 })
20 
21 /* eslint-disable no-unused-vars */
22 function longPress () {
23   timeOutEvent = 0
24   router.go('about')
25 }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案