From be5d9edc137dfb176712a61bcac30bdb84ae4108 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Thu, 25 Nov 2021 16:18:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=88=87=E6=8D=A2=E9=A1=B5?= =?UTF-8?q?=E7=A0=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/plan/list/list.js | 43 +++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index fa4afe26..03cab54c 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -41,14 +41,11 @@ export default class acclist extends React.Component{ } //分页 onPageChange(e){ - let data = { - page:e, - limit:this.state.limit, - status:this.state.status, - key_word:this.state.key_word - } - - this.getPlanList(data); + this.setState({page:e}); + setTimeout(()=>{ + this.getpageFn(); + },0); + } componentDidMount(e){ @@ -58,12 +55,7 @@ export default class acclist extends React.Component{ }) }); - - - - - - + let data = { page:1, limit:10 @@ -88,15 +80,20 @@ export default class acclist extends React.Component{ }) } onCountChange(e){ - this.setState({limit:e}) - let data = { - page:1, - limit:e, - status:this.state.status, - key_word:this.state.key_word - } - this.getPlanList(data); - } + this.setState({page:1,limit:e}) + setTimeout(()=>{ + this.getpageFn(); + },0); + } + getpageFn(){ + let data = { + page:this.state.page, + limit:this.state.limit, + status:this.state.status, + key_word:this.state.key_word + } + this.getPlanList(data); + } //切换siwtch