Skip to content

Commit

Permalink
demo: fix RefreshControl demo
Browse files Browse the repository at this point in the history
  • Loading branch information
warmhug committed Sep 12, 2017
1 parent b05531b commit 99ffbe3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions components/refresh-control/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ class App extends React.Component {
refreshing: false,
showFinishTxt: true,
});
if (this.domScroller) {
this.domScroller.scroller.options.animationDuration = 500;
}
}, 600);
};

Expand All @@ -133,15 +136,17 @@ class App extends React.Component {
};

scrollingComplete = () => {
this.setState({ showFinishTxt: false });
if (this.st >= 0) {
this.setState({ showFinishTxt: false });
}
}

renderCustomIcon() {
return [
<div className="am-refresh-control-pull">
<span>{this.state.showFinishTxt ? '数据加载完成' : '下拉可以刷新'}</span>
<div key="0" className="am-refresh-control-pull">
<span>{this.state.showFinishTxt ? '刷新完毕' : '下拉可以刷新'}</span>
</div>,
<div className="am-refresh-control-release">
<div key="1" className="am-refresh-control-release">
<span>松开立即刷新</span>
</div>,
];
Expand Down

0 comments on commit 99ffbe3

Please sign in to comment.