firstScroll(e) { e.preventDefault(); this.firstScrollVal = e.touches[0].screenY; //初始位置 console.log(this.firstScrollVal); }, imgScroll(e) { e.preventDefault(); let val = e.touches[0].screenY; this.scrollY = val - this.firstScrollVal; //拖動距離 }, endScroll(index, img, way) { if (this.scrollY < 0) { // 上滾事件 this.next(index, img, way); } else { // 下滾事件 this.prev(index, img, way); } }這是touchstart,touchmove,touchend三個事件,我原意是當scrollY >0時上滾,<0時下滾,=0時變成一個點擊事件,但如果我拖動一次后進行點擊,touchmove沒有觸發(fā),它則自動默認我的拖動距離為上一次的拖動距離,自動幫我做上一次的滾動處理,我該怎么樣做處理
vue touch事件中,點擊不觸發(fā)touchmove如何解決
UYOU
2019-02-26 14:19:07