From dcffe6ea4f44a8705ed28f9c826effeb0014991c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=92=BF?= Date: Tue, 15 Aug 2017 10:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E4=BB=B71.0.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-cn.md | 4 ++++ README.md | 4 ++++ package.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README-cn.md b/README-cn.md index d56a7b3..65794e1 100644 --- a/README-cn.md +++ b/README-cn.md @@ -92,6 +92,10 @@ export class App extends Component{ if(STATS.loading === this.state.action){ return false } + //无更多内容则不执行后面逻辑 + if(!this.state.hasMore){ + return; + } setTimeout(()=>{ if(this.state.index === 0){ diff --git a/README.md b/README.md index 457adb9..6e54363 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,10 @@ export class App extends Component{ if(STATS.loading === this.state.action){ return false } + //无更多内容则不执行后面逻辑 + if(!this.state.hasMore){ + return; + } setTimeout(()=>{ if(this.state.index === 0){ diff --git a/package.json b/package.json index a9bfd8a..2b07f4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-pullload", - "version": "1.0.6", + "version": "1.0.7", "description": "React compopnent pull down refresh and pull up load more", "main": "./lib/index.js", "scripts": {