twcpt 0.0.13 → 0.0.14
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.
- package/dist/components/j-tw-pagination/index.d.ts +189 -0
- package/dist/components/j-tw-pagination/types.d.ts +40 -0
- package/dist/components/j-tw-table/index.d.ts +326 -237
- package/dist/global.d.ts +10 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/twcpt-styles.css +1 -1
- package/dist/twcpt.cjs.js +2 -2
- package/dist/twcpt.es.js +1300 -1228
- package/package.json +1 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, CSSProperties, Component, ComponentProvideOptions, VNode, RendererNode, RendererElement } from 'vue';
|
|
2
|
+
import { SFCWithInstall, EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils/index.mjs';
|
|
3
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
4
|
+
page: {
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
pageSize: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
total: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
pageSizes: {
|
|
17
|
+
type: PropType<number[]>;
|
|
18
|
+
default: () => number[];
|
|
19
|
+
};
|
|
20
|
+
layout: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
pagerCount: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
background: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
disabled: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>, {
|
|
37
|
+
handleSizeChange: (size: number) => void;
|
|
38
|
+
handleCurrentChange: (page: number) => void;
|
|
39
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
40
|
+
sizeChange: (_size: number) => true;
|
|
41
|
+
currentChange: (_page: number) => true;
|
|
42
|
+
'update:page': (_page: number) => true;
|
|
43
|
+
'update:pageSize': (_pageSize: number) => true;
|
|
44
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
45
|
+
page: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
pageSize: {
|
|
50
|
+
type: NumberConstructor;
|
|
51
|
+
required: true;
|
|
52
|
+
};
|
|
53
|
+
total: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
required: true;
|
|
56
|
+
};
|
|
57
|
+
pageSizes: {
|
|
58
|
+
type: PropType<number[]>;
|
|
59
|
+
default: () => number[];
|
|
60
|
+
};
|
|
61
|
+
layout: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
pagerCount: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
default: number;
|
|
68
|
+
};
|
|
69
|
+
background: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
disabled: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
}>> & Readonly<{
|
|
78
|
+
onSizeChange?: ((_size: number) => any) | undefined;
|
|
79
|
+
onCurrentChange?: ((_page: number) => any) | undefined;
|
|
80
|
+
"onUpdate:page"?: ((_page: number) => any) | undefined;
|
|
81
|
+
"onUpdate:pageSize"?: ((_pageSize: number) => any) | undefined;
|
|
82
|
+
}>, {
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
pagerCount: number;
|
|
85
|
+
layout: string;
|
|
86
|
+
pageSizes: number[];
|
|
87
|
+
background: boolean;
|
|
88
|
+
}, {}, {
|
|
89
|
+
ElPagination: SFCWithInstall<DefineComponent<ExtractPropTypes<{
|
|
90
|
+
readonly pageSize: NumberConstructor;
|
|
91
|
+
readonly defaultPageSize: NumberConstructor;
|
|
92
|
+
readonly total: NumberConstructor;
|
|
93
|
+
readonly pageCount: NumberConstructor;
|
|
94
|
+
readonly pagerCount: EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
95
|
+
readonly currentPage: NumberConstructor;
|
|
96
|
+
readonly defaultCurrentPage: NumberConstructor;
|
|
97
|
+
readonly layout: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
98
|
+
readonly pageSizes: EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | (((new (...args: any[]) => number[]) | (() => number[])) | null)[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
99
|
+
readonly popperClass: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
100
|
+
readonly popperStyle: {
|
|
101
|
+
readonly type: PropType< EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
102
|
+
readonly required: false;
|
|
103
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
104
|
+
__epPropKey: true;
|
|
105
|
+
};
|
|
106
|
+
readonly prevText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
107
|
+
readonly prevIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, boolean>;
|
|
108
|
+
readonly nextText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
109
|
+
readonly nextIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, boolean>;
|
|
110
|
+
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
111
|
+
readonly small: BooleanConstructor;
|
|
112
|
+
readonly size: {
|
|
113
|
+
readonly type: PropType< EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
|
114
|
+
readonly required: false;
|
|
115
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
116
|
+
__epPropKey: true;
|
|
117
|
+
};
|
|
118
|
+
readonly background: BooleanConstructor;
|
|
119
|
+
readonly disabled: BooleanConstructor;
|
|
120
|
+
readonly hideOnSinglePage: BooleanConstructor;
|
|
121
|
+
readonly appendSizeTo: StringConstructor;
|
|
122
|
+
}>, () => VNode<RendererNode, RendererElement, {
|
|
123
|
+
[key: string]: any;
|
|
124
|
+
}> | null, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
125
|
+
'update:current-page': (val: number) => boolean;
|
|
126
|
+
'update:page-size': (val: number) => boolean;
|
|
127
|
+
'size-change': (val: number) => boolean;
|
|
128
|
+
change: (currentPage: number, pageSize: number) => boolean;
|
|
129
|
+
'current-change': (val: number) => boolean;
|
|
130
|
+
'prev-click': (val: number) => boolean;
|
|
131
|
+
'next-click': (val: number) => boolean;
|
|
132
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
133
|
+
readonly pageSize: NumberConstructor;
|
|
134
|
+
readonly defaultPageSize: NumberConstructor;
|
|
135
|
+
readonly total: NumberConstructor;
|
|
136
|
+
readonly pageCount: NumberConstructor;
|
|
137
|
+
readonly pagerCount: EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
138
|
+
readonly currentPage: NumberConstructor;
|
|
139
|
+
readonly defaultCurrentPage: NumberConstructor;
|
|
140
|
+
readonly layout: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
141
|
+
readonly pageSizes: EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | (((new (...args: any[]) => number[]) | (() => number[])) | null)[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
142
|
+
readonly popperClass: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
143
|
+
readonly popperStyle: {
|
|
144
|
+
readonly type: PropType< EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
145
|
+
readonly required: false;
|
|
146
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
147
|
+
__epPropKey: true;
|
|
148
|
+
};
|
|
149
|
+
readonly prevText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
150
|
+
readonly prevIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, boolean>;
|
|
151
|
+
readonly nextText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
152
|
+
readonly nextIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, boolean>;
|
|
153
|
+
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
154
|
+
readonly small: BooleanConstructor;
|
|
155
|
+
readonly size: {
|
|
156
|
+
readonly type: PropType< EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
|
157
|
+
readonly required: false;
|
|
158
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
159
|
+
__epPropKey: true;
|
|
160
|
+
};
|
|
161
|
+
readonly background: BooleanConstructor;
|
|
162
|
+
readonly disabled: BooleanConstructor;
|
|
163
|
+
readonly hideOnSinglePage: BooleanConstructor;
|
|
164
|
+
readonly appendSizeTo: StringConstructor;
|
|
165
|
+
}>> & Readonly<{
|
|
166
|
+
onChange?: ((currentPage: number, pageSize: number) => any) | undefined;
|
|
167
|
+
"onUpdate:current-page"?: ((val: number) => any) | undefined;
|
|
168
|
+
"onUpdate:page-size"?: ((val: number) => any) | undefined;
|
|
169
|
+
"onSize-change"?: ((val: number) => any) | undefined;
|
|
170
|
+
"onCurrent-change"?: ((val: number) => any) | undefined;
|
|
171
|
+
"onPrev-click"?: ((val: number) => any) | undefined;
|
|
172
|
+
"onNext-click"?: ((val: number) => any) | undefined;
|
|
173
|
+
}>, {
|
|
174
|
+
readonly disabled: boolean;
|
|
175
|
+
readonly popperClass: string;
|
|
176
|
+
readonly teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
177
|
+
readonly background: boolean;
|
|
178
|
+
readonly layout: string;
|
|
179
|
+
readonly small: boolean;
|
|
180
|
+
readonly pagerCount: number;
|
|
181
|
+
readonly pageSizes: number[];
|
|
182
|
+
readonly prevText: string;
|
|
183
|
+
readonly prevIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
184
|
+
readonly nextText: string;
|
|
185
|
+
readonly nextIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
186
|
+
readonly hideOnSinglePage: boolean;
|
|
187
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>>;
|
|
188
|
+
}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
189
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** 分页配置 */
|
|
3
|
+
export interface JTWPaginationProps {
|
|
4
|
+
/** 当前页,从 1 开始 */
|
|
5
|
+
page: number;
|
|
6
|
+
/** 每页条数 */
|
|
7
|
+
pageSize: number;
|
|
8
|
+
/** 总条数 */
|
|
9
|
+
total: number;
|
|
10
|
+
/** 可选每页条数 */
|
|
11
|
+
pageSizes?: number[];
|
|
12
|
+
/** 分页布局 */
|
|
13
|
+
layout?: string;
|
|
14
|
+
/** 每页显示的页码按钮数量 */
|
|
15
|
+
pagerCount?: number;
|
|
16
|
+
/** 是否显示背景色 */
|
|
17
|
+
background?: boolean;
|
|
18
|
+
/** 是否禁用 */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** JTWPagination Emits 接口 */
|
|
22
|
+
export interface JTWPaginationEmits {
|
|
23
|
+
(e: 'sizeChange', size: number): void;
|
|
24
|
+
(e: 'currentChange', page: number): void;
|
|
25
|
+
(e: 'update:page', page: number): void;
|
|
26
|
+
(e: 'update:pageSize', pageSize: number): void;
|
|
27
|
+
}
|
|
28
|
+
/** JTWPagination 组件类型定义 */
|
|
29
|
+
export type JTWPaginationComponent = DefineComponent<JTWPaginationProps, {}, {}, {}, {}, {}, {}, any>;
|
|
30
|
+
/** JTWPagination 实例类型 */
|
|
31
|
+
export type JTWPaginationInstance = InstanceType<JTWPaginationComponent>;
|
|
32
|
+
/** JTWPagination 模板 Props(用于全局类型声明) */
|
|
33
|
+
export interface JTWPaginationTemplateProps extends JTWPaginationProps {
|
|
34
|
+
onSizeChange?: (size: number) => void;
|
|
35
|
+
onCurrentChange?: (page: number) => void;
|
|
36
|
+
'onUpdate:page'?: (page: number) => void;
|
|
37
|
+
'onUpdate:pageSize'?: (pageSize: number) => void;
|
|
38
|
+
class?: string | Record<string, boolean> | Array<string | Record<string, boolean>>;
|
|
39
|
+
style?: string | Record<string, string>;
|
|
40
|
+
}
|