twcpt 0.0.2 → 0.0.4
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/README.md +33 -4
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.d.ts +0 -7
- package/dist/charts.es.js +1 -9
- package/dist/components/j-tw-btn/index.d.ts +51 -14
- package/dist/components/j-tw-btn/types.d.ts +19 -4
- package/dist/components/j-tw-checkbox/index.d.ts +230 -0
- package/dist/components/j-tw-checkbox/types.d.ts +35 -0
- package/dist/components/j-tw-checkbox-group/index.d.ts +309 -0
- package/dist/components/j-tw-checkbox-group/types.d.ts +38 -0
- package/dist/components/j-tw-confirm-dialog/index.d.ts +704 -0
- package/dist/components/j-tw-confirm-dialog/jwConfirmDialog.d.ts +2 -0
- package/dist/components/j-tw-confirm-dialog/types.d.ts +79 -0
- package/dist/components/j-tw-date-picker/index.d.ts +1645 -0
- package/dist/components/j-tw-date-picker/types.d.ts +162 -0
- package/dist/components/j-tw-dialog/index.d.ts +793 -0
- package/dist/components/j-tw-dialog/jwDialog.d.ts +38 -0
- package/dist/components/j-tw-dialog/types.d.ts +122 -0
- package/dist/components/j-tw-dropdown-btn/index.d.ts +3 -0
- package/dist/components/j-tw-dropdown-btn/types.d.ts +69 -0
- package/dist/components/j-tw-form/index.d.ts +368 -0
- package/dist/components/j-tw-form/types.d.ts +18 -0
- package/dist/components/j-tw-form-item/index.d.ts +248 -0
- package/dist/components/j-tw-form-item/types.d.ts +21 -0
- package/dist/components/j-tw-form-label/index.d.ts +66 -0
- package/dist/components/j-tw-input/index.d.ts +537 -0
- package/dist/components/j-tw-input/types.d.ts +76 -0
- package/dist/components/j-tw-messages/MessageItem.d.ts +84 -0
- package/dist/components/j-tw-messages/index.d.ts +110 -0
- package/dist/components/j-tw-messages/jwMessages.d.ts +2 -0
- package/dist/components/j-tw-messages/state.d.ts +23 -0
- package/dist/components/j-tw-messages/types.d.ts +31 -0
- package/dist/components/j-tw-radio/index.d.ts +168 -0
- package/dist/components/j-tw-radio/types.d.ts +29 -0
- package/dist/components/j-tw-radio-group/index.d.ts +244 -0
- package/dist/components/j-tw-radio-group/types.d.ts +37 -0
- package/dist/components/j-tw-status-img/index.d.ts +36 -0
- package/dist/components/j-tw-status-img/types.d.ts +3 -0
- package/dist/components/j-tw-table/index.d.ts +480 -0
- package/dist/components/j-tw-table/types.d.ts +157 -0
- package/dist/components/j-tw-tree-select/TreeNode.d.ts +124 -0
- package/dist/components/j-tw-tree-select/index.d.ts +292 -0
- package/dist/components/j-tw-tree-select/types.d.ts +110 -0
- package/dist/components/j-tw-tree-select-btn/TreeNode.d.ts +107 -0
- package/dist/components/j-tw-tree-select-btn/index.d.ts +1505 -0
- package/dist/components/j-tw-tree-select-btn/types.d.ts +104 -0
- package/dist/global.d.ts +128 -38
- package/dist/index.css +1 -1
- package/dist/index.d.ts +44 -8
- package/dist/shims-svg.d.ts +4 -0
- package/dist/twcpt-styles.css +1 -1
- package/dist/twcpt.cjs.js +12 -1
- package/dist/twcpt.es.js +4521 -1488
- package/dist/types.d.ts +1 -1
- package/dist/utils/init.d.ts +19 -0
- package/dist/utils/tool.d.ts +1 -1
- package/dist/utils/useBizRequest.d.ts +12 -0
- package/package.json +4 -4
- package/dist/charts-CKv8I1ye.js +0 -879
- package/dist/charts-DIdINgA4.cjs +0 -1
- package/dist/charts.css +0 -1
- package/dist/components/j-ch-bar/index.d.ts +0 -50
- package/dist/components/j-ch-bar/types.d.ts +0 -42
- package/dist/components/j-ch-bar-line/index.d.ts +0 -49
- package/dist/components/j-ch-bar-line/types.d.ts +0 -42
- package/dist/components/j-ch-bubble/index.d.ts +0 -54
- package/dist/components/j-ch-bubble/types.d.ts +0 -51
- package/dist/components/j-ch-line/index.d.ts +0 -57
- package/dist/components/j-ch-line/types.d.ts +0 -42
- package/dist/components/j-ch-pie-doughnut/index.d.ts +0 -60
- package/dist/components/j-ch-pie-doughnut/types.d.ts +0 -55
- package/dist/components/j-ch-radar/index.d.ts +0 -49
- package/dist/components/j-ch-radar/types.d.ts +0 -42
- package/dist/utils/chart.d.ts +0 -28
- package/dist/utils/website-config.d.ts +0 -15
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
import { PropType, DefineComponent, ExtractPropTypes, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, ObjectPlugin, CSSProperties, Component, VNode, RendererNode, RendererElement } from 'vue';
|
|
2
|
+
import { JTWTableColumn, JTWTablePagination } from './types';
|
|
3
|
+
import { CheckboxProps, CheckboxValueType, ComponentSize, CheckboxGroupProps, CheckboxGroupValueType } from 'element-plus';
|
|
4
|
+
import { SFCWithInstall, EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils/index.mjs';
|
|
5
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
6
|
+
rows: {
|
|
7
|
+
type: PropType<any[]>;
|
|
8
|
+
default: () => never[];
|
|
9
|
+
};
|
|
10
|
+
columns: {
|
|
11
|
+
type: PropType<JTWTableColumn[]>;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
rowKey: {
|
|
15
|
+
type: PropType<string | ((row: any) => string)>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
loading: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
height: {
|
|
23
|
+
type: PropType<string | number>;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
pagination: {
|
|
27
|
+
type: PropType<JTWTablePagination | false>;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
showIndex: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
selection: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
dense: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
emptyText: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
bordered: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
stripe: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
}>, {
|
|
55
|
+
tableRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
56
|
+
selectedRows: Ref<any[], any[]>;
|
|
57
|
+
isAllSelected: ComputedRef<boolean>;
|
|
58
|
+
isIndeterminate: ComputedRef<boolean>;
|
|
59
|
+
isRowSelected: (row: any) => boolean;
|
|
60
|
+
getRowKey: (row: any, index: number) => string | number;
|
|
61
|
+
getColStyle: (col: JTWTableColumn) => Record<string, string>;
|
|
62
|
+
emptyText: string;
|
|
63
|
+
handleSelectAll: (val: boolean) => void;
|
|
64
|
+
handleRowSelect: (row: any, val: boolean) => void;
|
|
65
|
+
handleSortChange: (data: {
|
|
66
|
+
column: any;
|
|
67
|
+
prop: string;
|
|
68
|
+
order: string;
|
|
69
|
+
}) => void;
|
|
70
|
+
handleSizeChange: (size: number) => void;
|
|
71
|
+
handleCurrentChange: (page: number) => void;
|
|
72
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
73
|
+
selectionChange: (_selection: any[]) => true;
|
|
74
|
+
sortChange: (_data: {
|
|
75
|
+
column: any;
|
|
76
|
+
prop: string;
|
|
77
|
+
order: string;
|
|
78
|
+
}) => true;
|
|
79
|
+
sizeChange: (_size: number) => true;
|
|
80
|
+
currentChange: (_page: number) => true;
|
|
81
|
+
'update:pagination': (_pagination: JTWTablePagination) => true;
|
|
82
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
83
|
+
rows: {
|
|
84
|
+
type: PropType<any[]>;
|
|
85
|
+
default: () => never[];
|
|
86
|
+
};
|
|
87
|
+
columns: {
|
|
88
|
+
type: PropType<JTWTableColumn[]>;
|
|
89
|
+
default: () => never[];
|
|
90
|
+
};
|
|
91
|
+
rowKey: {
|
|
92
|
+
type: PropType<string | ((row: any) => string)>;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
loading: {
|
|
96
|
+
type: BooleanConstructor;
|
|
97
|
+
default: boolean;
|
|
98
|
+
};
|
|
99
|
+
height: {
|
|
100
|
+
type: PropType<string | number>;
|
|
101
|
+
default: undefined;
|
|
102
|
+
};
|
|
103
|
+
pagination: {
|
|
104
|
+
type: PropType<JTWTablePagination | false>;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
showIndex: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
111
|
+
selection: {
|
|
112
|
+
type: BooleanConstructor;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
115
|
+
dense: {
|
|
116
|
+
type: BooleanConstructor;
|
|
117
|
+
default: boolean;
|
|
118
|
+
};
|
|
119
|
+
emptyText: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
default: string;
|
|
122
|
+
};
|
|
123
|
+
bordered: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
stripe: {
|
|
128
|
+
type: BooleanConstructor;
|
|
129
|
+
default: boolean;
|
|
130
|
+
};
|
|
131
|
+
}>> & Readonly<{
|
|
132
|
+
onSelectionChange?: ((_selection: any[]) => any) | undefined;
|
|
133
|
+
onSortChange?: ((_data: {
|
|
134
|
+
column: any;
|
|
135
|
+
prop: string;
|
|
136
|
+
order: string;
|
|
137
|
+
}) => any) | undefined;
|
|
138
|
+
onSizeChange?: ((_size: number) => any) | undefined;
|
|
139
|
+
onCurrentChange?: ((_page: number) => any) | undefined;
|
|
140
|
+
"onUpdate:pagination"?: ((_pagination: JTWTablePagination) => any) | undefined;
|
|
141
|
+
}>, {
|
|
142
|
+
loading: boolean;
|
|
143
|
+
height: string | number;
|
|
144
|
+
dense: boolean;
|
|
145
|
+
rows: any[];
|
|
146
|
+
columns: JTWTableColumn[];
|
|
147
|
+
rowKey: string | ((row: any) => string);
|
|
148
|
+
pagination: false | JTWTablePagination;
|
|
149
|
+
showIndex: boolean;
|
|
150
|
+
selection: boolean;
|
|
151
|
+
bordered: boolean;
|
|
152
|
+
stripe: boolean;
|
|
153
|
+
emptyText: string;
|
|
154
|
+
}, {}, {
|
|
155
|
+
ElCheckbox: {
|
|
156
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< CheckboxProps> & Readonly<{
|
|
157
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
158
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
159
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
160
|
+
change: (val: CheckboxValueType) => void;
|
|
161
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
162
|
+
}, PublicProps, {
|
|
163
|
+
value: string | boolean | number | object;
|
|
164
|
+
label: string | boolean | number | object;
|
|
165
|
+
disabled: boolean;
|
|
166
|
+
validateEvent: boolean;
|
|
167
|
+
modelValue: number | string | boolean;
|
|
168
|
+
id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
trueValue: string | number;
|
|
171
|
+
falseValue: string | number;
|
|
172
|
+
trueLabel: string | number;
|
|
173
|
+
falseLabel: string | number;
|
|
174
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
175
|
+
P: {};
|
|
176
|
+
B: {};
|
|
177
|
+
D: {};
|
|
178
|
+
C: {};
|
|
179
|
+
M: {};
|
|
180
|
+
Defaults: {};
|
|
181
|
+
}, Readonly< CheckboxProps> & Readonly<{
|
|
182
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
183
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
184
|
+
}>, {}, {}, {}, {}, {
|
|
185
|
+
value: string | boolean | number | object;
|
|
186
|
+
label: string | boolean | number | object;
|
|
187
|
+
disabled: boolean;
|
|
188
|
+
validateEvent: boolean;
|
|
189
|
+
modelValue: number | string | boolean;
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
trueValue: string | number;
|
|
193
|
+
falseValue: string | number;
|
|
194
|
+
trueLabel: string | number;
|
|
195
|
+
falseLabel: string | number;
|
|
196
|
+
}>;
|
|
197
|
+
__isFragment?: never;
|
|
198
|
+
__isTeleport?: never;
|
|
199
|
+
__isSuspense?: never;
|
|
200
|
+
} & ComponentOptionsBase<Readonly< CheckboxProps> & Readonly<{
|
|
201
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
202
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
203
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
204
|
+
change: (val: CheckboxValueType) => void;
|
|
205
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
206
|
+
}, string, {
|
|
207
|
+
value: string | boolean | number | object;
|
|
208
|
+
label: string | boolean | number | object;
|
|
209
|
+
disabled: boolean;
|
|
210
|
+
validateEvent: boolean;
|
|
211
|
+
modelValue: number | string | boolean;
|
|
212
|
+
id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
trueValue: string | number;
|
|
215
|
+
falseValue: string | number;
|
|
216
|
+
trueLabel: string | number;
|
|
217
|
+
falseLabel: string | number;
|
|
218
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
219
|
+
$slots: {
|
|
220
|
+
default?: (props: {}) => any;
|
|
221
|
+
};
|
|
222
|
+
}) & ObjectPlugin & {
|
|
223
|
+
setPropsDefaults: (defaults: Partial<{
|
|
224
|
+
readonly modelValue?: number | string | boolean | undefined;
|
|
225
|
+
readonly label?: string | boolean | number | object | undefined;
|
|
226
|
+
readonly value?: string | boolean | number | object | undefined;
|
|
227
|
+
readonly indeterminate?: boolean | undefined;
|
|
228
|
+
readonly disabled?: boolean | undefined;
|
|
229
|
+
readonly checked?: boolean | undefined;
|
|
230
|
+
readonly name?: string | undefined;
|
|
231
|
+
readonly trueValue?: string | number | undefined;
|
|
232
|
+
readonly falseValue?: string | number | undefined;
|
|
233
|
+
readonly trueLabel?: string | number | undefined;
|
|
234
|
+
readonly falseLabel?: string | number | undefined;
|
|
235
|
+
readonly id?: string | undefined;
|
|
236
|
+
readonly border?: boolean | undefined;
|
|
237
|
+
readonly size?: ComponentSize | undefined;
|
|
238
|
+
readonly tabindex?: string | number | undefined;
|
|
239
|
+
readonly validateEvent?: boolean | undefined;
|
|
240
|
+
readonly ariaLabel?: string | undefined;
|
|
241
|
+
readonly ariaControls?: string | undefined;
|
|
242
|
+
readonly onChange?: ((val: CheckboxValueType) => any) | undefined | undefined;
|
|
243
|
+
readonly "onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined | undefined;
|
|
244
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps>) => void;
|
|
245
|
+
} & {
|
|
246
|
+
CheckboxButton: {
|
|
247
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< CheckboxProps> & Readonly<{
|
|
248
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
249
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
250
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
251
|
+
change: (val: CheckboxValueType) => void;
|
|
252
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
253
|
+
}, PublicProps, {
|
|
254
|
+
value: string | boolean | number | object;
|
|
255
|
+
label: string | boolean | number | object;
|
|
256
|
+
disabled: boolean;
|
|
257
|
+
validateEvent: boolean;
|
|
258
|
+
modelValue: number | string | boolean;
|
|
259
|
+
id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
trueValue: string | number;
|
|
262
|
+
falseValue: string | number;
|
|
263
|
+
trueLabel: string | number;
|
|
264
|
+
falseLabel: string | number;
|
|
265
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
266
|
+
P: {};
|
|
267
|
+
B: {};
|
|
268
|
+
D: {};
|
|
269
|
+
C: {};
|
|
270
|
+
M: {};
|
|
271
|
+
Defaults: {};
|
|
272
|
+
}, Readonly< CheckboxProps> & Readonly<{
|
|
273
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
274
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
275
|
+
}>, {}, {}, {}, {}, {
|
|
276
|
+
value: string | boolean | number | object;
|
|
277
|
+
label: string | boolean | number | object;
|
|
278
|
+
disabled: boolean;
|
|
279
|
+
validateEvent: boolean;
|
|
280
|
+
modelValue: number | string | boolean;
|
|
281
|
+
id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
trueValue: string | number;
|
|
284
|
+
falseValue: string | number;
|
|
285
|
+
trueLabel: string | number;
|
|
286
|
+
falseLabel: string | number;
|
|
287
|
+
}>;
|
|
288
|
+
__isFragment?: never;
|
|
289
|
+
__isTeleport?: never;
|
|
290
|
+
__isSuspense?: never;
|
|
291
|
+
} & ComponentOptionsBase<Readonly< CheckboxProps> & Readonly<{
|
|
292
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
293
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
294
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
295
|
+
change: (val: CheckboxValueType) => void;
|
|
296
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
297
|
+
}, string, {
|
|
298
|
+
value: string | boolean | number | object;
|
|
299
|
+
label: string | boolean | number | object;
|
|
300
|
+
disabled: boolean;
|
|
301
|
+
validateEvent: boolean;
|
|
302
|
+
modelValue: number | string | boolean;
|
|
303
|
+
id: string;
|
|
304
|
+
name: string;
|
|
305
|
+
trueValue: string | number;
|
|
306
|
+
falseValue: string | number;
|
|
307
|
+
trueLabel: string | number;
|
|
308
|
+
falseLabel: string | number;
|
|
309
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
310
|
+
$slots: {
|
|
311
|
+
default?: (props: {}) => any;
|
|
312
|
+
};
|
|
313
|
+
});
|
|
314
|
+
CheckboxGroup: {
|
|
315
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< CheckboxGroupProps> & Readonly<{
|
|
316
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
317
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
318
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
319
|
+
change: (val: CheckboxValueType[]) => void;
|
|
320
|
+
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
321
|
+
}, PublicProps, {
|
|
322
|
+
type: "checkbox" | "button";
|
|
323
|
+
props: {
|
|
324
|
+
value?: string;
|
|
325
|
+
label?: string;
|
|
326
|
+
disabled?: string;
|
|
327
|
+
};
|
|
328
|
+
disabled: boolean;
|
|
329
|
+
validateEvent: boolean;
|
|
330
|
+
modelValue: CheckboxGroupValueType;
|
|
331
|
+
tag: string;
|
|
332
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
333
|
+
P: {};
|
|
334
|
+
B: {};
|
|
335
|
+
D: {};
|
|
336
|
+
C: {};
|
|
337
|
+
M: {};
|
|
338
|
+
Defaults: {};
|
|
339
|
+
}, Readonly< CheckboxGroupProps> & Readonly<{
|
|
340
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
341
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
342
|
+
}>, {}, {}, {}, {}, {
|
|
343
|
+
type: "checkbox" | "button";
|
|
344
|
+
props: {
|
|
345
|
+
value?: string;
|
|
346
|
+
label?: string;
|
|
347
|
+
disabled?: string;
|
|
348
|
+
};
|
|
349
|
+
disabled: boolean;
|
|
350
|
+
validateEvent: boolean;
|
|
351
|
+
modelValue: CheckboxGroupValueType;
|
|
352
|
+
tag: string;
|
|
353
|
+
}>;
|
|
354
|
+
__isFragment?: never;
|
|
355
|
+
__isTeleport?: never;
|
|
356
|
+
__isSuspense?: never;
|
|
357
|
+
} & ComponentOptionsBase<Readonly< CheckboxGroupProps> & Readonly<{
|
|
358
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
359
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
360
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
361
|
+
change: (val: CheckboxValueType[]) => void;
|
|
362
|
+
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
363
|
+
}, string, {
|
|
364
|
+
type: "checkbox" | "button";
|
|
365
|
+
props: {
|
|
366
|
+
value?: string;
|
|
367
|
+
label?: string;
|
|
368
|
+
disabled?: string;
|
|
369
|
+
};
|
|
370
|
+
disabled: boolean;
|
|
371
|
+
validateEvent: boolean;
|
|
372
|
+
modelValue: CheckboxGroupValueType;
|
|
373
|
+
tag: string;
|
|
374
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
375
|
+
$slots: {
|
|
376
|
+
default?: (props: {}) => any;
|
|
377
|
+
};
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
ElPagination: SFCWithInstall<DefineComponent<ExtractPropTypes<{
|
|
381
|
+
readonly pageSize: NumberConstructor;
|
|
382
|
+
readonly defaultPageSize: NumberConstructor;
|
|
383
|
+
readonly total: NumberConstructor;
|
|
384
|
+
readonly pageCount: NumberConstructor;
|
|
385
|
+
readonly pagerCount: EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
386
|
+
readonly currentPage: NumberConstructor;
|
|
387
|
+
readonly defaultCurrentPage: NumberConstructor;
|
|
388
|
+
readonly layout: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
389
|
+
readonly pageSizes: EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | (((new (...args: any[]) => number[]) | (() => number[])) | null)[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
390
|
+
readonly popperClass: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
391
|
+
readonly popperStyle: {
|
|
392
|
+
readonly type: PropType< EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
393
|
+
readonly required: false;
|
|
394
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
395
|
+
__epPropKey: true;
|
|
396
|
+
};
|
|
397
|
+
readonly prevText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
398
|
+
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>;
|
|
399
|
+
readonly nextText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
400
|
+
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>;
|
|
401
|
+
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
402
|
+
readonly small: BooleanConstructor;
|
|
403
|
+
readonly size: {
|
|
404
|
+
readonly type: PropType< EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
|
405
|
+
readonly required: false;
|
|
406
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
407
|
+
__epPropKey: true;
|
|
408
|
+
};
|
|
409
|
+
readonly background: BooleanConstructor;
|
|
410
|
+
readonly disabled: BooleanConstructor;
|
|
411
|
+
readonly hideOnSinglePage: BooleanConstructor;
|
|
412
|
+
readonly appendSizeTo: StringConstructor;
|
|
413
|
+
}>, () => VNode<RendererNode, RendererElement, {
|
|
414
|
+
[key: string]: any;
|
|
415
|
+
}> | null, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
416
|
+
'update:current-page': (val: number) => boolean;
|
|
417
|
+
'update:page-size': (val: number) => boolean;
|
|
418
|
+
'size-change': (val: number) => boolean;
|
|
419
|
+
change: (currentPage: number, pageSize: number) => boolean;
|
|
420
|
+
'current-change': (val: number) => boolean;
|
|
421
|
+
'prev-click': (val: number) => boolean;
|
|
422
|
+
'next-click': (val: number) => boolean;
|
|
423
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
424
|
+
readonly pageSize: NumberConstructor;
|
|
425
|
+
readonly defaultPageSize: NumberConstructor;
|
|
426
|
+
readonly total: NumberConstructor;
|
|
427
|
+
readonly pageCount: NumberConstructor;
|
|
428
|
+
readonly pagerCount: EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
429
|
+
readonly currentPage: NumberConstructor;
|
|
430
|
+
readonly defaultCurrentPage: NumberConstructor;
|
|
431
|
+
readonly layout: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
432
|
+
readonly pageSizes: EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | (((new (...args: any[]) => number[]) | (() => number[])) | null)[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
433
|
+
readonly popperClass: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
434
|
+
readonly popperStyle: {
|
|
435
|
+
readonly type: PropType< EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
436
|
+
readonly required: false;
|
|
437
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
438
|
+
__epPropKey: true;
|
|
439
|
+
};
|
|
440
|
+
readonly prevText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
441
|
+
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>;
|
|
442
|
+
readonly nextText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
443
|
+
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>;
|
|
444
|
+
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
445
|
+
readonly small: BooleanConstructor;
|
|
446
|
+
readonly size: {
|
|
447
|
+
readonly type: PropType< EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
|
448
|
+
readonly required: false;
|
|
449
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
450
|
+
__epPropKey: true;
|
|
451
|
+
};
|
|
452
|
+
readonly background: BooleanConstructor;
|
|
453
|
+
readonly disabled: BooleanConstructor;
|
|
454
|
+
readonly hideOnSinglePage: BooleanConstructor;
|
|
455
|
+
readonly appendSizeTo: StringConstructor;
|
|
456
|
+
}>> & Readonly<{
|
|
457
|
+
onChange?: ((currentPage: number, pageSize: number) => any) | undefined;
|
|
458
|
+
"onUpdate:current-page"?: ((val: number) => any) | undefined;
|
|
459
|
+
"onUpdate:page-size"?: ((val: number) => any) | undefined;
|
|
460
|
+
"onSize-change"?: ((val: number) => any) | undefined;
|
|
461
|
+
"onCurrent-change"?: ((val: number) => any) | undefined;
|
|
462
|
+
"onPrev-click"?: ((val: number) => any) | undefined;
|
|
463
|
+
"onNext-click"?: ((val: number) => any) | undefined;
|
|
464
|
+
}>, {
|
|
465
|
+
readonly disabled: boolean;
|
|
466
|
+
readonly popperClass: string;
|
|
467
|
+
readonly teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
468
|
+
readonly background: boolean;
|
|
469
|
+
readonly layout: string;
|
|
470
|
+
readonly small: boolean;
|
|
471
|
+
readonly pagerCount: number;
|
|
472
|
+
readonly pageSizes: number[];
|
|
473
|
+
readonly prevText: string;
|
|
474
|
+
readonly prevIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
475
|
+
readonly nextText: string;
|
|
476
|
+
readonly nextIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
477
|
+
readonly hideOnSinglePage: boolean;
|
|
478
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>>;
|
|
479
|
+
}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
480
|
+
export default _default;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** 列对齐方式 */
|
|
3
|
+
export type JTWTableColumnAlign = 'left' | 'center' | 'right';
|
|
4
|
+
/** 列定义 */
|
|
5
|
+
export interface JTWTableColumn {
|
|
6
|
+
/** 列标识(对应数据字段名) */
|
|
7
|
+
prop: string;
|
|
8
|
+
/** 列标题 */
|
|
9
|
+
label: string;
|
|
10
|
+
/** 列宽度 */
|
|
11
|
+
width?: string | number;
|
|
12
|
+
/** 列最小宽度 */
|
|
13
|
+
minWidth?: string | number;
|
|
14
|
+
/** 对齐方式,默认 left */
|
|
15
|
+
align?: JTWTableColumnAlign;
|
|
16
|
+
/** 是否可排序 */
|
|
17
|
+
sortable?: boolean;
|
|
18
|
+
/** 是否固定列,fixed: true 或 'left' / 'right' */
|
|
19
|
+
fixed?: boolean | 'left' | 'right';
|
|
20
|
+
/**
|
|
21
|
+
* 列渲染类型
|
|
22
|
+
* - 'text':普通文字(默认)
|
|
23
|
+
* - 'slot':自定义插槽
|
|
24
|
+
*/
|
|
25
|
+
type?: 'text' | 'slot';
|
|
26
|
+
}
|
|
27
|
+
/** 分页配置 */
|
|
28
|
+
export interface JTWTablePagination {
|
|
29
|
+
/** 当前页,从 1 开始 */
|
|
30
|
+
page: number;
|
|
31
|
+
/** 每页条数 */
|
|
32
|
+
pageSize: number;
|
|
33
|
+
/** 总条数 */
|
|
34
|
+
total: number;
|
|
35
|
+
/** 可选每页条数 */
|
|
36
|
+
pageSizes?: number[];
|
|
37
|
+
/** 分页布局 */
|
|
38
|
+
layout?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @description JTWTable 表格组件(基于 Element Plus)
|
|
42
|
+
*/
|
|
43
|
+
export interface JTWTableProps {
|
|
44
|
+
/**
|
|
45
|
+
* 表格行数据
|
|
46
|
+
* @default []
|
|
47
|
+
*/
|
|
48
|
+
rows?: any[];
|
|
49
|
+
/**
|
|
50
|
+
* 列定义
|
|
51
|
+
*/
|
|
52
|
+
columns?: JTWTableColumn[];
|
|
53
|
+
/**
|
|
54
|
+
* 行数据唯一键
|
|
55
|
+
* @default 'id'
|
|
56
|
+
*/
|
|
57
|
+
rowKey?: string | ((row: any) => string);
|
|
58
|
+
/**
|
|
59
|
+
* 是否加载中
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
loading?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* 表格高度
|
|
65
|
+
*/
|
|
66
|
+
height?: string | number;
|
|
67
|
+
/**
|
|
68
|
+
* 是否显示分页
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
pagination?: JTWTablePagination | false;
|
|
72
|
+
/**
|
|
73
|
+
* 是否显示序号列
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
showIndex?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 是否显示多选列
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
selection?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 是否为紧凑模式
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
dense?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 是否显示边框
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
bordered?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* 是否显示斑马纹
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
stripe?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* 空数据文案
|
|
99
|
+
* @default '暂无数据'
|
|
100
|
+
*/
|
|
101
|
+
emptyText?: string;
|
|
102
|
+
}
|
|
103
|
+
/** JTWTable Emits 接口 */
|
|
104
|
+
export interface JTWTableEmits {
|
|
105
|
+
(e: 'selectionChange', selection: any[]): void;
|
|
106
|
+
(e: 'sortChange', data: {
|
|
107
|
+
column: any;
|
|
108
|
+
prop: string;
|
|
109
|
+
order: string;
|
|
110
|
+
}): void;
|
|
111
|
+
(e: 'sizeChange', size: number): void;
|
|
112
|
+
(e: 'currentChange', page: number): void;
|
|
113
|
+
(e: 'update:pagination', pagination: JTWTablePagination): void;
|
|
114
|
+
}
|
|
115
|
+
/** JTWTable Slots 接口 */
|
|
116
|
+
export interface JTWTableSlots {
|
|
117
|
+
/** 表格顶部插槽 */
|
|
118
|
+
header?: () => any;
|
|
119
|
+
/** 空数据插槽 */
|
|
120
|
+
empty?: () => any;
|
|
121
|
+
/** 操作列插槽 */
|
|
122
|
+
action?: (scope: {
|
|
123
|
+
row: any;
|
|
124
|
+
$index: number;
|
|
125
|
+
}) => any;
|
|
126
|
+
/** 自定义列插槽,name 格式为 col-{prop},其余 key 均为列插槽 */
|
|
127
|
+
[key: string]: any;
|
|
128
|
+
}
|
|
129
|
+
/** JTWTable 暴露的方法 */
|
|
130
|
+
export interface JTWTableExpose {
|
|
131
|
+
/** 表格根元素 */
|
|
132
|
+
$el: HTMLElement | undefined;
|
|
133
|
+
/** el-table 实例 */
|
|
134
|
+
tableRef: any;
|
|
135
|
+
/** 清空选择 */
|
|
136
|
+
clearSelection: () => void;
|
|
137
|
+
/** 切换行选中 */
|
|
138
|
+
toggleRowSelection: (row: any, selected?: boolean) => void;
|
|
139
|
+
}
|
|
140
|
+
/** JTWTable 组件类型定义 */
|
|
141
|
+
export type JTWTableComponent = DefineComponent<JTWTableProps, JTWTableExpose, {}, {}, {}, {}, {}, any>;
|
|
142
|
+
/** JTWTable 实例类型 */
|
|
143
|
+
export type JTWTableInstance = InstanceType<JTWTableComponent> & JTWTableExpose;
|
|
144
|
+
/** JTWTable 模板 Props(用于全局类型声明) */
|
|
145
|
+
export interface JTWTableTemplateProps extends JTWTableProps {
|
|
146
|
+
onSelectionChange?: (selection: any[]) => void;
|
|
147
|
+
onSortChange?: (data: {
|
|
148
|
+
column: any;
|
|
149
|
+
prop: string;
|
|
150
|
+
order: string;
|
|
151
|
+
}) => void;
|
|
152
|
+
onSizeChange?: (size: number) => void;
|
|
153
|
+
onCurrentChange?: (page: number) => void;
|
|
154
|
+
'onUpdate:pagination'?: (pagination: JTWTablePagination) => void;
|
|
155
|
+
class?: string | Record<string, boolean> | Array<string | Record<string, boolean>>;
|
|
156
|
+
style?: string | Record<string, string>;
|
|
157
|
+
}
|