You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
help_user/src/Page.tsx

21 lines
819 B

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>
);
}
}