React后台管理系统- rc-pagination分页组件封装
1.用户列表页面使用的rc-pagination分页组件
Github地址: https://github.com/react-component/pagination
2.安装
cnpm install --save-dev rc-pagination
3.引入
-
import React from 'react';
-
import RcPagination from 'rc-pagination';
-
import 'rc-pagination/dist/rc-pagination.min.css';
4.封装成组件,在util里边新建文件夹Pagination,里边新建 index.jsx
-
import React from 'react';
-
import RcPagination from 'rc-pagination';
-
import 'rc-pagination/dist/rc-pagination.min.css';
-
-
class Pagination extends React.Component{
-
constructor(props){
-
super(props);
-
}
-
render(){
-
return(
-
<div className="row">
-
<div className="col-md-12">
-
<RcPagination {...this.props}
-
hideOnSinglePage
-
showQuickJumper/>
-
</div>
-
</div>
-
);
-
}
-
}
5.使用, Pagination组件里边要传入两个参数,一是current 当前页,二是total总记录数, pageSize每一页的记录数量默认为10
-
import Pagination from 'util/pagination/index.jsx';
-
-
<Pagination current={this.state.pageNum}
-
total={this.state.total}
-
onChange={(pageNum) => {this.onPageNumChange(pageNum)}}/>
6.Pagination组件里边可以定义onchange事件, Function(current, pageSize) ,参数是当前页current和pageSizeme每页的记录数
使用SuperSocket实现TLV自定义协议网络通信的Demo
让Silverlight支持GB2312中文编码
在Sqlite中通过Replace来实现插入和更新
在VS2010项目中引用Lib静态库(以Openssl为例)
金融系统中PBOC/EMV的TLV的算法实现(含C++/C#)
在Windows下C++实现UNIX中的GZ格式的解压缩(附工具)
Opensuse网络配置备忘
项目管理理论与实践系列文章索引
让Windows远程访问Opensuse桌面的解决办法