diff --git a/src/components/pagination/main.js b/src/components/pagination/main.js index 8b3d60ac..8a3fe96e 100644 --- a/src/components/pagination/main.js +++ b/src/components/pagination/main.js @@ -172,12 +172,12 @@ import _ from "lodash";
{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 (
{this.onPageClick(item)}} key={index} className={ item== this.state.page ? "btn-page active":"btn-page"}>{item}
) - }) - } + }):1 + } {this.onNextClick() }} type={"right"} className={ this.state.page >= page_num ? "page-next disabled" :"page-next" } />