1.3.7-alpha.1 • Published 11 months ago
@gaopeng123/rc-paginated-list v1.3.7-alpha.1
rc-paginated-list
TODO: 滚动分页表格
参数
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
request | 数据请求函数 | (params: PaginationProps, abortController: AbortController) => Promise | |
render | 渲染行数据 | (record: any, style: React.CSSProperties) => ReactNode; | |
params | 传递的参数 | {} | {} |
pagination | 分页数据 | PaginationProps = { pageSize?: number; current?: number; }; | {current:1, pageSize:20} |
height | 表格高度 | number | 600 |
itemSize | 每一行数据高度 | number | 40 |
primaryColor | 主要颜色,用户loading加载 | string | #31CD70 |
Usage
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { RcPaginatedList, RcDownLoading, RcTopLoading } from "../src";
import "@gaopeng123/rc-paginated-list/rc-paginated-list.cjs.development.css"
const App = () => {
const request = (params: any, abortController)=> {
// @ts-ignore
return new Promise<any>((resolve, reject)=> {
setTimeout(() => {
resolve({
// @ts-ignore
data: new Array(20).fill({}).map((item:any, index)=> {
return {
name: `name-${index * params.current}`
}
}),
total: 100
})
}, 1000);
})
}
return (
<>
<RcPaginatedList
request={request}
render={(record, style)=> {
return <div style={style}>{record.name}</div>
}}
/>
</>
);
};
ReactDOM.render(<App/>, document.getElementById('root'));
1.3.7-alpha.1
11 months ago
1.3.5
1 year ago
1.3.0
2 years ago
1.2.18
2 years ago
1.2.12
2 years ago
1.2.13
2 years ago
1.2.11
2 years ago
1.2.15
2 years ago
1.0.2
2 years ago
0.9.12
2 years ago
0.9.8
2 years ago
0.9.7
2 years ago
0.9.14
2 years ago
0.9.4
2 years ago
1.0.2-alpha.9
2 years ago
0.9.3
2 years ago
1.0.2-alpha.6
2 years ago
0.9.10
2 years ago
0.9.6
2 years ago
1.0.2-alpha.10
2 years ago
0.9.11
2 years ago
0.9.5
2 years ago
1.0.3
2 years ago
1.0.2-alpha.4
2 years ago
1.0.2-alpha.5
2 years ago
1.0.2-alpha.2
2 years ago
1.0.2-alpha.3
2 years ago
0.8.5
2 years ago
0.8.4
2 years ago
0.8.1
3 years ago
0.7.0
3 years ago
0.6.19
3 years ago
0.6.18
3 years ago
0.6.17
3 years ago
0.6.16
3 years ago
0.6.2
3 years ago
0.6.0
3 years ago
0.5.1
3 years ago
0.5.0
3 years ago