We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1b4439 commit 6cecc15Copy full SHA for 6cecc15
1 file changed
demo/App2.jsx
@@ -126,7 +126,7 @@ export class App extends Component{
126
index: loadMoreLimitNum
127
});
128
}, 3000)
129
- } else if(action === STATS.loading){//加载更多
+ } else if(action === STATS.loading && this.state.hasMore){//加载更多
130
setTimeout(()=>{
131
if(this.state.index === 0){
132
this.setState({
@@ -143,6 +143,10 @@ export class App extends Component{
143
144
}
145
146
+ //无更多内容,不再加载数据
147
+ if(action === STATS.loading && !this.state.hasMore){
148
+ return;
149
+ }
150
//DO NOT modify below code
151
152
action: action
0 commit comments