mrxy-yk 1.6.2 → 1.7.0-beta.0

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,785 +1,16 @@
1
- import { UploadUserFile, UploadData, UploadRawFile, UploadHooks, ListType, UploadRequestHandler, Crossorigin, UploadFile, UploadFiles, UploadProgressEvent, UploadStatus } from 'element-plus';
2
- import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, PublicProps } from 'vue';
3
- import { Awaitable, Mutable } from 'element-plus/es/utils/typescript.mjs';
4
- import { UploadUserFile } from 'element-plus/es/components/upload/src/upload.mjs';
5
- import { OnCleanup } from '@vue/reactivity';
6
- type __VLS_Props = {
7
- modelValue: string[] | string;
8
- isJoin?: boolean;
9
- uploadClass?: string;
10
- accept?: string;
11
- width?: string;
12
- height?: string;
13
- maxSize?: number;
14
- limit?: number;
15
- drag?: boolean;
16
- getUrlMethod?(url: string): string;
17
- uploadMethod?(file: File): Promise<string>;
18
- };
19
- declare function uploadHandle(): Promise<string | any[]>;
20
- declare function clearFiles(): void;
1
+ import { DefineSetupFnComponent, PublicProps } from 'vue';
21
2
  declare function __VLS_template(): {
22
3
  attrs: Partial<{}>;
23
4
  slots: {
24
5
  default?(_: {}): any;
25
6
  };
26
7
  refs: {
27
- uploadRef: {
28
- $: ComponentInternalInstance;
29
- $data: {};
30
- $props: Partial<{
31
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
32
- disabled: boolean;
33
- name: string;
34
- onProgress: UploadHooks["onProgress"];
35
- onChange: UploadHooks["onChange"];
36
- onError: UploadHooks["onError"];
37
- method: string;
38
- action: string;
39
- accept: string;
40
- beforeUpload: UploadHooks["beforeUpload"];
41
- onRemove: UploadHooks["onRemove"];
42
- onPreview: UploadHooks["onPreview"];
43
- onSuccess: UploadHooks["onSuccess"];
44
- onExceed: UploadHooks["onExceed"];
45
- showFileList: boolean;
46
- fileList: UploadUserFile[];
47
- autoUpload: boolean;
48
- listType: ListType;
49
- httpRequest: UploadRequestHandler;
50
- }> & Omit<{
51
- readonly data: Mutable<{}>;
52
- readonly onChange: UploadHooks["onChange"];
53
- readonly onError: UploadHooks["onError"];
54
- readonly onProgress: UploadHooks["onProgress"];
55
- readonly name: string;
56
- readonly accept: string;
57
- readonly beforeUpload: UploadHooks["beforeUpload"];
58
- readonly onRemove: UploadHooks["onRemove"];
59
- readonly onPreview: UploadHooks["onPreview"];
60
- readonly onSuccess: UploadHooks["onSuccess"];
61
- readonly onExceed: UploadHooks["onExceed"];
62
- readonly action: string;
63
- readonly method: string;
64
- readonly showFileList: boolean;
65
- readonly fileList: UploadUserFile[];
66
- readonly autoUpload: boolean;
67
- readonly listType: ListType;
68
- readonly httpRequest: UploadRequestHandler;
69
- readonly drag?: boolean;
70
- readonly disabled?: boolean;
71
- readonly multiple?: boolean;
72
- readonly limit?: number;
73
- readonly beforeRemove?: UploadHooks["beforeRemove"];
74
- readonly crossorigin?: Crossorigin;
75
- readonly headers?: Headers | Record<string, any>;
76
- readonly withCredentials?: boolean;
77
- readonly directory?: boolean;
78
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "data" | "onChange" | "onError" | "onProgress" | "name" | "disabled" | "accept" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "method" | "showFileList" | "fileList" | "autoUpload" | "listType" | "httpRequest">;
79
- $attrs: {
80
- [x: string]: unknown;
81
- };
82
- $refs: {
83
- [x: string]: unknown;
84
- };
85
- $slots: Readonly<{
86
- [name: string]: globalThis.Slot;
87
- }>;
88
- $root: ComponentPublicInstance | null;
89
- $parent: ComponentPublicInstance | null;
90
- $host: Element | null;
91
- $emit: (event: string, ...args: any[]) => void;
92
- $el: any;
93
- $options: ComponentOptionsBase<Readonly<globalThis.ExtractPropTypes<{
94
- data: {
95
- type: globalThis.PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
96
- default: () => Mutable<{}>;
97
- };
98
- onChange: {
99
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
100
- default: () => void;
101
- };
102
- onError: {
103
- type: globalThis.PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
104
- default: () => void;
105
- };
106
- onProgress: {
107
- type: globalThis.PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
108
- default: () => void;
109
- };
110
- drag: {
111
- type: globalThis.PropType<boolean>;
112
- };
113
- name: {
114
- type: globalThis.PropType<string>;
115
- default: "file";
116
- };
117
- disabled: {
118
- type: globalThis.PropType<boolean>;
119
- default: undefined;
120
- };
121
- multiple: {
122
- type: globalThis.PropType<boolean>;
123
- };
124
- accept: {
125
- type: globalThis.PropType<string>;
126
- default: "";
127
- };
128
- limit: {
129
- type: globalThis.PropType<number>;
130
- };
131
- beforeUpload: {
132
- type: globalThis.PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
133
- default: () => void;
134
- };
135
- beforeRemove: {
136
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
137
- };
138
- onRemove: {
139
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
140
- default: () => void;
141
- };
142
- onPreview: {
143
- type: globalThis.PropType<(uploadFile: UploadFile) => void>;
144
- default: () => void;
145
- };
146
- onSuccess: {
147
- type: globalThis.PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
148
- default: () => void;
149
- };
150
- onExceed: {
151
- type: globalThis.PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
152
- default: () => void;
153
- };
154
- crossorigin: {
155
- type: globalThis.PropType< Crossorigin>;
156
- };
157
- action: {
158
- type: globalThis.PropType<string>;
159
- default: "#";
160
- };
161
- headers: {
162
- type: globalThis.PropType<Record<string, any> | Headers>;
163
- };
164
- method: {
165
- type: globalThis.PropType<string>;
166
- default: "post";
167
- };
168
- withCredentials: {
169
- type: globalThis.PropType<boolean>;
170
- };
171
- showFileList: {
172
- type: globalThis.PropType<boolean>;
173
- default: true;
174
- };
175
- fileList: {
176
- type: globalThis.PropType<UploadUserFile[]>;
177
- default: () => never[];
178
- };
179
- autoUpload: {
180
- type: globalThis.PropType<boolean>;
181
- default: true;
182
- };
183
- listType: {
184
- type: globalThis.PropType< ListType>;
185
- default: "text";
186
- };
187
- httpRequest: {
188
- type: globalThis.PropType< UploadRequestHandler>;
189
- default: UploadRequestHandler;
190
- };
191
- directory: {
192
- type: globalThis.PropType<boolean>;
193
- };
194
- }>>, {
195
- abort: (file?: UploadFile) => void;
196
- submit: () => void;
197
- clearFiles: (states?: UploadStatus[]) => void;
198
- handleStart: (rawFile: UploadRawFile) => void;
199
- handleRemove: (file: UploadFile | UploadRawFile) => void;
200
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
201
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
202
- disabled: boolean;
203
- name: string;
204
- onProgress: UploadHooks["onProgress"];
205
- onChange: UploadHooks["onChange"];
206
- onError: UploadHooks["onError"];
207
- method: string;
208
- action: string;
209
- accept: string;
210
- beforeUpload: UploadHooks["beforeUpload"];
211
- onRemove: UploadHooks["onRemove"];
212
- onPreview: UploadHooks["onPreview"];
213
- onSuccess: UploadHooks["onSuccess"];
214
- onExceed: UploadHooks["onExceed"];
215
- showFileList: boolean;
216
- fileList: UploadUserFile[];
217
- autoUpload: boolean;
218
- listType: ListType;
219
- httpRequest: UploadRequestHandler;
220
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
221
- beforeCreate?: (() => void) | (() => void)[];
222
- created?: (() => void) | (() => void)[];
223
- beforeMount?: (() => void) | (() => void)[];
224
- mounted?: (() => void) | (() => void)[];
225
- beforeUpdate?: (() => void) | (() => void)[];
226
- updated?: (() => void) | (() => void)[];
227
- activated?: (() => void) | (() => void)[];
228
- deactivated?: (() => void) | (() => void)[];
229
- beforeDestroy?: (() => void) | (() => void)[];
230
- beforeUnmount?: (() => void) | (() => void)[];
231
- destroyed?: (() => void) | (() => void)[];
232
- unmounted?: (() => void) | (() => void)[];
233
- renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
234
- renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
235
- errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
236
- };
237
- $forceUpdate: () => void;
238
- $nextTick: nextTick;
239
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
240
- } & Readonly<{
241
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
242
- disabled: boolean;
243
- name: string;
244
- onProgress: UploadHooks["onProgress"];
245
- onChange: UploadHooks["onChange"];
246
- onError: UploadHooks["onError"];
247
- method: string;
248
- action: string;
249
- accept: string;
250
- beforeUpload: UploadHooks["beforeUpload"];
251
- onRemove: UploadHooks["onRemove"];
252
- onPreview: UploadHooks["onPreview"];
253
- onSuccess: UploadHooks["onSuccess"];
254
- onExceed: UploadHooks["onExceed"];
255
- showFileList: boolean;
256
- fileList: UploadUserFile[];
257
- autoUpload: boolean;
258
- listType: ListType;
259
- httpRequest: UploadRequestHandler;
260
- }> & Omit<Readonly<globalThis.ExtractPropTypes<{
261
- data: {
262
- type: globalThis.PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
263
- default: () => Mutable<{}>;
264
- };
265
- onChange: {
266
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
267
- default: () => void;
268
- };
269
- onError: {
270
- type: globalThis.PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
271
- default: () => void;
272
- };
273
- onProgress: {
274
- type: globalThis.PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
275
- default: () => void;
276
- };
277
- drag: {
278
- type: globalThis.PropType<boolean>;
279
- };
280
- name: {
281
- type: globalThis.PropType<string>;
282
- default: "file";
283
- };
284
- disabled: {
285
- type: globalThis.PropType<boolean>;
286
- default: undefined;
287
- };
288
- multiple: {
289
- type: globalThis.PropType<boolean>;
290
- };
291
- accept: {
292
- type: globalThis.PropType<string>;
293
- default: "";
294
- };
295
- limit: {
296
- type: globalThis.PropType<number>;
297
- };
298
- beforeUpload: {
299
- type: globalThis.PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
300
- default: () => void;
301
- };
302
- beforeRemove: {
303
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
304
- };
305
- onRemove: {
306
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
307
- default: () => void;
308
- };
309
- onPreview: {
310
- type: globalThis.PropType<(uploadFile: UploadFile) => void>;
311
- default: () => void;
312
- };
313
- onSuccess: {
314
- type: globalThis.PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
315
- default: () => void;
316
- };
317
- onExceed: {
318
- type: globalThis.PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
319
- default: () => void;
320
- };
321
- crossorigin: {
322
- type: globalThis.PropType< Crossorigin>;
323
- };
324
- action: {
325
- type: globalThis.PropType<string>;
326
- default: "#";
327
- };
328
- headers: {
329
- type: globalThis.PropType<Record<string, any> | Headers>;
330
- };
331
- method: {
332
- type: globalThis.PropType<string>;
333
- default: "post";
334
- };
335
- withCredentials: {
336
- type: globalThis.PropType<boolean>;
337
- };
338
- showFileList: {
339
- type: globalThis.PropType<boolean>;
340
- default: true;
341
- };
342
- fileList: {
343
- type: globalThis.PropType<UploadUserFile[]>;
344
- default: () => never[];
345
- };
346
- autoUpload: {
347
- type: globalThis.PropType<boolean>;
348
- default: true;
349
- };
350
- listType: {
351
- type: globalThis.PropType< ListType>;
352
- default: "text";
353
- };
354
- httpRequest: {
355
- type: globalThis.PropType< UploadRequestHandler>;
356
- default: UploadRequestHandler;
357
- };
358
- directory: {
359
- type: globalThis.PropType<boolean>;
360
- };
361
- }>>, "data" | "onChange" | "onError" | "onProgress" | "abort" | "submit" | "name" | "disabled" | "accept" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "method" | "showFileList" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
362
- abort: (file?: UploadFile) => void;
363
- submit: () => void;
364
- clearFiles: (states?: UploadStatus[]) => void;
365
- handleStart: (rawFile: UploadRawFile) => void;
366
- handleRemove: (file: UploadFile | UploadRawFile) => void;
367
- }> & {} & ComponentCustomProperties & {} & {
368
- $slots: {
369
- file?: (props: {
370
- file: UploadFile;
371
- index: number;
372
- }) => any;
373
- } & {
374
- trigger?: (props: {}) => any;
375
- } & {
376
- default?: (props: {}) => any;
377
- } & {
378
- trigger?: (props: {}) => any;
379
- } & {
380
- default?: (props: {}) => any;
381
- } & {
382
- default?: (props: {}) => any;
383
- } & {
384
- tip?: (props: {}) => any;
385
- } & {
386
- file?: (props: {
387
- file: UploadFile;
388
- index: number;
389
- }) => any;
390
- };
391
- };
8
+ uploadRef: unknown;
392
9
  };
393
10
  rootEl: HTMLDivElement;
394
11
  };
