@vtj/designer 0.12.31 → 0.12.33

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.
@@ -0,0 +1,561 @@
1
+ import { UploadFile, UploadRawFile, UploadFiles, UploadProgressEvent, UploadUserFile, UploadRequestHandler, UploadStatus } from 'element-plus';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
+ import { OnCleanup } from '@vue/reactivity';
4
+ export interface Props {
5
+ loading?: boolean;
6
+ }
7
+ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
8
+ send: (file: File, auto: boolean, content: any) => any;
9
+ }, string, PublicProps, Readonly<Props> & Readonly<{
10
+ onSend?: ((file: File, auto: boolean, content: any) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
12
+ uploadRef: ({
13
+ $: ComponentInternalInstance;
14
+ $data: {};
15
+ $props: Partial<{
16
+ readonly data: ({
17
+ [x: string]: any;
18
+ } | Promise<{
19
+ [x: string]: any;
20
+ }>) | ((rawFile: UploadRawFile) => {
21
+ [x: string]: any;
22
+ } | Promise<{
23
+ [x: string]: any;
24
+ }>);
25
+ readonly disabled: boolean;
26
+ readonly drag: boolean;
27
+ readonly multiple: boolean;
28
+ readonly name: string;
29
+ readonly onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
30
+ readonly onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
31
+ readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
32
+ readonly method: string;
33
+ readonly action: string;
34
+ readonly withCredentials: boolean;
35
+ readonly showFileList: boolean;
36
+ readonly accept: string;
37
+ readonly fileList: UploadUserFile[];
38
+ readonly autoUpload: boolean;
39
+ readonly listType: "text" | "picture" | "picture-card";
40
+ readonly httpRequest: UploadRequestHandler;
41
+ readonly beforeUpload: (rawFile: UploadRawFile) => boolean | void | File | Blob | Promise<boolean | void | File | Blob | null | undefined> | null | undefined;
42
+ readonly onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
43
+ readonly onPreview: (uploadFile: UploadFile) => void;
44
+ readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
45
+ readonly onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
46
+ }> & Omit<{
47
+ readonly name: string;
48
+ readonly method: string;
49
+ readonly data: ({
50
+ [x: string]: any;
51
+ } | Promise<{
52
+ [x: string]: any;
53
+ }>) | ((rawFile: UploadRawFile) => {
54
+ [x: string]: any;
55
+ } | Promise<{
56
+ [x: string]: any;
57
+ }>);
58
+ readonly onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
59
+ readonly onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
60
+ readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
61
+ readonly disabled: boolean;
62
+ readonly beforeUpload: (rawFile: UploadRawFile) => boolean | void | File | Blob | Promise<boolean | void | File | Blob | null | undefined> | null | undefined;
63
+ readonly onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
64
+ readonly onPreview: (uploadFile: UploadFile) => void;
65
+ readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
66
+ readonly onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
67
+ readonly action: string;
68
+ readonly multiple: boolean;
69
+ readonly drag: boolean;
70
+ readonly withCredentials: boolean;
71
+ readonly showFileList: boolean;
72
+ readonly accept: string;
73
+ readonly fileList: UploadUserFile[];
74
+ readonly autoUpload: boolean;
75
+ readonly listType: "text" | "picture" | "picture-card";
76
+ readonly httpRequest: UploadRequestHandler;
77
+ readonly crossorigin?: ("" | "anonymous" | "use-credentials") | undefined;
78
+ readonly beforeRemove?: ((uploadFile: UploadFile, uploadFiles: UploadFiles) => boolean | Promise<boolean>) | undefined;
79
+ readonly headers?: (Record<string, any> | Headers) | undefined;
80
+ readonly limit?: number | undefined;
81
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "name" | "method" | "data" | "onChange" | "onError" | "onProgress" | "disabled" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "multiple" | "drag" | "withCredentials" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest">;
82
+ $attrs: {
83
+ [x: string]: unknown;
84
+ };
85
+ $refs: {
86
+ [x: string]: unknown;
87
+ };
88
+ $slots: Readonly<{
89
+ [name: string]: Slot<any> | undefined;
90
+ }>;
91
+ $root: ComponentPublicInstance | null;
92
+ $parent: ComponentPublicInstance | null;
93
+ $host: Element | null;
94
+ $emit: (event: string, ...args: any[]) => void;
95
+ $el: any;
96
+ $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{
97
+ readonly beforeUpload: {
98
+ readonly type: PropType<(rawFile: UploadRawFile) => boolean | void | File | Blob | Promise<boolean | void | File | Blob | null | undefined> | null | undefined>;
99
+ readonly required: false;
100
+ readonly validator: ((val: unknown) => boolean) | undefined;
101
+ __epPropKey: true;
102
+ } & {
103
+ readonly default: () => void;
104
+ };
105
+ readonly beforeRemove: {
106
+ readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => boolean | Promise<boolean>>;
107
+ readonly required: false;
108
+ readonly validator: ((val: unknown) => boolean) | undefined;
109
+ __epPropKey: true;
110
+ };
111
+ readonly onRemove: {
112
+ readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
113
+ readonly required: false;
114
+ readonly validator: ((val: unknown) => boolean) | undefined;
115
+ __epPropKey: true;
116
+ } & {
117
+ readonly default: () => void;
118
+ };
119
+ readonly onChange: {
120
+ readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
121
+ readonly required: false;
122
+ readonly validator: ((val: unknown) => boolean) | undefined;
123
+ __epPropKey: true;
124
+ } & {
125
+ readonly default: () => void;
126
+ };
127
+ readonly onPreview: {
128
+ readonly type: PropType<(uploadFile: UploadFile) => void>;
129
+ readonly required: false;
130
+ readonly validator: ((val: unknown) => boolean) | undefined;
131
+ __epPropKey: true;
132
+ } & {
133
+ readonly default: () => void;
134
+ };
135
+ readonly onSuccess: {
136
+ readonly type: PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
137
+ readonly required: false;
138
+ readonly validator: ((val: unknown) => boolean) | undefined;
139
+ __epPropKey: true;
140
+ } & {
141
+ readonly default: () => void;
142
+ };
143
+ readonly onProgress: {
144
+ readonly type: PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
145
+ readonly required: false;
146
+ readonly validator: ((val: unknown) => boolean) | undefined;
147
+ __epPropKey: true;
148
+ } & {
149
+ readonly default: () => void;
150
+ };
151
+ readonly onError: {
152
+ readonly type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
153
+ readonly required: false;
154
+ readonly validator: ((val: unknown) => boolean) | undefined;
155
+ __epPropKey: true;
156
+ } & {
157
+ readonly default: () => void;
158
+ };
159
+ readonly onExceed: {
160
+ readonly type: PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
161
+ readonly required: false;
162
+ readonly validator: ((val: unknown) => boolean) | undefined;
163
+ __epPropKey: true;
164
+ } & {
165
+ readonly default: () => void;
166
+ };
167
+ readonly crossorigin: {
168
+ readonly type: PropType<"" | "anonymous" | "use-credentials">;
169
+ readonly required: false;
170
+ readonly validator: ((val: unknown) => boolean) | undefined;
171
+ __epPropKey: true;
172
+ };
173
+ readonly action: {
174
+ readonly type: PropType<string>;
175
+ readonly required: false;
176
+ readonly validator: ((val: unknown) => boolean) | undefined;
177
+ __epPropKey: true;
178
+ } & {
179
+ readonly default: "#";
180
+ };
181
+ readonly headers: {
182
+ readonly type: PropType<Record<string, any> | Headers>;
183
+ readonly required: false;
184
+ readonly validator: ((val: unknown) => boolean) | undefined;
185
+ __epPropKey: true;
186
+ };
187
+ readonly method: {
188
+ readonly type: PropType<string>;
189
+ readonly required: false;
190
+ readonly validator: ((val: unknown) => boolean) | undefined;
191
+ __epPropKey: true;
192
+ } & {
193
+ readonly default: "post";
194
+ };
195
+ readonly data: {
196
+ readonly type: PropType<({
197
+ [x: string]: any;
198
+ } | Promise<{
199
+ [x: string]: any;
200
+ }>) | ((rawFile: UploadRawFile) => {
201
+ [x: string]: any;
202
+ } | Promise<{
203
+ [x: string]: any;
204
+ }>)>;
205
+ readonly required: false;
206
+ readonly validator: ((val: unknown) => boolean) | undefined;
207
+ __epPropKey: true;
208
+ } & {
209
+ readonly default: () => {};
210
+ };
211
+ readonly multiple: BooleanConstructor;
212
+ readonly name: {
213
+ readonly type: PropType<string>;
214
+ readonly required: false;
215
+ readonly validator: ((val: unknown) => boolean) | undefined;
216
+ __epPropKey: true;
217
+ } & {
218
+ readonly default: "file";
219
+ };
220
+ readonly drag: BooleanConstructor;
221
+ readonly withCredentials: BooleanConstructor;
222
+ readonly showFileList: {
223
+ readonly type: PropType<boolean>;
224
+ readonly required: false;
225
+ readonly validator: ((val: unknown) => boolean) | undefined;
226
+ __epPropKey: true;
227
+ } & {
228
+ readonly default: true;
229
+ };
230
+ readonly accept: {
231
+ readonly type: PropType<string>;
232
+ readonly required: false;
233
+ readonly validator: ((val: unknown) => boolean) | undefined;
234
+ __epPropKey: true;
235
+ } & {
236
+ readonly default: "";
237
+ };
238
+ readonly fileList: {
239
+ readonly type: PropType< UploadUserFile[]>;
240
+ readonly required: false;
241
+ readonly validator: ((val: unknown) => boolean) | undefined;
242
+ __epPropKey: true;
243
+ } & {
244
+ readonly default: () => [];
245
+ };
246
+ readonly autoUpload: {
247
+ readonly type: PropType<boolean>;
248
+ readonly required: false;
249
+ readonly validator: ((val: unknown) => boolean) | undefined;
250
+ __epPropKey: true;
251
+ } & {
252
+ readonly default: true;
253
+ };
254
+ readonly listType: {
255
+ readonly type: PropType<"text" | "picture" | "picture-card">;
256
+ readonly required: false;
257
+ readonly validator: ((val: unknown) => boolean) | undefined;
258
+ __epPropKey: true;
259
+ } & {
260
+ readonly default: "text";
261
+ };
262
+ readonly httpRequest: {
263
+ readonly type: PropType<UploadRequestHandler>;
264
+ readonly required: false;
265
+ readonly validator: ((val: unknown) => boolean) | undefined;
266
+ __epPropKey: true;
267
+ } & {
268
+ readonly default: UploadRequestHandler;
269
+ };
270
+ readonly disabled: BooleanConstructor;
271
+ readonly limit: NumberConstructor;
272
+ }>>, {
273
+ abort: (file: UploadFile) => void;
274
+ submit: () => void;
275
+ clearFiles: (states?: UploadStatus[]) => void;
276
+ handleStart: (rawFile: UploadRawFile) => void;
277
+ handleRemove: (file: UploadFile | UploadRawFile, rawFile?: UploadRawFile) => void;
278
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, {
279
+ readonly data: ({
280
+ [x: string]: any;
281
+ } | Promise<{
282
+ [x: string]: any;
283
+ }>) | ((rawFile: UploadRawFile) => {
284
+ [x: string]: any;
285
+ } | Promise<{
286
+ [x: string]: any;
287
+ }>);
288
+ readonly disabled: boolean;
289
+ readonly drag: boolean;
290
+ readonly multiple: boolean;
291
+ readonly name: string;
292
+ readonly onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
293
+ readonly onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
294
+ readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
295
+ readonly method: string;
296
+ readonly action: string;
297
+ readonly withCredentials: boolean;
298
+ readonly showFileList: boolean;
299
+ readonly accept: string;
300
+ readonly fileList: UploadUserFile[];
301
+ readonly autoUpload: boolean;
302
+ readonly listType: "text" | "picture" | "picture-card";
303
+ readonly httpRequest: UploadRequestHandler;
304
+ readonly beforeUpload: (rawFile: UploadRawFile) => boolean | void | File | Blob | Promise<boolean | void | File | Blob | null | undefined> | null | undefined;
305
+ readonly onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
306
+ readonly onPreview: (uploadFile: UploadFile) => void;
307
+ readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
308
+ readonly onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
309
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
310
+ beforeCreate?: (() => void) | (() => void)[];
311
+ created?: (() => void) | (() => void)[];
312
+ beforeMount?: (() => void) | (() => void)[];
313
+ mounted?: (() => void) | (() => void)[];
314
+ beforeUpdate?: (() => void) | (() => void)[];
315
+ updated?: (() => void) | (() => void)[];
316
+ activated?: (() => void) | (() => void)[];
317
+ deactivated?: (() => void) | (() => void)[];
318
+ beforeDestroy?: (() => void) | (() => void)[];
319
+ beforeUnmount?: (() => void) | (() => void)[];
320
+ destroyed?: (() => void) | (() => void)[];
321
+ unmounted?: (() => void) | (() => void)[];
322
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
323
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
324
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
325
+ };
326
+ $forceUpdate: () => void;
327
+ $nextTick: nextTick;
328
+ $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;
329
+ } & Readonly<{
330
+ readonly data: ({
331
+ [x: string]: any;
332
+ } | Promise<{
333
+ [x: string]: any;
334
+ }>) | ((rawFile: UploadRawFile) => {
335
+ [x: string]: any;
336
+ } | Promise<{
337
+ [x: string]: any;
338
+ }>);
339
+ readonly disabled: boolean;
340
+ readonly drag: boolean;
341
+ readonly multiple: boolean;
342
+ readonly name: string;
343
+ readonly onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
344
+ readonly onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
345
+ readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
346
+ readonly method: string;
347
+ readonly action: string;
348
+ readonly withCredentials: boolean;
349
+ readonly showFileList: boolean;
350
+ readonly accept: string;
351
+ readonly fileList: UploadUserFile[];
352
+ readonly autoUpload: boolean;
353
+ readonly listType: "text" | "picture" | "picture-card";
354
+ readonly httpRequest: UploadRequestHandler;
355
+ readonly beforeUpload: (rawFile: UploadRawFile) => boolean | void | File | Blob | Promise<boolean | void | File | Blob | null | undefined> | null | undefined;
356
+ readonly onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
357
+ readonly onPreview: (uploadFile: UploadFile) => void;
358
+ readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
359
+ readonly onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
360
+ }> & Omit<Readonly< ExtractPropTypes<{
361
+ readonly beforeUpload: {
362
+ readonly type: PropType<(rawFile: UploadRawFile) => boolean | void | File | Blob | Promise<boolean | void | File | Blob | null | undefined> | null | undefined>;
363
+ readonly required: false;
364
+ readonly validator: ((val: unknown) => boolean) | undefined;
365
+ __epPropKey: true;
366
+ } & {
367
+ readonly default: () => void;
368
+ };
369
+ readonly beforeRemove: {
370
+ readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => boolean | Promise<boolean>>;
371
+ readonly required: false;
372
+ readonly validator: ((val: unknown) => boolean) | undefined;
373
+ __epPropKey: true;
374
+ };
375
+ readonly onRemove: {
376
+ readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
377
+ readonly required: false;
378
+ readonly validator: ((val: unknown) => boolean) | undefined;
379
+ __epPropKey: true;
380
+ } & {
381
+ readonly default: () => void;
382
+ };
383
+ readonly onChange: {
384
+ readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
385
+ readonly required: false;
386
+ readonly validator: ((val: unknown) => boolean) | undefined;
387
+ __epPropKey: true;
388
+ } & {
389
+ readonly default: () => void;
390
+ };
391
+ readonly onPreview: {
392
+ readonly type: PropType<(uploadFile: UploadFile) => void>;
393
+ readonly required: false;
394
+ readonly validator: ((val: unknown) => boolean) | undefined;
395
+ __epPropKey: true;
396
+ } & {
397
+ readonly default: () => void;
398
+ };
399
+ readonly onSuccess: {
400
+ readonly type: PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
401
+ readonly required: false;
402
+ readonly validator: ((val: unknown) => boolean) | undefined;
403
+ __epPropKey: true;
404
+ } & {
405
+ readonly default: () => void;
406
+ };
407
+ readonly onProgress: {
408
+ readonly type: PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
409
+ readonly required: false;
410
+ readonly validator: ((val: unknown) => boolean) | undefined;
411
+ __epPropKey: true;
412
+ } & {
413
+ readonly default: () => void;
414
+ };
415
+ readonly onError: {
416
+ readonly type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
417
+ readonly required: false;
418
+ readonly validator: ((val: unknown) => boolean) | undefined;
419
+ __epPropKey: true;
420
+ } & {
421
+ readonly default: () => void;
422
+ };
423
+ readonly onExceed: {
424
+ readonly type: PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
425
+ readonly required: false;
426
+ readonly validator: ((val: unknown) => boolean) | undefined;
427
+ __epPropKey: true;
428
+ } & {
429
+ readonly default: () => void;
430
+ };
431
+ readonly crossorigin: {
432
+ readonly type: PropType<"" | "anonymous" | "use-credentials">;
433
+ readonly required: false;
434
+ readonly validator: ((val: unknown) => boolean) | undefined;
435
+ __epPropKey: true;
436
+ };
437
+ readonly action: {
438
+ readonly type: PropType<string>;
439
+ readonly required: false;
440
+ readonly validator: ((val: unknown) => boolean) | undefined;
441
+ __epPropKey: true;
442
+ } & {
443
+ readonly default: "#";
444
+ };
445
+ readonly headers: {
446
+ readonly type: PropType<Record<string, any> | Headers>;
447
+ readonly required: false;
448
+ readonly validator: ((val: unknown) => boolean) | undefined;
449
+ __epPropKey: true;
450
+ };
451
+ readonly method: {
452
+ readonly type: PropType<string>;
453
+ readonly required: false;
454
+ readonly validator: ((val: unknown) => boolean) | undefined;
455
+ __epPropKey: true;
456
+ } & {
457
+ readonly default: "post";
458
+ };
459
+ readonly data: {
460
+ readonly type: PropType<({
461
+ [x: string]: any;
462
+ } | Promise<{
463
+ [x: string]: any;
464
+ }>) | ((rawFile: UploadRawFile) => {
465
+ [x: string]: any;
466
+ } | Promise<{
467
+ [x: string]: any;
468
+ }>)>;
469
+ readonly required: false;
470
+ readonly validator: ((val: unknown) => boolean) | undefined;
471
+ __epPropKey: true;
472
+ } & {
473
+ readonly default: () => {};
474
+ };
475
+ readonly multiple: BooleanConstructor;
476
+ readonly name: {
477
+ readonly type: PropType<string>;
478
+ readonly required: false;
479
+ readonly validator: ((val: unknown) => boolean) | undefined;
480
+ __epPropKey: true;
481
+ } & {
482
+ readonly default: "file";
483
+ };
484
+ readonly drag: BooleanConstructor;
485
+ readonly withCredentials: BooleanConstructor;
486
+ readonly showFileList: {
487
+ readonly type: PropType<boolean>;
488
+ readonly required: false;
489
+ readonly validator: ((val: unknown) => boolean) | undefined;
490
+ __epPropKey: true;
491
+ } & {
492
+ readonly default: true;
493
+ };
494
+ readonly accept: {
495
+ readonly type: PropType<string>;
496
+ readonly required: false;
497
+ readonly validator: ((val: unknown) => boolean) | undefined;
498
+ __epPropKey: true;
499
+ } & {
500
+ readonly default: "";
501
+ };
502
+ readonly fileList: {
503
+ readonly type: PropType< UploadUserFile[]>;
504
+ readonly required: false;
505
+ readonly validator: ((val: unknown) => boolean) | undefined;
506
+ __epPropKey: true;
507
+ } & {
508
+ readonly default: () => [];
509
+ };
510
+ readonly autoUpload: {
511
+ readonly type: PropType<boolean>;
512
+ readonly required: false;
513
+ readonly validator: ((val: unknown) => boolean) | undefined;
514
+ __epPropKey: true;
515
+ } & {
516
+ readonly default: true;
517
+ };
518
+ readonly listType: {
519
+ readonly type: PropType<"text" | "picture" | "picture-card">;
520
+ readonly required: false;
521
+ readonly validator: ((val: unknown) => boolean) | undefined;
522
+ __epPropKey: true;
523
+ } & {
524
+ readonly default: "text";
525
+ };
526
+ readonly httpRequest: {
527
+ readonly type: PropType<UploadRequestHandler>;
528
+ readonly required: false;
529
+ readonly validator: ((val: unknown) => boolean) | undefined;
530
+ __epPropKey: true;
531
+ } & {
532
+ readonly default: UploadRequestHandler;
533
+ };
534
+ readonly disabled: BooleanConstructor;
535
+ readonly limit: NumberConstructor;
536
+ }>>, "name" | "method" | "data" | "onChange" | "onError" | "onProgress" | "disabled" | "submit" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "multiple" | "drag" | "withCredentials" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "abort" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
537
+ abort: (file: UploadFile) => void;
538
+ submit: () => void;
539
+ clearFiles: (states?: UploadStatus[]) => void;
540
+ handleStart: (rawFile: UploadRawFile) => void;
541
+ handleRemove: (file: UploadFile | UploadRawFile, rawFile?: UploadRawFile) => void;
542
+ }> & {} & ComponentCustomProperties & {} & {
543
+ $slots: {
544
+ file?(_: {
545
+ file: UploadFile;
546
+ index: number;
547
+ }): any;
548
+ file?(_: {
549
+ file: UploadFile;
550
+ index: number;
551
+ }): any;
552
+ trigger?(_: {}): any;
553
+ trigger?(_: {}): any;
554
+ default?(_: {}): any;
555
+ default?(_: {}): any;
556
+ default?(_: {}): any;
557
+ tip?(_: {}): any;
558
+ };
559
+ }) | null;
560
+ }, HTMLDivElement>;
561
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { Dict, AISendData, AISendImageData } from '../../hooks';
1
+ import { Dict, AISendData, AISendImageData, AISendJsonData } from '../../hooks';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  export interface Props {
4
4
  models?: Dict[];
@@ -11,9 +11,11 @@ export interface Props {
11
11
  declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
12
12
  send: (data: AISendData) => any;
13
13
  imageSend: (data: AISendImageData) => any;
14
+ jsonSend: (data: AISendJsonData) => any;
14
15
  }, string, PublicProps, Readonly<Props> & Readonly<{
15
16
  onSend?: ((data: AISendData) => any) | undefined;
16
17
  onImageSend?: ((data: AISendImageData) => any) | undefined;
18
+ onJsonSend?: ((data: AISendJsonData) => any) | undefined;
17
19
  }>, {
18
20
  models: Dict[];
19
21
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -36,6 +36,8 @@ export interface TopicDto {
36
36
  prompt?: string;
37
37
  file?: File;
38
38
  }
39
+ export type TopicType = 'text' | 'image' | 'json';
40
+ export type TopicDataType = 'sketch' | 'figma' | 'unknown';
39
41
  export interface AITopic {
40
42
  id: string;
41
43
  appId: string;
@@ -50,6 +52,9 @@ export interface AITopic {
50
52
  dependencies: string;
51
53
  dsl: any;
52
54
  image?: string;
55
+ json?: string;
56
+ type?: TopicType;
57
+ dataType?: TopicDataType;
53
58
  }
54
59
  export interface AIChat {
55
60
  id: string;
@@ -68,6 +73,9 @@ export interface AIChat {
68
73
  vue: string;
69
74
  collapsed?: boolean;
70
75
  image?: string;
76
+ json?: string;
77
+ type?: TopicType;
78
+ dataType?: TopicDataType;
71
79
  }
72
80
  export interface ChatDto {
73
81
  topicId: string;
@@ -138,6 +146,13 @@ export declare abstract class OpenApi {
138
146
  topic: AITopic;
139
147
  chat: AIChat;
140
148
  }>>;
149
+ /**
150
+ * 发送元数据AI话题
151
+ */
152
+ abstract postJsonTopic?: (dto: TopicDto) => Promise<ResponseWrapper<{
153
+ topic: AITopic;
154
+ chat: AIChat;
155
+ }>>;
141
156
  /**
142
157
  * 获取对话列表
143
158
  */
@@ -190,4 +205,8 @@ export declare abstract class OpenApi {
190
205
  * 获取图片url
191
206
  */
192
207
  abstract getImage?: (path?: string) => string | undefined;
208
+ /**
209
+ * 获取文件url
210
+ */
211
+ abstract getOssFile?: (path?: string) => string | undefined;
193
212
  }
package/types/utils.d.ts CHANGED
@@ -8,3 +8,4 @@ export declare function proxyContext(context: any): any;
8
8
  export declare function expressionValidate(str: JSExpression | JSFunction, self: any, thisRequired?: boolean): boolean;
9
9
  export declare function getClassProperties(obj: any): string[];
10
10
  export declare function normalizedStyle(style?: Record<string, any>): Record<string, any>;
11
+ export declare function readJsonFile(file: File): Promise<any>;
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/designer
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.12.30
5
+ * @version 0.12.32
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.12.30";
8
+ export declare const version = "0.12.32";
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./index-DUQPxL6K.js";
2
- export {
3
- f as default
4
- };