@dazhicheng/ui 1.5.23 → 1.5.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/tt-drawer/index.d.ts +306 -306
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +167 -167
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.d.ts +3 -3
- package/dist/components/tt-form/src/types.d.ts +2 -0
- package/dist/components/tt-modal/index.d.ts +92 -92
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +52 -52
- package/dist/components/tt-modal/src/components/ModalFooter.vue.d.ts +5 -5
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +5 -5
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +18 -18
- package/dist/components/tt-table/src/Table.vue.d.ts +11 -11
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +2 -2
- package/dist/components/tt-upload/index.d.ts +31 -53
- package/dist/components/tt-upload/src/TtUpload.d.ts +32 -54
- package/dist/components/tt-upload/src/typing.d.ts +35 -24
- package/dist/components/types.d.ts +3 -0
- package/dist/index.js +18031 -17999
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -20,26 +20,14 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
20
20
|
readonly type: import('vue').PropType<boolean>;
|
|
21
21
|
readonly default: true;
|
|
22
22
|
};
|
|
23
|
-
readonly
|
|
24
|
-
readonly type: import('vue').PropType<string>;
|
|
25
|
-
readonly default: "导入";
|
|
26
|
-
};
|
|
27
|
-
readonly modalWidth: {
|
|
28
|
-
readonly type: import('vue').PropType<string | number>;
|
|
29
|
-
readonly default: 890;
|
|
30
|
-
};
|
|
31
|
-
readonly okText: {
|
|
32
|
-
readonly type: import('vue').PropType<string>;
|
|
33
|
-
readonly default: "确认";
|
|
34
|
-
};
|
|
35
|
-
readonly cancelText: {
|
|
36
|
-
readonly type: import('vue').PropType<string>;
|
|
37
|
-
readonly default: "取消";
|
|
38
|
-
};
|
|
39
|
-
readonly fileList: {
|
|
23
|
+
readonly modelValue: {
|
|
40
24
|
readonly type: import('vue').PropType<import('.').TtUploadFileItem[]>;
|
|
41
25
|
readonly default: () => never[];
|
|
42
26
|
};
|
|
27
|
+
readonly uploadOssApi: {
|
|
28
|
+
readonly type: import('vue').PropType<(file: File) => Promise<import('.').OssSignatureResult>>;
|
|
29
|
+
readonly default: undefined;
|
|
30
|
+
};
|
|
43
31
|
readonly uploadTip: {
|
|
44
32
|
readonly type: import('vue').PropType<string>;
|
|
45
33
|
readonly default: "可以上传pdf、excel、word、图片格式";
|
|
@@ -54,7 +42,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
54
42
|
};
|
|
55
43
|
readonly showTemplateDownload: {
|
|
56
44
|
readonly type: import('vue').PropType<boolean>;
|
|
57
|
-
readonly default:
|
|
45
|
+
readonly default: false;
|
|
58
46
|
};
|
|
59
47
|
readonly templateText: {
|
|
60
48
|
readonly type: import('vue').PropType<string>;
|
|
@@ -178,6 +166,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
178
166
|
readonly data: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | ((new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)))[], unknown, unknown, () => import('element-plus/es/utils/typescript.mjs').Mutable<{}>, boolean>;
|
|
179
167
|
readonly name: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
180
168
|
readonly withCredentials: BooleanConstructor;
|
|
169
|
+
readonly fileList: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]) | ((new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]))[], unknown, unknown, () => [], boolean>;
|
|
181
170
|
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
182
171
|
readonly listType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "picture" | "text" | "picture-card", unknown, "text", boolean>;
|
|
183
172
|
readonly httpRequest: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadRequestHandler) | (() => import('element-plus').UploadRequestHandler) | {
|
|
@@ -192,7 +181,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
192
181
|
readonly disabled: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
193
182
|
readonly limit: NumberConstructor;
|
|
194
183
|
readonly directory: BooleanConstructor;
|
|
195
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("delete" | "cancel" | "update:
|
|
184
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("delete" | "cancel" | "submit" | "update:modelValue" | "afterUpload" | "preview" | "download" | "templateDownload" | "ok")[], "delete" | "cancel" | "submit" | "update:modelValue" | "afterUpload" | "preview" | "download" | "templateDownload" | "ok", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
196
185
|
readonly action: {
|
|
197
186
|
readonly type: import('vue').PropType<string>;
|
|
198
187
|
readonly default: "";
|
|
@@ -213,26 +202,14 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
213
202
|
readonly type: import('vue').PropType<boolean>;
|
|
214
203
|
readonly default: true;
|
|
215
204
|
};
|
|
216
|
-
readonly
|
|
217
|
-
readonly type: import('vue').PropType<string>;
|
|
218
|
-
readonly default: "导入";
|
|
219
|
-
};
|
|
220
|
-
readonly modalWidth: {
|
|
221
|
-
readonly type: import('vue').PropType<string | number>;
|
|
222
|
-
readonly default: 890;
|
|
223
|
-
};
|
|
224
|
-
readonly okText: {
|
|
225
|
-
readonly type: import('vue').PropType<string>;
|
|
226
|
-
readonly default: "确认";
|
|
227
|
-
};
|
|
228
|
-
readonly cancelText: {
|
|
229
|
-
readonly type: import('vue').PropType<string>;
|
|
230
|
-
readonly default: "取消";
|
|
231
|
-
};
|
|
232
|
-
readonly fileList: {
|
|
205
|
+
readonly modelValue: {
|
|
233
206
|
readonly type: import('vue').PropType<import('.').TtUploadFileItem[]>;
|
|
234
207
|
readonly default: () => never[];
|
|
235
208
|
};
|
|
209
|
+
readonly uploadOssApi: {
|
|
210
|
+
readonly type: import('vue').PropType<(file: File) => Promise<import('.').OssSignatureResult>>;
|
|
211
|
+
readonly default: undefined;
|
|
212
|
+
};
|
|
236
213
|
readonly uploadTip: {
|
|
237
214
|
readonly type: import('vue').PropType<string>;
|
|
238
215
|
readonly default: "可以上传pdf、excel、word、图片格式";
|
|
@@ -247,7 +224,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
247
224
|
};
|
|
248
225
|
readonly showTemplateDownload: {
|
|
249
226
|
readonly type: import('vue').PropType<boolean>;
|
|
250
|
-
readonly default:
|
|
227
|
+
readonly default: false;
|
|
251
228
|
};
|
|
252
229
|
readonly templateText: {
|
|
253
230
|
readonly type: import('vue').PropType<string>;
|
|
@@ -371,6 +348,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
371
348
|
readonly data: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | ((new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)))[], unknown, unknown, () => import('element-plus/es/utils/typescript.mjs').Mutable<{}>, boolean>;
|
|
372
349
|
readonly name: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
373
350
|
readonly withCredentials: BooleanConstructor;
|
|
351
|
+
readonly fileList: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]) | ((new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]))[], unknown, unknown, () => [], boolean>;
|
|
374
352
|
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
375
353
|
readonly listType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "picture" | "text" | "picture-card", unknown, "text", boolean>;
|
|
376
354
|
readonly httpRequest: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadRequestHandler) | (() => import('element-plus').UploadRequestHandler) | {
|
|
@@ -387,15 +365,16 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
387
365
|
readonly directory: BooleanConstructor;
|
|
388
366
|
}>> & Readonly<{
|
|
389
367
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
368
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
369
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
390
370
|
onPreview?: ((...args: any[]) => any) | undefined;
|
|
391
371
|
onOk?: ((...args: any[]) => any) | undefined;
|
|
392
372
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
393
|
-
|
|
373
|
+
onAfterUpload?: ((...args: any[]) => any) | undefined;
|
|
394
374
|
onDownload?: ((...args: any[]) => any) | undefined;
|
|
395
375
|
onTemplateDownload?: ((...args: any[]) => any) | undefined;
|
|
396
376
|
}>, {
|
|
397
377
|
readonly data: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | ((new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)))[], unknown, unknown>;
|
|
398
|
-
readonly title: string;
|
|
399
378
|
readonly method: string;
|
|
400
379
|
readonly withCredentials: boolean;
|
|
401
380
|
readonly drag: boolean;
|
|
@@ -404,27 +383,16 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
404
383
|
readonly onChange: (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
405
384
|
readonly disabled: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
406
385
|
readonly name: string;
|
|
386
|
+
readonly modelValue: import('.').TtUploadFileItem[];
|
|
407
387
|
readonly showPreview: boolean;
|
|
408
388
|
readonly multiple: boolean;
|
|
409
|
-
readonly beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
410
|
-
readonly onRemove: (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
411
|
-
readonly onPreview: (uploadFile: import('element-plus').UploadFile) => void;
|
|
412
|
-
readonly onSuccess: (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
413
|
-
readonly onExceed: (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void;
|
|
414
389
|
readonly action: string;
|
|
415
|
-
readonly showFileList: boolean;
|
|
416
390
|
readonly accept: string;
|
|
417
|
-
readonly fileList: import('.').TtUploadFileItem[];
|
|
418
|
-
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
419
|
-
readonly listType: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "picture" | "text" | "picture-card", unknown>;
|
|
420
|
-
readonly httpRequest: import('element-plus').UploadRequestHandler;
|
|
421
|
-
readonly directory: boolean;
|
|
422
|
-
readonly cancelText: string;
|
|
423
|
-
readonly okText: string;
|
|
424
391
|
readonly modal: boolean;
|
|
425
|
-
readonly
|
|
392
|
+
readonly uploadOssApi: (file: File) => Promise<import('.').OssSignatureResult>;
|
|
426
393
|
readonly uploadTip: string;
|
|
427
394
|
readonly maxSize: number;
|
|
395
|
+
readonly showFileList: boolean;
|
|
428
396
|
readonly showTemplateDownload: boolean;
|
|
429
397
|
readonly templateText: string;
|
|
430
398
|
readonly showDownload: boolean;
|
|
@@ -432,6 +400,16 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
|
|
|
432
400
|
readonly gridThreshold: number;
|
|
433
401
|
readonly gridColumns: number;
|
|
434
402
|
readonly showCount: boolean;
|
|
403
|
+
readonly beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
404
|
+
readonly onRemove: (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
405
|
+
readonly onPreview: (uploadFile: import('element-plus').UploadFile) => void;
|
|
406
|
+
readonly onSuccess: (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
407
|
+
readonly onExceed: (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void;
|
|
408
|
+
readonly fileList: import('element-plus').UploadUserFile[];
|
|
409
|
+
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
410
|
+
readonly listType: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "picture" | "text" | "picture-card", unknown>;
|
|
411
|
+
readonly httpRequest: import('element-plus').UploadRequestHandler;
|
|
412
|
+
readonly directory: boolean;
|
|
435
413
|
}, import('vue').SlotsType<{
|
|
436
414
|
uploadContent?: () => import('vue').VNode[];
|
|
437
415
|
uploadTip?: () => import('vue').VNode[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UploadFile, UploadFiles } from 'element-plus';
|
|
2
2
|
import { SlotsType, VNode } from 'vue';
|
|
3
|
-
import { TtUploadFileItem } from './typing';
|
|
3
|
+
import { OssSignatureResult, TtUploadFileItem } from './typing';
|
|
4
4
|
/**
|
|
5
5
|
* TtUpload 上传组件
|
|
6
6
|
*
|
|
@@ -38,26 +38,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
38
38
|
readonly type: import('vue').PropType<boolean>;
|
|
39
39
|
readonly default: true;
|
|
40
40
|
};
|
|
41
|
-
readonly
|
|
42
|
-
readonly type: import('vue').PropType<string>;
|
|
43
|
-
readonly default: "导入";
|
|
44
|
-
};
|
|
45
|
-
readonly modalWidth: {
|
|
46
|
-
readonly type: import('vue').PropType<string | number>;
|
|
47
|
-
readonly default: 890;
|
|
48
|
-
};
|
|
49
|
-
readonly okText: {
|
|
50
|
-
readonly type: import('vue').PropType<string>;
|
|
51
|
-
readonly default: "确认";
|
|
52
|
-
};
|
|
53
|
-
readonly cancelText: {
|
|
54
|
-
readonly type: import('vue').PropType<string>;
|
|
55
|
-
readonly default: "取消";
|
|
56
|
-
};
|
|
57
|
-
readonly fileList: {
|
|
41
|
+
readonly modelValue: {
|
|
58
42
|
readonly type: import('vue').PropType<TtUploadFileItem[]>;
|
|
59
43
|
readonly default: () => never[];
|
|
60
44
|
};
|
|
45
|
+
readonly uploadOssApi: {
|
|
46
|
+
readonly type: import('vue').PropType<(file: File) => Promise<OssSignatureResult>>;
|
|
47
|
+
readonly default: undefined;
|
|
48
|
+
};
|
|
61
49
|
readonly uploadTip: {
|
|
62
50
|
readonly type: import('vue').PropType<string>;
|
|
63
51
|
readonly default: "可以上传pdf、excel、word、图片格式";
|
|
@@ -72,7 +60,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
72
60
|
};
|
|
73
61
|
readonly showTemplateDownload: {
|
|
74
62
|
readonly type: import('vue').PropType<boolean>;
|
|
75
|
-
readonly default:
|
|
63
|
+
readonly default: false;
|
|
76
64
|
};
|
|
77
65
|
readonly templateText: {
|
|
78
66
|
readonly type: import('vue').PropType<string>;
|
|
@@ -196,6 +184,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
196
184
|
readonly data: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | ((new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)))[], unknown, unknown, () => import('element-plus/es/utils/typescript.mjs').Mutable<{}>, boolean>;
|
|
197
185
|
readonly name: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
198
186
|
readonly withCredentials: BooleanConstructor;
|
|
187
|
+
readonly fileList: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]) | ((new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]))[], unknown, unknown, () => [], boolean>;
|
|
199
188
|
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
200
189
|
readonly listType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "picture" | "text" | "picture-card", unknown, "text", boolean>;
|
|
201
190
|
readonly httpRequest: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadRequestHandler) | (() => import('element-plus').UploadRequestHandler) | {
|
|
@@ -210,7 +199,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
210
199
|
readonly disabled: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
211
200
|
readonly limit: NumberConstructor;
|
|
212
201
|
readonly directory: BooleanConstructor;
|
|
213
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("delete" | "cancel" | "update:
|
|
202
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("delete" | "cancel" | "submit" | "update:modelValue" | "afterUpload" | "preview" | "download" | "templateDownload" | "ok")[], "delete" | "cancel" | "submit" | "update:modelValue" | "afterUpload" | "preview" | "download" | "templateDownload" | "ok", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
214
203
|
readonly action: {
|
|
215
204
|
readonly type: import('vue').PropType<string>;
|
|
216
205
|
readonly default: "";
|
|
@@ -231,26 +220,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
231
220
|
readonly type: import('vue').PropType<boolean>;
|
|
232
221
|
readonly default: true;
|
|
233
222
|
};
|
|
234
|
-
readonly
|
|
235
|
-
readonly type: import('vue').PropType<string>;
|
|
236
|
-
readonly default: "导入";
|
|
237
|
-
};
|
|
238
|
-
readonly modalWidth: {
|
|
239
|
-
readonly type: import('vue').PropType<string | number>;
|
|
240
|
-
readonly default: 890;
|
|
241
|
-
};
|
|
242
|
-
readonly okText: {
|
|
243
|
-
readonly type: import('vue').PropType<string>;
|
|
244
|
-
readonly default: "确认";
|
|
245
|
-
};
|
|
246
|
-
readonly cancelText: {
|
|
247
|
-
readonly type: import('vue').PropType<string>;
|
|
248
|
-
readonly default: "取消";
|
|
249
|
-
};
|
|
250
|
-
readonly fileList: {
|
|
223
|
+
readonly modelValue: {
|
|
251
224
|
readonly type: import('vue').PropType<TtUploadFileItem[]>;
|
|
252
225
|
readonly default: () => never[];
|
|
253
226
|
};
|
|
227
|
+
readonly uploadOssApi: {
|
|
228
|
+
readonly type: import('vue').PropType<(file: File) => Promise<OssSignatureResult>>;
|
|
229
|
+
readonly default: undefined;
|
|
230
|
+
};
|
|
254
231
|
readonly uploadTip: {
|
|
255
232
|
readonly type: import('vue').PropType<string>;
|
|
256
233
|
readonly default: "可以上传pdf、excel、word、图片格式";
|
|
@@ -265,7 +242,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
265
242
|
};
|
|
266
243
|
readonly showTemplateDownload: {
|
|
267
244
|
readonly type: import('vue').PropType<boolean>;
|
|
268
|
-
readonly default:
|
|
245
|
+
readonly default: false;
|
|
269
246
|
};
|
|
270
247
|
readonly templateText: {
|
|
271
248
|
readonly type: import('vue').PropType<string>;
|
|
@@ -389,6 +366,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
389
366
|
readonly data: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | ((new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)))[], unknown, unknown, () => import('element-plus/es/utils/typescript.mjs').Mutable<{}>, boolean>;
|
|
390
367
|
readonly name: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
391
368
|
readonly withCredentials: BooleanConstructor;
|
|
369
|
+
readonly fileList: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]) | ((new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]))[], unknown, unknown, () => [], boolean>;
|
|
392
370
|
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
393
371
|
readonly listType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "picture" | "text" | "picture-card", unknown, "text", boolean>;
|
|
394
372
|
readonly httpRequest: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadRequestHandler) | (() => import('element-plus').UploadRequestHandler) | {
|
|
@@ -405,15 +383,16 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
405
383
|
readonly directory: BooleanConstructor;
|
|
406
384
|
}>> & Readonly<{
|
|
407
385
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
386
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
387
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
408
388
|
onPreview?: ((...args: any[]) => any) | undefined;
|
|
409
389
|
onOk?: ((...args: any[]) => any) | undefined;
|
|
410
390
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
411
|
-
|
|
391
|
+
onAfterUpload?: ((...args: any[]) => any) | undefined;
|
|
412
392
|
onDownload?: ((...args: any[]) => any) | undefined;
|
|
413
393
|
onTemplateDownload?: ((...args: any[]) => any) | undefined;
|
|
414
394
|
}>, {
|
|
415
395
|
readonly data: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | ((new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)))[], unknown, unknown>;
|
|
416
|
-
readonly title: string;
|
|
417
396
|
readonly method: string;
|
|
418
397
|
readonly withCredentials: boolean;
|
|
419
398
|
readonly drag: boolean;
|
|
@@ -422,27 +401,16 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
422
401
|
readonly onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
423
402
|
readonly disabled: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
424
403
|
readonly name: string;
|
|
404
|
+
readonly modelValue: TtUploadFileItem[];
|
|
425
405
|
readonly showPreview: boolean;
|
|
426
406
|
readonly multiple: boolean;
|
|
427
|
-
readonly beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
428
|
-
readonly onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
429
|
-
readonly onPreview: (uploadFile: UploadFile) => void;
|
|
430
|
-
readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
431
|
-
readonly onExceed: (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void;
|
|
432
407
|
readonly action: string;
|
|
433
|
-
readonly showFileList: boolean;
|
|
434
408
|
readonly accept: string;
|
|
435
|
-
readonly fileList: TtUploadFileItem[];
|
|
436
|
-
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
437
|
-
readonly listType: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "picture" | "text" | "picture-card", unknown>;
|
|
438
|
-
readonly httpRequest: import('element-plus').UploadRequestHandler;
|
|
439
|
-
readonly directory: boolean;
|
|
440
|
-
readonly cancelText: string;
|
|
441
|
-
readonly okText: string;
|
|
442
409
|
readonly modal: boolean;
|
|
443
|
-
readonly
|
|
410
|
+
readonly uploadOssApi: (file: File) => Promise<OssSignatureResult>;
|
|
444
411
|
readonly uploadTip: string;
|
|
445
412
|
readonly maxSize: number;
|
|
413
|
+
readonly showFileList: boolean;
|
|
446
414
|
readonly showTemplateDownload: boolean;
|
|
447
415
|
readonly templateText: string;
|
|
448
416
|
readonly showDownload: boolean;
|
|
@@ -450,6 +418,16 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
450
418
|
readonly gridThreshold: number;
|
|
451
419
|
readonly gridColumns: number;
|
|
452
420
|
readonly showCount: boolean;
|
|
421
|
+
readonly beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
422
|
+
readonly onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
423
|
+
readonly onPreview: (uploadFile: UploadFile) => void;
|
|
424
|
+
readonly onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
425
|
+
readonly onExceed: (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void;
|
|
426
|
+
readonly fileList: import('element-plus').UploadUserFile[];
|
|
427
|
+
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
428
|
+
readonly listType: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "picture" | "text" | "picture-card", unknown>;
|
|
429
|
+
readonly httpRequest: import('element-plus').UploadRequestHandler;
|
|
430
|
+
readonly directory: boolean;
|
|
453
431
|
}, SlotsType<{
|
|
454
432
|
/** 自定义上传区域内容 */
|
|
455
433
|
uploadContent?: () => VNode[];
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
/** 后端返回的阿里云 OSS V4 签名信息(服务端签名直传) */
|
|
3
|
+
export interface OssSignatureResult {
|
|
4
|
+
/** HMAC-SHA256 签名 */
|
|
5
|
+
signature: string;
|
|
6
|
+
/** STS 安全令牌 */
|
|
7
|
+
security_token: string;
|
|
8
|
+
/** OSS 上传地址,如 http://bucket.oss-cn-shenzhen.aliyuncs.com */
|
|
9
|
+
host: string;
|
|
10
|
+
/** Base64 编码的 callback 配置 */
|
|
11
|
+
callback: string;
|
|
12
|
+
/** 签名凭证,格式:AccessKeyId/date/region/oss/aliyun_v4_request */
|
|
13
|
+
x_oss_credential: string;
|
|
14
|
+
/** 文件存储目录前缀 */
|
|
15
|
+
dir: string;
|
|
16
|
+
/** 签名版本,固定 OSS4-HMAC-SHA256 */
|
|
17
|
+
version: string;
|
|
18
|
+
/** 请求时间,ISO 8601 格式 */
|
|
19
|
+
x_oss_date: string;
|
|
20
|
+
/** Base64 编码的上传策略 */
|
|
21
|
+
policy: string;
|
|
22
|
+
}
|
|
2
23
|
export interface TtUploadFileItem {
|
|
3
24
|
/** 文件唯一标识 */
|
|
4
25
|
id: string | number;
|
|
@@ -39,31 +60,16 @@ export declare const ttUploadProps: {
|
|
|
39
60
|
readonly type: PropType<boolean>;
|
|
40
61
|
readonly default: true;
|
|
41
62
|
};
|
|
42
|
-
/**
|
|
43
|
-
readonly
|
|
44
|
-
readonly type: PropType<string>;
|
|
45
|
-
readonly default: "导入";
|
|
46
|
-
};
|
|
47
|
-
/** 弹框宽度 */
|
|
48
|
-
readonly modalWidth: {
|
|
49
|
-
readonly type: PropType<string | number>;
|
|
50
|
-
readonly default: 890;
|
|
51
|
-
};
|
|
52
|
-
/** 确定按钮文字 */
|
|
53
|
-
readonly okText: {
|
|
54
|
-
readonly type: PropType<string>;
|
|
55
|
-
readonly default: "确认";
|
|
56
|
-
};
|
|
57
|
-
/** 取消按钮文字 */
|
|
58
|
-
readonly cancelText: {
|
|
59
|
-
readonly type: PropType<string>;
|
|
60
|
-
readonly default: "取消";
|
|
61
|
-
};
|
|
62
|
-
/** 已上传文件列表 */
|
|
63
|
-
readonly fileList: {
|
|
63
|
+
/** 已上传文件列表(v-model) */
|
|
64
|
+
readonly modelValue: {
|
|
64
65
|
readonly type: PropType<TtUploadFileItem[]>;
|
|
65
66
|
readonly default: () => never[];
|
|
66
67
|
};
|
|
68
|
+
/** 获取 OSS 签名信息的接口(服务端签名直传),不传则使用全局 setup 的 uploadOssApi */
|
|
69
|
+
readonly uploadOssApi: {
|
|
70
|
+
readonly type: PropType<(file: File) => Promise<OssSignatureResult>>;
|
|
71
|
+
readonly default: undefined;
|
|
72
|
+
};
|
|
67
73
|
/** 上传提示文字 */
|
|
68
74
|
readonly uploadTip: {
|
|
69
75
|
readonly type: PropType<string>;
|
|
@@ -82,7 +88,7 @@ export declare const ttUploadProps: {
|
|
|
82
88
|
/** 是否显示模板下载链接 */
|
|
83
89
|
readonly showTemplateDownload: {
|
|
84
90
|
readonly type: PropType<boolean>;
|
|
85
|
-
readonly default:
|
|
91
|
+
readonly default: false;
|
|
86
92
|
};
|
|
87
93
|
/** 模板下载链接文字 */
|
|
88
94
|
readonly templateText: {
|
|
@@ -213,6 +219,7 @@ export declare const ttUploadProps: {
|
|
|
213
219
|
readonly data: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | ((new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)))[], unknown, unknown, () => import('element-plus/es/utils/typescript.mjs').Mutable<{}>, boolean>;
|
|
214
220
|
readonly name: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
215
221
|
readonly withCredentials: BooleanConstructor;
|
|
222
|
+
readonly fileList: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]) | ((new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]))[], unknown, unknown, () => [], boolean>;
|
|
216
223
|
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
217
224
|
readonly listType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "picture" | "text" | "picture-card", unknown, "text", boolean>;
|
|
218
225
|
readonly httpRequest: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadRequestHandler) | (() => import('element-plus').UploadRequestHandler) | {
|
|
@@ -230,11 +237,15 @@ export declare const ttUploadProps: {
|
|
|
230
237
|
};
|
|
231
238
|
export type TtUploadProps = ExtractPropTypes<typeof ttUploadProps>;
|
|
232
239
|
export interface TtUploadEmits {
|
|
233
|
-
(e: "update:
|
|
240
|
+
(e: "update:modelValue", val: TtUploadFileItem[]): void;
|
|
241
|
+
/** 每次上传成功后抛出:当前文件项与后端返回的 url */
|
|
242
|
+
(e: "afterUpload", file: TtUploadFileItem, url: string): void;
|
|
234
243
|
(e: "preview", file: TtUploadFileItem): void;
|
|
235
244
|
(e: "download", file: TtUploadFileItem): void;
|
|
236
245
|
(e: "delete", file: TtUploadFileItem): void;
|
|
237
246
|
(e: "templateDownload"): void;
|
|
238
247
|
(e: "ok", fileList: TtUploadFileItem[]): void;
|
|
248
|
+
/** 弹框模式下点击确定时抛出,携带当前文件列表 */
|
|
249
|
+
(e: "submit", fileList: TtUploadFileItem[]): void;
|
|
239
250
|
(e: "cancel"): void;
|
|
240
251
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VxeGridPropTypes, VxeTablePropTypes } from 'vxe-table';
|
|
2
2
|
import { TtTableProps } from './tt-table/src/types/table';
|
|
3
|
+
import { OssSignatureResult } from './tt-upload/src/typing';
|
|
3
4
|
export type Fn<T = any, R = T> = (...arg: T[]) => R;
|
|
4
5
|
export type Nullable<T> = T | null;
|
|
5
6
|
export type Recordable<T = any> = Record<string, T>;
|
|
@@ -8,6 +9,8 @@ export type TtUiGlobalConfig = {
|
|
|
8
9
|
* 登录的用户id
|
|
9
10
|
*/
|
|
10
11
|
userId?: string | number;
|
|
12
|
+
/** 获取 OSS 签名信息的接口(服务端签名直传) */
|
|
13
|
+
uploadOssApi?: (file: File) => Promise<OssSignatureResult>;
|
|
11
14
|
table?: {
|
|
12
15
|
/** 自定义列服务端配置的key,支持函数动态获取 */
|
|
13
16
|
columnsKey?: string | (() => string);
|