0.0.5 • Published 7 years ago

rpaging v0.0.5

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

rpaging

一款简洁的 react 分页组件

Install

	npm install rpaging --save

Example

	import React,{ Component } from "react";
	import Pagination from "rpaging";
	class App extends Component{	
		async componentDidMount(){
			await setTimeout(()=>{
				new Promise((res)=>{
					this.setState({
						renderPage:true
					})
				})
			},2000);
		}

		render(){
			let Page = this.state.renderPage?(
				<Pagination config = {{
					async paging(pageObj){
						let data = await fetch(URL).then((res)=>res.json());
					}
				}}
				></Pagination>
			):"";
			return(
				<div>
					{ Page }
				</div>
			);
		}
	}

Tips

This component uses CSS MODULES,ensure you have opened CSS MODULES before you use it.

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago