【订单列表】页面无数据,页数展示为”undefined“

This commit is contained in:
red-deng-deng 2021-11-24 10:01:13 +08:00
parent fc4da4d9e8
commit 06851c541d
1 changed files with 3 additions and 3 deletions

View File

@ -172,11 +172,11 @@ import _ from "lodash";
<div className="page-btn-group"> <div className="page-btn-group">
<Icon onClick={()=>{this.onPrevClick()}} type={"left"} className={ this.state.page > 1 ? "page-prev" :"page-prev disabled" } /> <Icon onClick={()=>{this.onPrevClick()}} type={"left"} className={ this.state.page > 1 ? "page-prev" :"page-prev disabled" } />
{ {
btns.map((item, index) => { btns!='undefined'?btns.map((item, index) => {
return ( 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)}} key={index} className={ item== this.state.page ? "btn-page active":"btn-page"}>{item}</div>
) )
}) }):1
} }
<Icon onClick={()=>{this.onNextClick() <Icon onClick={()=>{this.onNextClick()
}} type={"right"} className={ this.state.page >= page_num ? "page-next disabled" :"page-next" } /> }} type={"right"} className={ this.state.page >= page_num ? "page-next disabled" :"page-next" } />