diff --git a/src/components/pagination/main.js b/src/components/pagination/main.js
index caf7088d..1cae1e17 100644
--- a/src/components/pagination/main.js
+++ b/src/components/pagination/main.js
@@ -81,17 +81,13 @@ import _ from "lodash";
this.props.onNextClick(page_num);
}
onPageClick(e){
- console.log(e)
- if(e=="…")
- {
- return;
- }
-
this.setState({page:e})
this.props.onJumpPage(e)
}
onInputChange(e,page_num){
+ console.log("当前页码变化")
+
let jump = e.target.value > page_num ? page_num : e.target.value;
this.setState({jump_page:jump})
}
@@ -143,8 +139,6 @@ import _ from "lodash";
btnPages.push(i);
}
-
- let btns = this.getPageArr(btnPages,this.state.page,5)
return (
@@ -172,9 +166,9 @@ import _ from "lodash";
{this.onPrevClick()}} type={"left"} className={ this.state.page > 1 ? "page-prev" :"page-prev disabled" } />
{
- btns.map((item, index) => {
+ btnPages.map((item, index) => {
return (
- {this.onPageClick(item)}} key={index} className={ item== this.state.page ? "btn-page active":"btn-page"}>{item}
+ {this.onPageClick(item.page)}} key={index} className={ item.page == this.state.page ? "btn-page active":"btn-page"}>{item.text}
)
})
}
diff --git a/src/pages/exchangecode/list/list.js b/src/pages/exchangecode/list/list.js
index c7d2f55b..7da3daa4 100644
--- a/src/pages/exchangecode/list/list.js
+++ b/src/pages/exchangecode/list/list.js
@@ -183,11 +183,17 @@ export default class acclist extends React.Component{
//page
pageChange(e){
this.setState({page:e});
+ setTimeout(() => {
+ this.getCodeListFn();
+ }, 10);
}
//limit
countChange(e){
this.setState({page:1,limit:e});
- this.getCodeListFn();
+
+ setTimeout(() => {
+ this.getCodeListFn();
+ }, 10);
}
//敲回车查询
sureFn(){
diff --git a/src/pages/order/list/list.js b/src/pages/order/list/list.js
index 1b193506..b94b88b2 100644
--- a/src/pages/order/list/list.js
+++ b/src/pages/order/list/list.js
@@ -235,12 +235,17 @@ export default class orderlist extends React.Component{
//page
pageChange(e){
this.setState({page:e});
- this.getOrderFn();
+ setTimeout(() => {
+ this.getOrderFn();
+ }, 0);
+
}
//limit
countChange(e){
this.setState({page:1,limit:e});
- this.getOrderFn();
+ setTimeout(() => {
+ this.getOrderFn();
+ }, 0);
}
//敲回车查询
sureFn(){