Merge branch 'master' of https://gitee.com/red-deng-deng/marketing-system
This commit is contained in:
commit
f80f4999d3
|
@ -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 (
|
||||
<div className="pagination">
|
||||
<div className="pagination-context">
|
||||
|
@ -172,9 +166,9 @@ import _ from "lodash";
|
|||
<div className="page-btn-group">
|
||||
<Icon onClick={()=>{this.onPrevClick()}} type={"left"} className={ this.state.page > 1 ? "page-prev" :"page-prev disabled" } />
|
||||
{
|
||||
btns.map((item, index) => {
|
||||
btnPages.map((item, index) => {
|
||||
return (
|
||||
<div onClick={()=>{this.onPageClick(item)}} key={index} className={ item== this.state.page ? "btn-page active":"btn-page"}>{item}</div>
|
||||
<div onClick={()=>{this.onPageClick(item.page)}} key={index} className={ item.page == this.state.page ? "btn-page active":"btn-page"}>{item.text}</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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(){
|
||||
|
|
|
@ -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(){
|
||||
|
|
Loading…
Reference in New Issue