From 538f22f4538a79ff85d51e6f701f8be766625448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 13 May 2020 16:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96scroll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scroll/index.wc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scroll/index.wc b/src/scroll/index.wc index 38192ed..24f0a1e 100644 --- a/src/scroll/index.wc +++ b/src/scroll/index.wc @@ -244,7 +244,7 @@ export default class Scroll { }) // 鼠标滚动事件 - this._wheelFn = $.catch(this.__BOX__, 'wheel', ev => { + this._wheelFn = $.bind(this.__BOX__, 'wheel', ev => { // 禁用状态, 不允许滚动 if (this.disabled) { return @@ -295,6 +295,7 @@ export default class Scroll { } ev.preventDefault() + ev.stopPropagation() this.props.thumbY = fixedY this.__Y__.style.transform = `translateY(${fixedY}px)` @@ -318,6 +319,7 @@ export default class Scroll { } ev.preventDefault() + ev.stopPropagation() this.props.thumbX = fixedX this.__X__.style.transform = `translateX(${fixedX}px)`