@vtj/ui 0.16.12 → 0.16.13

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,8 +1,7 @@
1
- import { Ref, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ExtractPropTypes, PropType, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, PublicProps } from 'vue';
2
- import { UploadUserFile, UploadFile, UploadFiles, UploadData, UploadRawFile, UploadHooks, ListType, UploadRequestHandler, Crossorigin, UploadProgressEvent, UploadStatus } from 'element-plus';
1
+ import { Ref, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, ExtractPropTypes, PropType, PublicProps } from 'vue';
2
+ import { UploadUserFile, UploadFile, UploadHooks, Crossorigin, UploadData, UploadRawFile, ListType, UploadRequestHandler, UploadProps, UploadStatus } from 'element-plus';
3
3
  import { AttachmentFile, AttachmentUploader, AttachmentThumbnail, AttachmentFileType } from './types';
4
- import { Awaitable, Mutable } from 'element-plus/es/utils/typescript.mjs';
5
- import { UploadUserFile, UploadFile } from 'element-plus/es/components/upload/src/upload.mjs';
4
+ import { Awaitable } from 'element-plus/es/utils/typescript.mjs';
6
5
  import { OnCleanup } from '@vue/reactivity';
7
6
  import { BaseSize, MaybePromise } from '..';
8
7
  declare function __VLS_template(): {
@@ -15,58 +14,36 @@ declare function __VLS_template(): {
15
14
  elUploadRef: ({
16
15
  $: ComponentInternalInstance;
17
16
  $data: {};
18
- $props: Partial<{
19
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
20
- disabled: boolean;
21
- name: string;
22
- onProgress: UploadHooks["onProgress"];
23
- onChange: UploadHooks["onChange"];
24
- onError: UploadHooks["onError"];
25
- method: string;
26
- action: string;
27
- accept: string;
28
- beforeUpload: UploadHooks["beforeUpload"];
29
- onRemove: UploadHooks["onRemove"];
30
- onPreview: UploadHooks["onPreview"];
31
- onSuccess: UploadHooks["onSuccess"];
32
- onExceed: UploadHooks["onExceed"];
33
- showFileList: boolean;
34
- fileList: UploadUserFile[];
35
- autoUpload: boolean;
36
- listType: ListType;
37
- httpRequest: UploadRequestHandler;
38
- }> & Omit<{
39
- readonly name: string;
40
- readonly data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
41
- readonly onChange: UploadHooks["onChange"];
42
- readonly onError: UploadHooks["onError"];
43
- readonly onProgress: UploadHooks["onProgress"];
44
- readonly action: string;
45
- readonly onRemove: UploadHooks["onRemove"];
46
- readonly accept: string;
47
- readonly listType: ListType;
48
- readonly beforeUpload: UploadHooks["beforeUpload"];
49
- readonly autoUpload: boolean;
50
- readonly fileList: UploadUserFile[];
51
- readonly onPreview: UploadHooks["onPreview"];
52
- readonly onSuccess: UploadHooks["onSuccess"];
53
- readonly onExceed: UploadHooks["onExceed"];
54
- readonly method: string;
55
- readonly showFileList: boolean;
56
- readonly httpRequest: UploadRequestHandler;
57
- readonly disabled?: boolean | undefined;
58
- readonly drag?: boolean | undefined;
59
- readonly multiple?: boolean | undefined;
60
- readonly crossorigin?: Crossorigin | undefined;
61
- readonly limit?: number | undefined;
17
+ $props: {
18
+ readonly beforeUpload?: UploadHooks["beforeUpload"] | undefined;
62
19
  readonly beforeRemove?: UploadHooks["beforeRemove"] | undefined;
20
+ readonly onRemove?: UploadHooks["onRemove"] | undefined;
21
+ readonly onChange?: UploadHooks["onChange"] | undefined;
22
+ readonly onPreview?: UploadHooks["onPreview"] | undefined;
23
+ readonly onSuccess?: UploadHooks["onSuccess"] | undefined;
24
+ readonly onProgress?: UploadHooks["onProgress"] | undefined;
25
+ readonly onError?: UploadHooks["onError"] | undefined;
26
+ readonly onExceed?: UploadHooks["onExceed"] | undefined;
27
+ readonly crossorigin?: Crossorigin | undefined;
28
+ readonly action?: string | undefined;
63
29
  readonly headers?: (Headers | Record<string, any>) | undefined;
30
+ readonly method?: string | undefined;
31
+ readonly data?: ( Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | undefined;
32
+ readonly multiple?: boolean | undefined;
33
+ readonly name?: string | undefined;
34
+ readonly drag?: boolean | undefined;
64
35
  readonly withCredentials?: boolean | undefined;
36
+ readonly showFileList?: boolean | undefined;
37
+ readonly accept?: string | undefined;
38
+ readonly fileList?: UploadUserFile[] | undefined;
39
+ readonly autoUpload?: boolean | undefined;
40
+ readonly listType?: ListType | undefined;
41
+ readonly httpRequest?: UploadRequestHandler | undefined;
42
+ readonly disabled?: boolean | undefined;
43
+ readonly limit?: number | undefined;
65
44
  readonly directory?: boolean | undefined;
66
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "disabled" | "name" | "data" | "onChange" | "onError" | "onProgress" | "action" | "onRemove" | "accept" | "listType" | "beforeUpload" | "autoUpload" | "fileList" | "onPreview" | "onSuccess" | "onExceed" | "method" | "showFileList" | "httpRequest">;
67
- $attrs: {
68
- [x: string]: unknown;
69
- };
45
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
46
+ $attrs: Attrs;
70
47
  $refs: {
71
48
  [x: string]: unknown;
72
49
  };
@@ -78,129 +55,28 @@ declare function __VLS_template(): {
78
55
  $host: Element | null;
79
56
  $emit: (event: string, ...args: any[]) => void;
80
57
  $el: any;
81
- $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{
82
- disabled: {
83
- type: PropType<boolean>;
84
- default: undefined;
85
- };
86
- name: {
87
- type: PropType<string>;
88
- default: "file";
89
- };
90
- data: {
91
- type: PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
92
- default: () => Mutable<{}>;
93
- };
94
- onChange: {
95
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
96
- default: () => void;
97
- };
98
- onError: {
99
- type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
100
- default: () => void;
101
- };
102
- onProgress: {
103
- type: PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
104
- default: () => void;
105
- };
106
- drag: {
107
- type: PropType<boolean>;
108
- };
109
- action: {
110
- type: PropType<string>;
111
- default: "#";
112
- };
113
- onRemove: {
114
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
115
- default: () => void;
116
- };
117
- multiple: {
118
- type: PropType<boolean>;
119
- };
120
- crossorigin: {
121
- type: PropType<Crossorigin>;
122
- };
123
- limit: {
124
- type: PropType<number>;
125
- };
126
- accept: {
127
- type: PropType<string>;
128
- default: "";
129
- };
130
- listType: {
131
- type: PropType<ListType>;
132
- default: "text";
133
- };
134
- beforeUpload: {
135
- type: PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
136
- default: () => void;
137
- };
138
- autoUpload: {
139
- type: PropType<boolean>;
140
- default: true;
141
- };
142
- fileList: {
143
- type: PropType<UploadUserFile[]>;
144
- default: () => never[];
145
- };
146
- onPreview: {
147
- type: PropType<(uploadFile: UploadFile) => void>;
148
- default: () => void;
149
- };
150
- beforeRemove: {
151
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
152
- };
153
- onSuccess: {
154
- type: PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
155
- default: () => void;
156
- };
157
- onExceed: {
158
- type: PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
159
- default: () => void;
160
- };
161
- headers: {
162
- type: PropType<Record<string, any> | Headers>;
163
- };
164
- method: {
165
- type: PropType<string>;
166
- default: "post";
167
- };
168
- withCredentials: {
169
- type: PropType<boolean>;
170
- };
171
- showFileList: {
172
- type: PropType<boolean>;
173
- default: true;
174
- };
175
- httpRequest: {
176
- type: PropType<UploadRequestHandler>;
177
- default: UploadRequestHandler;
178
- };
179
- directory: {
180
- type: PropType<boolean>;
181
- };
182
- }>>, {
58
+ $options: ComponentOptionsBase<Readonly< UploadProps> & Readonly<{}>, {
183
59
  abort: (file?: UploadFile) => void;
184
60
  submit: () => void;
185
61
  clearFiles: (states?: UploadStatus[]) => void;
186
62
  handleStart: (rawFile: UploadRawFile) => void;
187
63
  handleRemove: (file: UploadFile | UploadRawFile) => void;
188
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
189
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
64
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
190
65
  disabled: boolean;
191
- name: string;
192
- onProgress: UploadHooks["onProgress"];
66
+ data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
193
67
  onChange: UploadHooks["onChange"];
68
+ name: string;
194
69
  onError: UploadHooks["onError"];
195
- method: string;
196
- action: string;
197
- accept: string;
70
+ onProgress: UploadHooks["onProgress"];
198
71
  beforeUpload: UploadHooks["beforeUpload"];
199
72
  onRemove: UploadHooks["onRemove"];
200
73
  onPreview: UploadHooks["onPreview"];
201
74
  onSuccess: UploadHooks["onSuccess"];
202
75
  onExceed: UploadHooks["onExceed"];
76
+ action: string;
77
+ method: string;
203
78
  showFileList: boolean;
79
+ accept: string;
204
80
  fileList: UploadUserFile[];
205
81
  autoUpload: boolean;
206
82
  listType: ListType;
@@ -226,127 +102,26 @@ declare function __VLS_template(): {
226
102
  $nextTick: nextTick;
227
103
  $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;
228
104
  } & Readonly<{
229
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
230
105
  disabled: boolean;
231
- name: string;
232
- onProgress: UploadHooks["onProgress"];
106
+ data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
233
107
  onChange: UploadHooks["onChange"];
108
+ name: string;
234
109
  onError: UploadHooks["onError"];
235
- method: string;
236
- action: string;
237
- accept: string;
110
+ onProgress: UploadHooks["onProgress"];
238
111
  beforeUpload: UploadHooks["beforeUpload"];
239
112
  onRemove: UploadHooks["onRemove"];
240
113
  onPreview: UploadHooks["onPreview"];
241
114
  onSuccess: UploadHooks["onSuccess"];
242
115
  onExceed: UploadHooks["onExceed"];
116
+ action: string;
117
+ method: string;
243
118
  showFileList: boolean;
119
+ accept: string;
244
120
  fileList: UploadUserFile[];
245
121
  autoUpload: boolean;
246
122
  listType: ListType;
247
123
  httpRequest: UploadRequestHandler;
248
- }> & Omit<Readonly< ExtractPropTypes<{
249
- disabled: {
250
- type: PropType<boolean>;
251
- default: undefined;
252
- };
253
- name: {
254
- type: PropType<string>;
255
- default: "file";
256
- };
257
- data: {
258
- type: PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
259
- default: () => Mutable<{}>;
260
- };
261
- onChange: {
262
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
263
- default: () => void;
264
- };
265
- onError: {
266
- type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
267
- default: () => void;
268
- };
269
- onProgress: {
270
- type: PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
271
- default: () => void;
272
- };
273
- drag: {
274
- type: PropType<boolean>;
275
- };
276
- action: {
277
- type: PropType<string>;
278
- default: "#";
279
- };
280
- onRemove: {
281
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
282
- default: () => void;
283
- };
284
- multiple: {
285
- type: PropType<boolean>;
286
- };
287
- crossorigin: {
288
- type: PropType<Crossorigin>;
289
- };
290
- limit: {
291
- type: PropType<number>;
292
- };
293
- accept: {
294
- type: PropType<string>;
295
- default: "";
296
- };
297
- listType: {
298
- type: PropType<ListType>;
299
- default: "text";
300
- };
301
- beforeUpload: {
302
- type: PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
303
- default: () => void;
304
- };
305
- autoUpload: {
306
- type: PropType<boolean>;
307
- default: true;
308
- };
309
- fileList: {
310
- type: PropType<UploadUserFile[]>;
311
- default: () => never[];
312
- };
313
- onPreview: {
314
- type: PropType<(uploadFile: UploadFile) => void>;
315
- default: () => void;
316
- };
317
- beforeRemove: {
318
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
319
- };
320
- onSuccess: {
321
- type: PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
322
- default: () => void;
323
- };
324
- onExceed: {
325
- type: PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
326
- default: () => void;
327
- };
328
- headers: {
329
- type: PropType<Record<string, any> | Headers>;
330
- };
331
- method: {
332
- type: PropType<string>;
333
- default: "post";
334
- };
335
- withCredentials: {
336
- type: PropType<boolean>;
337
- };
338
- showFileList: {
339
- type: PropType<boolean>;
340
- default: true;
341
- };
342
- httpRequest: {
343
- type: PropType<UploadRequestHandler>;
344
- default: UploadRequestHandler;
345
- };
346
- directory: {
347
- type: PropType<boolean>;
348
- };
349
- }>>, "disabled" | "name" | "data" | "onChange" | "onError" | "onProgress" | "abort" | "submit" | "action" | "onRemove" | "accept" | "listType" | "beforeUpload" | "autoUpload" | "fileList" | "onPreview" | "onSuccess" | "onExceed" | "method" | "showFileList" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
124
+ }> & Omit<Readonly< UploadProps> & Readonly<{}>, "disabled" | "name" | "data" | "onChange" | "onError" | "onProgress" | "abort" | "submit" | "action" | "onRemove" | "accept" | "listType" | "beforeUpload" | "autoUpload" | "fileList" | "onPreview" | "onSuccess" | "onExceed" | "method" | "showFileList" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
350
125
  abort: (file?: UploadFile) => void;
351
126
  submit: () => void;
352
127
  clearFiles: (states?: UploadStatus[]) => void;
@@ -599,58 +374,36 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
599
374
  elUploadRef: ({
600
375
  $: ComponentInternalInstance;
601
376
  $data: {};
602
- $props: Partial<{
603
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
604
- disabled: boolean;
605
- name: string;
606
- onProgress: UploadHooks["onProgress"];
607
- onChange: UploadHooks["onChange"];
608
- onError: UploadHooks["onError"];
609
- method: string;
610
- action: string;
611
- accept: string;
612
- beforeUpload: UploadHooks["beforeUpload"];
613
- onRemove: UploadHooks["onRemove"];
614
- onPreview: UploadHooks["onPreview"];
615
- onSuccess: UploadHooks["onSuccess"];
616
- onExceed: UploadHooks["onExceed"];
617
- showFileList: boolean;
618
- fileList: UploadUserFile[];
619
- autoUpload: boolean;
620
- listType: ListType;
621
- httpRequest: UploadRequestHandler;
622
- }> & Omit<{
623
- readonly name: string;
624
- readonly data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
625
- readonly onChange: UploadHooks["onChange"];
626
- readonly onError: UploadHooks["onError"];
627
- readonly onProgress: UploadHooks["onProgress"];
628
- readonly action: string;
629
- readonly onRemove: UploadHooks["onRemove"];
630
- readonly accept: string;
631
- readonly listType: ListType;
632
- readonly beforeUpload: UploadHooks["beforeUpload"];
633
- readonly autoUpload: boolean;
634
- readonly fileList: UploadUserFile[];
635
- readonly onPreview: UploadHooks["onPreview"];
636
- readonly onSuccess: UploadHooks["onSuccess"];
637
- readonly onExceed: UploadHooks["onExceed"];
638
- readonly method: string;
639
- readonly showFileList: boolean;
640
- readonly httpRequest: UploadRequestHandler;
641
- readonly disabled?: boolean | undefined;
642
- readonly drag?: boolean | undefined;
643
- readonly multiple?: boolean | undefined;
644
- readonly crossorigin?: Crossorigin | undefined;
645
- readonly limit?: number | undefined;
377
+ $props: {
378
+ readonly beforeUpload?: UploadHooks["beforeUpload"] | undefined;
646
379
  readonly beforeRemove?: UploadHooks["beforeRemove"] | undefined;
380
+ readonly onRemove?: UploadHooks["onRemove"] | undefined;
381
+ readonly onChange?: UploadHooks["onChange"] | undefined;
382
+ readonly onPreview?: UploadHooks["onPreview"] | undefined;
383
+ readonly onSuccess?: UploadHooks["onSuccess"] | undefined;
384
+ readonly onProgress?: UploadHooks["onProgress"] | undefined;
385
+ readonly onError?: UploadHooks["onError"] | undefined;
386
+ readonly onExceed?: UploadHooks["onExceed"] | undefined;
387
+ readonly crossorigin?: Crossorigin | undefined;
388
+ readonly action?: string | undefined;
647
389
  readonly headers?: (Headers | Record<string, any>) | undefined;
390
+ readonly method?: string | undefined;
391
+ readonly data?: ( Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | undefined;
392
+ readonly multiple?: boolean | undefined;
393
+ readonly name?: string | undefined;
394
+ readonly drag?: boolean | undefined;
648
395
  readonly withCredentials?: boolean | undefined;
396
+ readonly showFileList?: boolean | undefined;
397
+ readonly accept?: string | undefined;
398
+ readonly fileList?: UploadUserFile[] | undefined;
399
+ readonly autoUpload?: boolean | undefined;
400
+ readonly listType?: ListType | undefined;
401
+ readonly httpRequest?: UploadRequestHandler | undefined;
402
+ readonly disabled?: boolean | undefined;
403
+ readonly limit?: number | undefined;
649
404
  readonly directory?: boolean | undefined;
650
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "disabled" | "name" | "data" | "onChange" | "onError" | "onProgress" | "action" | "onRemove" | "accept" | "listType" | "beforeUpload" | "autoUpload" | "fileList" | "onPreview" | "onSuccess" | "onExceed" | "method" | "showFileList" | "httpRequest">;
651
- $attrs: {
652
- [x: string]: unknown;
653
- };
405
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
406
+ $attrs: Attrs;
654
407
  $refs: {
655
408
  [x: string]: unknown;
656
409
  };
@@ -662,129 +415,28 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
662
415
  $host: Element | null;
663
416
  $emit: (event: string, ...args: any[]) => void;
664
417
  $el: any;
665
- $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{
666
- disabled: {
667
- type: PropType<boolean>;
668
- default: undefined;
669
- };
670
- name: {
671
- type: PropType<string>;
672
- default: "file";
673
- };
674
- data: {
675
- type: PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
676
- default: () => Mutable<{}>;
677
- };
678
- onChange: {
679
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
680
- default: () => void;
681
- };
682
- onError: {
683
- type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
684
- default: () => void;
685
- };
686
- onProgress: {
687
- type: PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
688
- default: () => void;
689
- };
690
- drag: {
691
- type: PropType<boolean>;
692
- };
693
- action: {
694
- type: PropType<string>;
695
- default: "#";
696
- };
697
- onRemove: {
698
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
699
- default: () => void;
700
- };
701
- multiple: {
702
- type: PropType<boolean>;
703
- };
704
- crossorigin: {
705
- type: PropType<Crossorigin>;
706
- };
707
- limit: {
708
- type: PropType<number>;
709
- };
710
- accept: {
711
- type: PropType<string>;
712
- default: "";
713
- };
714
- listType: {
715
- type: PropType<ListType>;
716
- default: "text";
717
- };
718
- beforeUpload: {
719
- type: PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
720
- default: () => void;
721
- };
722
- autoUpload: {
723
- type: PropType<boolean>;
724
- default: true;
725
- };
726
- fileList: {
727
- type: PropType<UploadUserFile[]>;
728
- default: () => never[];
729
- };
730
- onPreview: {
731
- type: PropType<(uploadFile: UploadFile) => void>;
732
- default: () => void;
733
- };
734
- beforeRemove: {
735
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
736
- };
737
- onSuccess: {
738
- type: PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
739
- default: () => void;
740
- };
741
- onExceed: {
742
- type: PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
743
- default: () => void;
744
- };
745
- headers: {
746
- type: PropType<Record<string, any> | Headers>;
747
- };
748
- method: {
749
- type: PropType<string>;
750
- default: "post";
751
- };
752
- withCredentials: {
753
- type: PropType<boolean>;
754
- };
755
- showFileList: {
756
- type: PropType<boolean>;
757
- default: true;
758
- };
759
- httpRequest: {
760
- type: PropType<UploadRequestHandler>;
761
- default: UploadRequestHandler;
762
- };
763
- directory: {
764
- type: PropType<boolean>;
765
- };
766
- }>>, {
418
+ $options: ComponentOptionsBase<Readonly< UploadProps> & Readonly<{}>, {
767
419
  abort: (file?: UploadFile) => void;
768
420
  submit: () => void;
769
421
  clearFiles: (states?: UploadStatus[]) => void;
770
422
  handleStart: (rawFile: UploadRawFile) => void;
771
423
  handleRemove: (file: UploadFile | UploadRawFile) => void;
772
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
773
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
424
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
774
425
  disabled: boolean;
775
- name: string;
776
- onProgress: UploadHooks["onProgress"];
426
+ data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
777
427
  onChange: UploadHooks["onChange"];
428
+ name: string;
778
429
  onError: UploadHooks["onError"];
779
- method: string;
780
- action: string;
781
- accept: string;
430
+ onProgress: UploadHooks["onProgress"];
782
431
  beforeUpload: UploadHooks["beforeUpload"];
783
432
  onRemove: UploadHooks["onRemove"];
784
433
  onPreview: UploadHooks["onPreview"];
785
434
  onSuccess: UploadHooks["onSuccess"];
786
435
  onExceed: UploadHooks["onExceed"];
436
+ action: string;
437
+ method: string;
787
438
  showFileList: boolean;
439
+ accept: string;
788
440
  fileList: UploadUserFile[];
789
441
  autoUpload: boolean;
790
442
  listType: ListType;
@@ -810,127 +462,26 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
810
462
  $nextTick: nextTick;
811
463
  $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;
812
464
  } & Readonly<{
813
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
814
465
  disabled: boolean;
815
- name: string;
816
- onProgress: UploadHooks["onProgress"];
466
+ data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
817
467
  onChange: UploadHooks["onChange"];
468
+ name: string;
818
469
  onError: UploadHooks["onError"];
819
- method: string;
820
- action: string;
821
- accept: string;
470
+ onProgress: UploadHooks["onProgress"];
822
471
  beforeUpload: UploadHooks["beforeUpload"];
823
472
  onRemove: UploadHooks["onRemove"];
824
473
  onPreview: UploadHooks["onPreview"];
825
474
  onSuccess: UploadHooks["onSuccess"];
826
475
  onExceed: UploadHooks["onExceed"];
476
+ action: string;
477
+ method: string;
827
478
  showFileList: boolean;
479
+ accept: string;
828
480
  fileList: UploadUserFile[];
829
481
  autoUpload: boolean;
830
482
  listType: ListType;
831
483
  httpRequest: UploadRequestHandler;
832
- }> & Omit<Readonly< ExtractPropTypes<{
833
- disabled: {
834
- type: PropType<boolean>;
835
- default: undefined;
836
- };
837
- name: {
838
- type: PropType<string>;
839
- default: "file";
840
- };
841
- data: {
842
- type: PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
843
- default: () => Mutable<{}>;
844
- };
845
- onChange: {
846
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
847
- default: () => void;
848
- };
849
- onError: {
850
- type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
851
- default: () => void;
852
- };
853
- onProgress: {
854
- type: PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
855
- default: () => void;
856
- };
857
- drag: {
858
- type: PropType<boolean>;
859
- };
860
- action: {
861
- type: PropType<string>;
862
- default: "#";
863
- };
864
- onRemove: {
865
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
866
- default: () => void;
867
- };
868
- multiple: {
869
- type: PropType<boolean>;
870
- };
871
- crossorigin: {
872
- type: PropType<Crossorigin>;
873
- };
874
- limit: {
875
- type: PropType<number>;
876
- };
877
- accept: {
878
- type: PropType<string>;
879
- default: "";
880
- };
881
- listType: {
882
- type: PropType<ListType>;
883
- default: "text";
884
- };
885
- beforeUpload: {
886
- type: PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
887
- default: () => void;
888
- };
889
- autoUpload: {
890
- type: PropType<boolean>;
891
- default: true;
892
- };
893
- fileList: {
894
- type: PropType<UploadUserFile[]>;
895
- default: () => never[];
896
- };
897
- onPreview: {
898
- type: PropType<(uploadFile: UploadFile) => void>;
899
- default: () => void;
900
- };
901
- beforeRemove: {
902
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
903
- };
904
- onSuccess: {
905
- type: PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
906
- default: () => void;
907
- };
908
- onExceed: {
909
- type: PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
910
- default: () => void;
911
- };
912
- headers: {
913
- type: PropType<Record<string, any> | Headers>;
914
- };
915
- method: {
916
- type: PropType<string>;
917
- default: "post";
918
- };
919
- withCredentials: {
920
- type: PropType<boolean>;
921
- };
922
- showFileList: {
923
- type: PropType<boolean>;
924
- default: true;
925
- };
926
- httpRequest: {
927
- type: PropType<UploadRequestHandler>;
928
- default: UploadRequestHandler;
929
- };
930
- directory: {
931
- type: PropType<boolean>;
932
- };
933
- }>>, "disabled" | "name" | "data" | "onChange" | "onError" | "onProgress" | "abort" | "submit" | "action" | "onRemove" | "accept" | "listType" | "beforeUpload" | "autoUpload" | "fileList" | "onPreview" | "onSuccess" | "onExceed" | "method" | "showFileList" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
484
+ }> & Omit<Readonly< UploadProps> & Readonly<{}>, "disabled" | "name" | "data" | "onChange" | "onError" | "onProgress" | "abort" | "submit" | "action" | "onRemove" | "accept" | "listType" | "beforeUpload" | "autoUpload" | "fileList" | "onPreview" | "onSuccess" | "onExceed" | "method" | "showFileList" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
934
485
  abort: (file?: UploadFile) => void;
935
486
  submit: () => void;
936
487
  clearFiles: (states?: UploadStatus[]) => void;