The Hottest Porn Videos Online mecum.porn Quality porns videos Free indian porn tube videos indiansexmovies.mobi hot indian women watch online
微信小程序Notes

Tips

踩坑记录

动作 触发顺序
单击 tap touchStart -> tap -> touchEnd
长按 longPress touchStart -> longPress -> tap -> touchEnd

区别单击、双击、长按事件

touchStart: function (e) {
    this.setData({
      touchStartTime: e.timeStamp,
      touchFlag: true
    });
  },
tapJudgement: function (e) {
    let that = this;
    that.setData({
      touchEndTime: e.timeStamp,
    });
    if (that.data.touchStartTime === null && that.data.touchEndTime === null) {
      return;
    }
    let gap = that.data.touchEndTime - that.data.touchStartTime;
    if (Math.abs(gap) < 350) {
      let currentTapTime = e.timeStamp;
      let lastTapTime = that.data.lastTapTime;
      that.setData({
        lastTapTime: currentTapTime
      });
      if (currentTapTime - lastTapTime < 300 && lastTapTime !== null) {
        //double tap event
        clearTimeout(that.data.lastTapTimeoutFunc);
        wx.showToast({
          title: 'double tap event',
        });
      } else {
        let timer = setTimeout(function () {
          wx.showToast({
          title: 'single tap event',
        });
        }, 300);
        that.setData({
          lastTapTimeoutFunc: timer
        });
      }
    }
  },
  longpressHandle: function (e) {
    wx.showToast({
      title: 'Trigger long press event',
    });
    this.setData({
      touchEndTime: e.timeStamp
    });
  }

本文链接:微信小程序Notes

转载声明:本站文章若无特别说明,皆为原创,转载请注明来源:PorYoung,谢谢!^^

No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous
Next