From 387c1d952e627c22644e1a250a9be778a3812039 Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 27 May 2016 17:32:48 +0800 Subject: [PATCH] add event dispatch touch-start, touch-move and touch-end --- src/swipe.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/swipe.vue b/src/swipe.vue index 03bbbc9..87d449a 100644 --- a/src/swipe.vue +++ b/src/swipe.vue @@ -457,11 +457,13 @@ this.dragging = true; this.userScrolling = false; this.doOnTouchStart(event); + this.$dispatch('touch-start', event); }); element.addEventListener('touchmove', (event) => { if (!this.dragging) return; this.doOnTouchMove(event); + this.$dispatch('touch-move', event); }); element.addEventListener('touchend', (event) => { @@ -473,6 +475,7 @@ if (!this.dragging) return; this.doOnTouchEnd(event); this.dragging = false; + this.$dispatch('touch-end', event); }); } };