From c98947012b158592a58e7666368ecaa1c0e32de7 Mon Sep 17 00:00:00 2001 From: jinjinjin0731 <709899428@qq.com> Date: Wed, 13 Mar 2019 16:28:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(components):=20=E4=BF=AE=E5=A4=8D=20ScrollV?= =?UTF-8?q?iew=20scrollTop=20=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-components/src/components/scroll-view/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/taro-components/src/components/scroll-view/index.js b/packages/taro-components/src/components/scroll-view/index.js index be1f46bcaaf3..92911f5db906 100644 --- a/packages/taro-components/src/components/scroll-view/index.js +++ b/packages/taro-components/src/components/scroll-view/index.js @@ -71,7 +71,7 @@ class ScrollView extends Nerv.Component { // Y 轴滚动 if ( nextProps.scrollY && - typeof props.scrollTop === 'number' && + typeof nextProps.scrollTop === 'number' && nextProps.scrollTop !== this._scrollTop ) { if ('scrollWithAnimation' in nextProps) { @@ -170,7 +170,7 @@ class ScrollView extends Nerv.Component { ref={container => { this.container = container }} - {...omit(this.props, ['className'])} + {...omit(this.props, ['className', 'scrollTop', 'scrollLeft'])} className={cls} onScroll={_onScroll} >