From d9f31c1722ec4362373419dec1805ddb38198504 Mon Sep 17 00:00:00 2001 From: tjz <415800467@qq.com> Date: Sun, 4 Feb 2018 13:12:54 +0800 Subject: [PATCH] fix --- components/trigger/index.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/trigger/index.vue b/components/trigger/index.vue index ff5add9d1..68c29d89d 100644 --- a/components/trigger/index.vue +++ b/components/trigger/index.vue @@ -18,7 +18,7 @@ function returnEmptyString () { function returnDocument () { return window.document } -const ALL_HANDLERS = ['click', 'mousedown', 'touchStart', 'mouseenter', +const ALL_HANDLERS = ['click', 'mousedown', 'touchstart', 'mouseenter', 'mouseleave', 'focus', 'blur', 'contextmenu'] export default { @@ -195,8 +195,8 @@ export default { this.preClickTime = Date.now() }, - onTouchStart (e) { - this.fireEvents('touchStart', e) + onTouchstart (e) { + this.fireEvents('touchstart', e) this.preTouchTime = Date.now() }, @@ -518,11 +518,11 @@ export default { if (this.isClickToHide() || this.isClickToShow()) { newChildProps.on.click = this.onClick newChildProps.on.mousedown = this.onMousedown - // newChildProps.on.touchStart = this.onTouchStart + // newChildProps.on.touchstart = this.onTouchstart } else { newChildProps.on.click = this.createTwoChains('click') newChildProps.on.mousedown = this.createTwoChains('mousedown') - // newChildProps.on.TouchStart = this.createTwoChains('onTouchStart') + // newChildProps.on.touchstart = this.createTwoChains('onTouchstart') } if (this.isMouseEnterToShow()) { newChildProps.on.mouseenter = this.onMouseenter