From ccc2aae3d965c79797808fd628b6788cc54f642f Mon Sep 17 00:00:00 2001 From: xialvjun Date: Fri, 8 Jul 2016 02:02:18 +0800 Subject: [PATCH] add touch events --- src/index.js | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 6e1e981..dfc816b 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ export default { // Show and hide show: Show, hide: Hide, - + // Fade in fadeIn: FadeIn, @@ -206,6 +206,36 @@ export default { constructor() { super('wheel'); } - } + }, + ontouchcancel: class extends EventListener { + constructor() { + super('touchcancel'); + } + }, + ontouchend: class extends EventListener { + constructor() { + super('touchend'); + } + }, + ontouchenter: class extends EventListener { + constructor() { + super('touchenter'); + } + }, + ontouchleave: class extends EventListener { + constructor() { + super('touchleave'); + } + }, + ontouchmove: class extends EventListener { + constructor() { + super('touchmove'); + } + }, + ontouchstart: class extends EventListener { + constructor() { + super('touchstart'); + } + }, } "use strict";