1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import CommonProps from '../util';
|
5 | import { PopupProps } from '../overlay';
|
6 | import { SelectProps } from '../select';
|
7 |
|
8 | interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
|
9 | onChange?: any;
|
10 | }
|
11 |
|
12 | export interface PaginationProps extends HTMLAttributesWeak, CommonProps {
|
13 |
|
14 | |
15 |
|
16 |
|
17 | type?: 'normal' | 'simple' | 'mini';
|
18 |
|
19 | |
20 |
|
21 |
|
22 | shape?: 'normal' | 'arrow-only' | 'arrow-prev-only' | 'no-border';
|
23 |
|
24 | |
25 |
|
26 |
|
27 | size?: 'small' | 'medium' | 'large';
|
28 |
|
29 | |
30 |
|
31 |
|
32 | current?: number;
|
33 |
|
34 | |
35 |
|
36 |
|
37 | defaultCurrent?: number;
|
38 |
|
39 | |
40 |
|
41 |
|
42 | onChange?: (current: number, e: {}) => void;
|
43 |
|
44 | |
45 |
|
46 |
|
47 | total?: number;
|
48 |
|
49 | |
50 |
|
51 |
|
52 | totalRender?: (total: number, range: Array<any>) => void;
|
53 |
|
54 | |
55 |
|
56 |
|
57 | pageShowCount?: number;
|
58 |
|
59 | |
60 |
|
61 |
|
62 | pageSize?: number;
|
63 |
|
64 | |
65 |
|
66 |
|
67 | pageSizeSelector?: false | 'filter' | 'dropdown';
|
68 |
|
69 | |
70 |
|
71 |
|
72 | pageSizeList?: Array<any> | Array<any>;
|
73 |
|
74 | |
75 |
|
76 |
|
77 | pageNumberRender?: (index: number) => React.ReactNode;
|
78 |
|
79 | |
80 |
|
81 |
|
82 | pageSizePosition?: 'start' | 'end';
|
83 |
|
84 | |
85 |
|
86 |
|
87 | useFloatLayout?: boolean;
|
88 |
|
89 | |
90 |
|
91 |
|
92 | onPageSizeChange?: (pageSize: number) => void;
|
93 |
|
94 | |
95 |
|
96 |
|
97 | hideOnlyOnePage?: boolean;
|
98 |
|
99 | |
100 |
|
101 |
|
102 | showJump?: boolean;
|
103 |
|
104 | |
105 |
|
106 |
|
107 | link?: string;
|
108 |
|
109 | |
110 |
|
111 |
|
112 | popupProps?: PopupProps;
|
113 | selectProps?: SelectProps;
|
114 | }
|
115 |
|
116 | export default class Pagination extends React.Component<PaginationProps, any> {}
|