parent
9974cbb7b3
commit
9846accf96
@ -0,0 +1,21 @@ |
|||||||
|
import {PageForm} from "./entity"; |
||||||
|
import React from "react"; |
||||||
|
import {Pagination} from "react-bootstrap"; |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页组件 |
||||||
|
*/ |
||||||
|
export class Page extends React.Component<PageForm, PageForm>{ |
||||||
|
|
||||||
|
render() { |
||||||
|
return ( |
||||||
|
<Pagination className="justify-content-center"> |
||||||
|
{this.props.currentPage===1?<Pagination.First disabled/>:<Pagination.First/>} |
||||||
|
{this.props.currentPage>1?<Pagination.Prev/>:<Pagination.Prev disabled/>} |
||||||
|
<Pagination.Item active>{this.props.currentPage}</Pagination.Item> |
||||||
|
{this.props.currentPage<this.props.totalPage?<Pagination.Next/>:<Pagination.Next disabled/>} |
||||||
|
{this.props.currentPage===this.props.totalPage?<Pagination.Last disabled/>:<Pagination.Last/>} |
||||||
|
</Pagination> |
||||||
|
); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue