芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/@buffetjs/core/src/components/Paging/index.js
/** * * Paging * */ import React from 'react'; import { Pagination, PaginationItem, PaginationLink } from 'reactstrap'; import PropTypes from 'prop-types'; import { Paging as StyledPaging } from '@buffetjs/styles'; import Icon from '../Icon'; /* eslint-disable react/no-array-index-key */ function Paging({ count, page, onChange, range }) { const pagesCount = Math.ceil(count / range); return ( <>
{Array(pagesCount) .fill(1) .map((item, index) => (
{index + 1}
))}
> ); } Paging.defaultProps = { count: 0, onChange: () => {}, page: 0, range: 15, }; Paging.propTypes = { count: PropTypes.number, onChange: PropTypes.func, page: PropTypes.number, range: PropTypes.number, }; export default Paging;