From 39a84ddd5c5e8c31af6eb1ea0b8219cf265ab747 Mon Sep 17 00:00:00 2001 From: w1687021088 <1687021088@qq.com> Date: Thu, 9 Sep 2021 19:07:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9=E7=94=9F?= =?UTF-8?q?=E5=91=BD=E5=91=A8=E6=9C=9F=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SmartRefreshControl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SmartRefreshControl.js b/SmartRefreshControl.js index 9fbdc44..accbe29 100644 --- a/SmartRefreshControl.js +++ b/SmartRefreshControl.js @@ -48,7 +48,7 @@ class SmartRefreshControl extends Component { return findNodeHandle(this.refs.refreshLayout); } - componentWillMount() { + componentDidMount() { this._panResponder = PanResponder.create({ onMoveShouldSetPanResponderCapture: (evt, gestureState) => { if(this.shiftPercent >= 0.039 || this.footerShiftPercent >= 0.068){//满足条件捕获事件 @@ -127,7 +127,7 @@ class SmartRefreshControl extends Component { {this.renderHeader()} {this.props.children} @@ -169,4 +169,4 @@ SmartRefreshControl.propTypes = { SmartRefreshControl.defaultProps={ overScrollBounce:false } -export default SmartRefreshControl; \ No newline at end of file +export default SmartRefreshControl; From 1e977e6c72977b192127bb91aad408d6cd855917 Mon Sep 17 00:00:00 2001 From: zhangjw Date: Thu, 16 Sep 2021 13:52:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9'react'=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=BA'React'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index dee1987..d68f974 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -import react, { Component } from "react" +import React, { Component } from "react" import {ViewProps} from "react-native"; interface SmartRefreshLayoutProps extends ViewProps{ onRefresh?:()=>void,