luna-plus 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,21 +1,56 @@
|
|
|
1
|
-
import type { PaginationLayout } from './types';
|
|
1
|
+
import type { PaginationLayout, PaginationSize, PaginationShowTotal } from './types';
|
|
2
2
|
interface PaginationProps {
|
|
3
|
-
|
|
3
|
+
/** 当前页(受控) */
|
|
4
|
+
current?: number;
|
|
5
|
+
/** 默认当前页(非受控) */
|
|
6
|
+
defaultCurrent?: number;
|
|
7
|
+
|
|
8
|
+
/** 每页条数(受控) */
|
|
4
9
|
pageSize?: number;
|
|
10
|
+
/** 默认每页条数(非受控) */
|
|
11
|
+
defaultPageSize?: number;
|
|
12
|
+
|
|
13
|
+
/** 总条数 */
|
|
5
14
|
total?: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
/** 页码按钮数量 */
|
|
16
|
+
pageBufferSize?: number;
|
|
17
|
+
|
|
18
|
+
/** 是否禁用 */
|
|
9
19
|
disabled?: boolean;
|
|
20
|
+
/** 是否隐藏只有一页时的分页 */
|
|
10
21
|
hideOnSinglePage?: boolean;
|
|
11
|
-
|
|
22
|
+
|
|
23
|
+
/** 尺寸 */
|
|
24
|
+
size?: PaginationSize;
|
|
25
|
+
/** 是否使用背景色 */
|
|
12
26
|
background?: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
27
|
+
/** 简洁模式 */
|
|
28
|
+
simple?: boolean;
|
|
29
|
+
|
|
30
|
+
/** 是否显示总数 */
|
|
31
|
+
showTotal?: boolean | PaginationShowTotal;
|
|
32
|
+
/** 是否显示 pageSize 选择器 */
|
|
33
|
+
showSizeChanger?: boolean;
|
|
34
|
+
/** pageSize 选项 */
|
|
35
|
+
pageSizeOptions?: number[];
|
|
36
|
+
/** 是否显示快速跳转 */
|
|
37
|
+
showQuickJumper?: boolean;
|
|
38
|
+
|
|
39
|
+
/** 布局 */
|
|
40
|
+
layout?: PaginationLayout[];
|
|
41
|
+
|
|
42
|
+
/** 页码变化回调 */
|
|
43
|
+
onChange?: (page: number, pageSize: number) => void;
|
|
44
|
+
/** pageSize 变化回调 */
|
|
45
|
+
onShowSizeChange?: (current: number, size: number) => void;
|
|
46
|
+
|
|
47
|
+
/** 上一页文本 */
|
|
15
48
|
prevText?: string;
|
|
49
|
+
/** 下一页文本 */
|
|
16
50
|
nextText?: string;
|
|
51
|
+
/** 自定义类名 */
|
|
17
52
|
class?: string;
|
|
18
53
|
}
|
|
19
|
-
declare const Pagination: import("svelte").Component<PaginationProps, {}, "
|
|
54
|
+
declare const Pagination: import("svelte").Component<PaginationProps, {}, "current" | "pageSize">;
|
|
20
55
|
type Pagination = ReturnType<typeof Pagination>;
|
|
21
56
|
export default Pagination;
|