0.7.10-alpha.0 • Published 1 year ago

@gaopeng123/hooks.use-pagination v0.7.10-alpha.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

usePagination

TODO: 分页hooks

在线demo

Usage

import React from 'react';
import { usePagination } from "@gaopeng123/hooks.use-pagination";

type TestUsePaginationProps = {};
const TestUsePagination: React.FC<TestUsePaginationProps> = (props) => {
    const [current, next, last] = usePagination({pageNum: 1, pageSize: 10, total: 301});
    return (
        <div style={{backgroundColor: '#97fa04', width: '100%', height: '100%'}}>
            <h3>usePagination</h3>
            <a onClick={() => next()}>下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a onClick={() => last()}>上一页</a><br/>
            current: {
                current
            }
        </div>
    )
};

export default TestUsePagination;
0.7.10-alpha.0

1 year ago

0.7.8

1 year ago

0.7.6

2 years ago

0.7.2

2 years ago

0.6.3

2 years ago

0.7.1

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.5.0

3 years ago

0.4.2

3 years ago

0.4.0

3 years ago

0.3.10

3 years ago

0.3.9

3 years ago