395
12
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
396
- declare const __VLS_component: DefineComponent<__VLS_Props, {
397
- upload: typeof uploadHandle;
398
- clearFiles: typeof clearFiles;
399
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
400
- change: (...args: any[]) => void;
401
- error: (...args: any[]) => void;
402
- "update:modelValue": (...args: any[]) => void;
403
- }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
404
- onChange?: (...args: any[]) => any;
405
- onError?: (...args: any[]) => any;
406
- "onUpdate:modelValue"?: (...args: any[]) => any;
407
- }>, {
408
- width: string;
409
- height: string;
410
- drag: boolean;
411
- isJoin: boolean;
412
- uploadClass: string;
413
- accept: string;
414
- maxSize: number;
415
- limit: number;
416
- }, {}, {}, {}, string, ComponentProvideOptions, false, {
417
- uploadRef: {
418
- $: ComponentInternalInstance;
419
- $data: {};
420
- $props: Partial<{
421
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
422
- disabled: boolean;
423
- name: string;
424
- onProgress: UploadHooks["onProgress"];
425
- onChange: UploadHooks["onChange"];
426
- onError: UploadHooks["onError"];
427
- method: string;
428
- action: string;
429
- accept: string;
430
- beforeUpload: UploadHooks["beforeUpload"];
431
- onRemove: UploadHooks["onRemove"];
432
- onPreview: UploadHooks["onPreview"];
433
- onSuccess: UploadHooks["onSuccess"];
434
- onExceed: UploadHooks["onExceed"];
435
- showFileList: boolean;
436
- fileList: UploadUserFile[];
437
- autoUpload: boolean;
438
- listType: ListType;
439
- httpRequest: UploadRequestHandler;
440
- }> & Omit<{
441
- readonly data: Mutable<{}>;
442
- readonly onChange: UploadHooks["onChange"];
443
- readonly onError: UploadHooks["onError"];
444
- readonly onProgress: UploadHooks["onProgress"];
445
- readonly name: string;
446
- readonly accept: string;
447
- readonly beforeUpload: UploadHooks["beforeUpload"];
448
- readonly onRemove: UploadHooks["onRemove"];
449
- readonly onPreview: UploadHooks["onPreview"];
450
- readonly onSuccess: UploadHooks["onSuccess"];
451
- readonly onExceed: UploadHooks["onExceed"];
452
- readonly action: string;
453
- readonly method: string;
454
- readonly showFileList: boolean;
455
- readonly fileList: UploadUserFile[];
456
- readonly autoUpload: boolean;
457
- readonly listType: ListType;
458
- readonly httpRequest: UploadRequestHandler;
459
- readonly drag?: boolean;
460
- readonly disabled?: boolean;
461
- readonly multiple?: boolean;
462
- readonly limit?: number;
463
- readonly beforeRemove?: UploadHooks["beforeRemove"];
464
- readonly crossorigin?: Crossorigin;
465
- readonly headers?: Headers | Record<string, any>;
466
- readonly withCredentials?: boolean;
467
- readonly directory?: boolean;
468
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "data" | "onChange" | "onError" | "onProgress" | "name" | "disabled" | "accept" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "method" | "showFileList" | "fileList" | "autoUpload" | "listType" | "httpRequest">;
469
- $attrs: {
470
- [x: string]: unknown;
471
- };
472
- $refs: {
473
- [x: string]: unknown;
474
- };
475
- $slots: Readonly<{
476
- [name: string]: globalThis.Slot;
477
- }>;
478
- $root: ComponentPublicInstance | null;
479
- $parent: ComponentPublicInstance | null;
480
- $host: Element | null;
481
- $emit: (event: string, ...args: any[]) => void;
482
- $el: any;
483
- $options: ComponentOptionsBase<Readonly<globalThis.ExtractPropTypes<{
484
- data: {
485
- type: globalThis.PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
486
- default: () => Mutable<{}>;
487
- };
488
- onChange: {
489
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
490
- default: () => void;
491
- };
492
- onError: {
493
- type: globalThis.PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
494
- default: () => void;
495
- };
496
- onProgress: {
497
- type: globalThis.PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
498
- default: () => void;
499
- };
500
- drag: {
501
- type: globalThis.PropType<boolean>;
502
- };
503
- name: {
504
- type: globalThis.PropType<string>;
505
- default: "file";
506
- };
507
- disabled: {
508
- type: globalThis.PropType<boolean>;
509
- default: undefined;
510
- };
511
- multiple: {
512
- type: globalThis.PropType<boolean>;
513
- };
514
- accept: {
515
- type: globalThis.PropType<string>;
516
- default: "";
517
- };
518
- limit: {
519
- type: globalThis.PropType<number>;
520
- };
521
- beforeUpload: {
522
- type: globalThis.PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
523
- default: () => void;
524
- };
525
- beforeRemove: {
526
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
527
- };
528
- onRemove: {
529
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
530
- default: () => void;
531
- };
532
- onPreview: {
533
- type: globalThis.PropType<(uploadFile: UploadFile) => void>;
534
- default: () => void;
535
- };
536
- onSuccess: {
537
- type: globalThis.PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
538
- default: () => void;
539
- };
540
- onExceed: {
541
- type: globalThis.PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
542
- default: () => void;
543
- };
544
- crossorigin: {
545
- type: globalThis.PropType< Crossorigin>;
546
- };
547
- action: {
548
- type: globalThis.PropType<string>;
549
- default: "#";
550
- };
551
- headers: {
552
- type: globalThis.PropType<Record<string, any> | Headers>;
553
- };
554
- method: {
555
- type: globalThis.PropType<string>;
556
- default: "post";
557
- };
558
- withCredentials: {
559
- type: globalThis.PropType<boolean>;
560
- };
561
- showFileList: {
562
- type: globalThis.PropType<boolean>;
563
- default: true;
564
- };
565
- fileList: {
566
- type: globalThis.PropType<UploadUserFile[]>;
567
- default: () => never[];
568
- };
569
- autoUpload: {
570
- type: globalThis.PropType<boolean>;
571
- default: true;
572
- };
573
- listType: {
574
- type: globalThis.PropType< ListType>;
575
- default: "text";
576
- };
577
- httpRequest: {
578
- type: globalThis.PropType< UploadRequestHandler>;
579
- default: UploadRequestHandler;
580
- };
581
- directory: {
582
- type: globalThis.PropType<boolean>;
583
- };
584
- }>>, {
585
- abort: (file?: UploadFile) => void;
586
- submit: () => void;
587
- clearFiles: (states?: UploadStatus[]) => void;
588
- handleStart: (rawFile: UploadRawFile) => void;
589
- handleRemove: (file: UploadFile | UploadRawFile) => void;
590
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
591
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
592
- disabled: boolean;
593
- name: string;
594
- onProgress: UploadHooks["onProgress"];
595
- onChange: UploadHooks["onChange"];
596
- onError: UploadHooks["onError"];
597
- method: string;
598
- action: string;
599
- accept: string;
600
- beforeUpload: UploadHooks["beforeUpload"];
601
- onRemove: UploadHooks["onRemove"];
602
- onPreview: UploadHooks["onPreview"];
603
- onSuccess: UploadHooks["onSuccess"];
604
- onExceed: UploadHooks["onExceed"];
605
- showFileList: boolean;
606
- fileList: UploadUserFile[];
607
- autoUpload: boolean;
608
- listType: ListType;
609
- httpRequest: UploadRequestHandler;
610
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
611
- beforeCreate?: (() => void) | (() => void)[];
612
- created?: (() => void) | (() => void)[];
613
- beforeMount?: (() => void) | (() => void)[];
614
- mounted?: (() => void) | (() => void)[];
615
- beforeUpdate?: (() => void) | (() => void)[];
616
- updated?: (() => void) | (() => void)[];
617
- activated?: (() => void) | (() => void)[];
618
- deactivated?: (() => void) | (() => void)[];
619
- beforeDestroy?: (() => void) | (() => void)[];
620
- beforeUnmount?: (() => void) | (() => void)[];
621
- destroyed?: (() => void) | (() => void)[];
622
- unmounted?: (() => void) | (() => void)[];
623
- renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
624
- renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
625
- errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
626
- };
627
- $forceUpdate: () => void;
628
- $nextTick: nextTick;
629
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
630
- } & Readonly<{
631
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
632
- disabled: boolean;
633
- name: string;
634
- onProgress: UploadHooks["onProgress"];
635
- onChange: UploadHooks["onChange"];
636
- onError: UploadHooks["onError"];
637
- method: string;
638
- action: string;
639
- accept: string;
640
- beforeUpload: UploadHooks["beforeUpload"];
641
- onRemove: UploadHooks["onRemove"];
642
- onPreview: UploadHooks["onPreview"];
643
- onSuccess: UploadHooks["onSuccess"];
644
- onExceed: UploadHooks["onExceed"];
645
- showFileList: boolean;
646
- fileList: UploadUserFile[];
647
- autoUpload: boolean;
648
- listType: ListType;
649
- httpRequest: UploadRequestHandler;
650
- }> & Omit<Readonly<globalThis.ExtractPropTypes<{
651
- data: {
652
- type: globalThis.PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
653
- default: () => Mutable<{}>;
654
- };
655
- onChange: {
656
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
657
- default: () => void;
658
- };
659
- onError: {
660
- type: globalThis.PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
661
- default: () => void;
662
- };
663
- onProgress: {
664
- type: globalThis.PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
665
- default: () => void;
666
- };
667
- drag: {
668
- type: globalThis.PropType<boolean>;
669
- };
670
- name: {
671
- type: globalThis.PropType<string>;
672
- default: "file";
673
- };
674
- disabled: {
675
- type: globalThis.PropType<boolean>;
676
- default: undefined;
677
- };
678
- multiple: {
679
- type: globalThis.PropType<boolean>;
680
- };
681
- accept: {
682
- type: globalThis.PropType<string>;
683
- default: "";
684
- };
685
- limit: {
686
- type: globalThis.PropType<number>;
687
- };
688
- beforeUpload: {
689
- type: globalThis.PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
690
- default: () => void;
691
- };
692
- beforeRemove: {
693
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
694
- };
695
- onRemove: {
696
- type: globalThis.PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
697
- default: () => void;
698
- };
699
- onPreview: {
700
- type: globalThis.PropType<(uploadFile: UploadFile) => void>;
701
- default: () => void;
702
- };
703
- onSuccess: {
704
- type: globalThis.PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
705
- default: () => void;
706
- };
707
- onExceed: {
708
- type: globalThis.PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
709
- default: () => void;
710
- };
711
- crossorigin: {
712
- type: globalThis.PropType< Crossorigin>;
713
- };
714
- action: {
715
- type: globalThis.PropType<string>;
716
- default: "#";
717
- };
718
- headers: {
719
- type: globalThis.PropType<Record<string, any> | Headers>;
720
- };
721
- method: {
722
- type: globalThis.PropType<string>;
723
- default: "post";
724
- };
725
- withCredentials: {
726
- type: globalThis.PropType<boolean>;
727
- };
728
- showFileList: {
729
- type: globalThis.PropType<boolean>;
730
- default: true;
731
- };
732
- fileList: {
733
- type: globalThis.PropType<UploadUserFile[]>;
734
- default: () => never[];
735
- };
736
- autoUpload: {
737
- type: globalThis.PropType<boolean>;
738
- default: true;
739
- };
740
- listType: {
741
- type: globalThis.PropType< ListType>;
742
- default: "text";
743
- };
744
- httpRequest: {
745
- type: globalThis.PropType< UploadRequestHandler>;
746
- default: UploadRequestHandler;
747
- };
748
- directory: {
749
- type: globalThis.PropType<boolean>;
750
- };
751
- }>>, "data" | "onChange" | "onError" | "onProgress" | "abort" | "submit" | "name" | "disabled" | "accept" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "method" | "showFileList" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
752
- abort: (file?: UploadFile) => void;
753
- submit: () => void;
754
- clearFiles: (states?: UploadStatus[]) => void;
755
- handleStart: (rawFile: UploadRawFile) => void;
756
- handleRemove: (file: UploadFile | UploadRawFile) => void;
757
- }> & {} & ComponentCustomProperties & {} & {
758
- $slots: {
759
- file?: (props: {
760
- file: UploadFile;
761
- index: number;
762
- }) => any;
763
- } & {
764
- trigger?: (props: {}) => any;
765
- } & {
766
- default?: (props: {}) => any;
767
- } & {
768
- trigger?: (props: {}) => any;
769
- } & {
770
- default?: (props: {}) => any;
771
- } & {
772
- default?: (props: {}) => any;
773
- } & {
774
- tip?: (props: {}) => any;
775
- } & {
776
- file?: (props: {
777
- file: UploadFile;
778
- index: number;
779
- }) => any;
780
- };
781
- };
782
- }, HTMLDivElement>;
13
+ declare const __VLS_component: DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, PublicProps>;
783
14
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
784
15
  export default _default;
785
16
  type __VLS_WithTemplateSlots<T, S> = T & {