@dazhicheng/ui 1.6.23 → 1.6.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-api-component/index.d.ts +24 -35
- package/dist/components/tt-area/TtArea.d.ts +3 -0
- package/dist/components/tt-area/index.d.ts +1 -1
- package/dist/components/tt-button/components/AddButton.d.ts +3 -0
- package/dist/components/tt-button/index.d.ts +260 -589
- package/dist/components/tt-checkbox/index.d.ts +26 -35
- package/dist/components/tt-drawer/index.d.ts +306 -299
- package/dist/components/tt-drawer/src/{RenderDrawer.vue.d.ts → RenderDrawer.d.ts} +149 -146
- package/dist/components/tt-drawer/src/components/{DrawerFooter.vue.d.ts → DrawerFooter.d.ts} +18 -16
- package/dist/components/tt-drawer/src/components/{DrawerHeader.vue.d.ts → DrawerHeader.d.ts} +4 -3
- package/dist/components/tt-drawer/src/hooks/useDrawerRender.d.ts +2 -2
- package/dist/components/tt-drawer/src/hooks/useResizable.d.ts +2 -2
- package/dist/components/tt-drawer/src/utils/drawer-api.d.ts +4 -2
- package/dist/components/tt-empty/index.d.ts +10 -8
- package/dist/components/tt-form/src/components/{ExpandableArrow.vue.d.ts → ExpandableArrow.d.ts} +5 -4
- package/dist/components/tt-form/src/components/{FormActions.vue.d.ts → FormActions.d.ts} +6 -5
- package/dist/components/tt-form/src/components/{FormElInput.vue.d.ts → FormElInput.d.ts} +105 -101
- package/dist/components/tt-form/src/components/Slot.d.ts +4 -4
- package/dist/components/tt-form/src/form/{FormControl.vue.d.ts → FormControl.d.ts} +2 -1
- package/dist/components/tt-form/src/form/{FormDescription.vue.d.ts → FormDescription.d.ts} +2 -1
- package/dist/components/tt-form/src/form/{FormItem.vue.d.ts → FormItem.d.ts} +2 -1
- package/dist/components/tt-form/src/form/{FormLabel.vue.d.ts → FormLabel.d.ts} +2 -1
- package/dist/components/tt-form/src/form/FormMessage.d.ts +3 -0
- package/dist/components/tt-form/src/form/FormMessageToolTip.d.ts +9 -0
- package/dist/components/tt-form/src/form/{FormWarnMessage.vue.d.ts → FormWarnMessage.d.ts} +2 -1
- package/dist/components/tt-form/src/form/{RenderContent.vue.d.ts → RenderContent.d.ts} +4 -4
- package/dist/components/tt-form/src/form/index.d.ts +8 -8
- package/dist/components/tt-form/src/form/useFormField.d.ts +6 -5
- package/dist/components/tt-form/src/form-render/{FormField.vue.d.ts → FormField.d.ts} +2 -1
- package/dist/components/tt-form/src/form-render/FormFieldContact.d.ts +6 -6
- package/dist/components/tt-form/src/form-render/{FormLabel.vue.d.ts → FormLabel.d.ts} +3 -2
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +14 -11
- package/dist/components/tt-form/src/form-render/context.d.ts +5 -4
- package/dist/components/tt-form/src/form-render/dependencies.d.ts +7 -6
- package/dist/components/tt-form/src/form-render/expandable.d.ts +4 -3
- package/dist/components/tt-form/src/form-render/{form.vue.d.ts → form.d.ts} +9 -8
- package/dist/components/tt-form/src/form-render/index.d.ts +3 -3
- package/dist/components/tt-form/src/formApi.d.ts +3 -3
- package/dist/components/tt-form/src/group-form/{GroupForm.vue.d.ts → GroupForm.d.ts} +7 -5
- package/dist/components/tt-form/src/group-form/{GroupSection.vue.d.ts → GroupSection.d.ts} +7 -5
- package/dist/components/tt-form/src/group-form/{LazyFormField.vue.d.ts → LazyFormField.d.ts} +5 -3
- package/dist/components/tt-form/src/group-form/groupFormApi.d.ts +7 -5
- package/dist/components/tt-form/src/hooks/useFormFieldBus.d.ts +3 -2
- package/dist/components/tt-form/src/hooks/useForwardProps.d.ts +2 -2
- package/dist/components/tt-form/src/hooks/useForwardPropsEmits.d.ts +2 -2
- package/dist/components/tt-form/src/index.d.ts +217 -0
- package/dist/components/tt-form/src/useForm.d.ts +2 -1
- package/dist/components/tt-form/src/useFormContext.d.ts +2 -1
- package/dist/components/tt-form-item-error-tooltip/index.d.ts +61 -337
- package/dist/components/tt-icon/components/AddIcon.d.ts +8 -0
- package/dist/components/tt-icon/components/SubIcon.d.ts +8 -0
- package/dist/components/tt-icon/index.d.ts +24 -115
- package/dist/components/tt-image/index.d.ts +45 -41
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +30 -26
- package/dist/components/tt-image/tt-image.d.ts +36 -34
- package/dist/components/tt-loading/index.d.ts +5 -2
- package/dist/components/tt-loading/src/loading.d.ts +13 -0
- package/dist/components/tt-log/index.d.ts +7 -6
- package/dist/components/tt-modal/index.d.ts +371 -364
- package/dist/components/tt-modal/src/{RenderModal.vue.d.ts → RenderModal.d.ts} +118 -115
- package/dist/components/tt-modal/src/components/{ModalFooter.vue.d.ts → ModalFooter.d.ts} +26 -23
- package/dist/components/tt-modal/src/components/{ModalHeader.vue.d.ts → ModalHeader.d.ts} +4 -3
- package/dist/components/tt-modal/src/components/{ModalWrapper.vue.d.ts → ModalWrapper.d.ts} +27 -24
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +32 -29
- package/dist/components/tt-modal/src/typing.d.ts +2 -2
- package/dist/components/tt-modal/src/utils/modal-api.d.ts +2 -1
- package/dist/components/tt-modal-form/hooks/useModalFormSlot.d.ts +3 -2
- package/dist/components/tt-modal-form/index.d.ts +46 -2
- package/dist/components/tt-modal-form/useModalForm.d.ts +4 -3
- package/dist/components/tt-nav-anchor/index.d.ts +15 -12
- package/dist/components/tt-nav-anchor/src/{TtNavAnchor.vue.d.ts → TtNavAnchor.d.ts} +4 -4
- package/dist/components/tt-panel-select/index.d.ts +1 -1
- package/dist/components/tt-panel-select/src/components/{PanelLeft.vue.d.ts → PanelLeft.d.ts} +4 -3
- package/dist/components/tt-panel-select/src/components/{PanelMiddle.vue.d.ts → PanelMiddle.d.ts} +83 -80
- package/dist/components/tt-panel-select/src/components/{PanelRight.vue.d.ts → PanelRight.d.ts} +34 -32
- package/dist/components/tt-panel-select/src/hooks/usePanelData.d.ts +7 -6
- package/dist/components/tt-panel-select/src/hooks/usePanelSelection.d.ts +5 -5
- package/dist/components/tt-panel-select/src/{index.vue.d.ts → index.d.ts} +84 -80
- package/dist/components/tt-radio-group/index.d.ts +31 -50
- package/dist/components/tt-select/index.d.ts +1 -1
- package/dist/components/tt-select/src/{Select.vue.d.ts → Select.d.ts} +146 -141
- package/dist/components/tt-select/src/components/{SelectTable.vue.d.ts → SelectTable.d.ts} +40 -36
- package/dist/components/tt-select/src/components/{Table.vue.d.ts → Table.d.ts} +41 -38
- package/dist/components/tt-select/src/hooks/useGrid.d.ts +2 -2
- package/dist/components/tt-select/src/hooks/usePagination.d.ts +4 -3
- package/dist/components/tt-select/src/hooks/useSelect.d.ts +2 -2
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +1 -1
- package/dist/components/tt-table/index.d.ts +287 -279
- package/dist/components/tt-table/src/{Table.vue.d.ts → Table.d.ts} +209 -204
- package/dist/components/tt-table/src/{TableForm.vue.d.ts → TableForm.d.ts} +83 -80
- package/dist/components/tt-table/src/components/RowContext.d.ts +5 -5
- package/dist/components/tt-table/src/components/{TableAction.vue.d.ts → TableAction.d.ts} +4 -4
- package/dist/components/tt-table/src/components/TableButtons.d.ts +5 -5
- package/dist/components/tt-table/src/components/{TableColumnModal.vue.d.ts → TableColumnModal.d.ts} +5 -4
- package/dist/components/tt-table/src/components/{TableToolbarTools.vue.d.ts → TableToolbarTools.d.ts} +7 -6
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +45 -44
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +33 -33
- package/dist/components/tt-table/src/hooks/useQuery.d.ts +2 -2
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +2 -2
- package/dist/components/tt-table/src/hooks/useSideSlot.d.ts +112 -110
- package/dist/components/tt-table/src/hooks/useTableData.d.ts +2 -2
- package/dist/components/tt-table/src/props.d.ts +19 -17
- package/dist/components/tt-table/src/utils/table-api.d.ts +4 -4
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +2 -1
- package/dist/components/tt-text/index.d.ts +34 -59
- package/dist/components/tt-upload/index.d.ts +317 -311
- package/dist/components/tt-upload/src/TtUpload.d.ts +519 -0
- package/dist/components/tt-upload/src/typing.d.ts +49 -47
- package/dist/hooks/useDataPermissionOptions.js +76 -72
- package/dist/hooks/useLoading.d.ts +2 -2
- package/dist/hooks/useScreenshotOss.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/package.json +2 -2
- package/dist/components/tt-api-component/index.vue.d.ts +0 -34
- package/dist/components/tt-area/TtArea.vue.d.ts +0 -2
- package/dist/components/tt-button/components/AddButton.vue.d.ts +0 -2
- package/dist/components/tt-button/index.vue.d.ts +0 -466
- package/dist/components/tt-checkbox/index.vue.d.ts +0 -28
- package/dist/components/tt-form/src/form/FormMessage.vue.d.ts +0 -2
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.d.ts +0 -8
- package/dist/components/tt-form/src/index.vue.d.ts +0 -216
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +0 -298
- package/dist/components/tt-icon/components/AddIcon.vue.d.ts +0 -7
- package/dist/components/tt-icon/components/SubIcon.vue.d.ts +0 -7
- package/dist/components/tt-icon/index.vue.d.ts +0 -32
- package/dist/components/tt-loading/src/loading.vue.d.ts +0 -12
- package/dist/components/tt-log/index.vue.d.ts +0 -5
- package/dist/components/tt-modal-form/index.vue.d.ts +0 -45
- package/dist/components/tt-radio-group/index.vue.d.ts +0 -33
- package/dist/components/tt-text/index.vue.d.ts +0 -50
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +0 -517
|
@@ -1,244 +1,250 @@
|
|
|
1
|
-
import { default as TtUploadConstructor } from './src/TtUpload
|
|
1
|
+
import { default as TtUploadConstructor } from './src/TtUpload';
|
|
2
2
|
import { TtUploadExposed } from './src/typing';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { SFCWithInstall } from '../../../../utils/src';
|
|
4
|
+
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, VNode } from 'vue';
|
|
5
|
+
import { EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils/index.mjs';
|
|
6
|
+
import { UploadRawFile, UploadFile, UploadFiles, UploadProgressEvent, UploadUserFile, UploadData, UploadRequestHandler } from 'element-plus';
|
|
7
|
+
import { Awaitable, Mutable } from 'element-plus/es/utils/typescript.mjs';
|
|
8
|
+
import { TtUploadFileItem } from '.';
|
|
9
|
+
export declare const TtUpload: SFCWithInstall<{
|
|
10
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
5
11
|
action: {
|
|
6
|
-
readonly type:
|
|
12
|
+
readonly type: PropType<string>;
|
|
7
13
|
readonly default: "";
|
|
8
14
|
};
|
|
9
15
|
accept: {
|
|
10
|
-
readonly type:
|
|
16
|
+
readonly type: PropType<string>;
|
|
11
17
|
readonly default: ".pdf,.xlsx,.xls,.doc,.docx,.jpg,.jpeg,.png";
|
|
12
18
|
};
|
|
13
|
-
beforeUpload:
|
|
14
|
-
(): (rawFile:
|
|
19
|
+
beforeUpload: EpPropFinalized<(new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
20
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
15
21
|
new (): any;
|
|
16
22
|
readonly prototype: any;
|
|
17
|
-
} | ((new (...args: any[]) => (rawFile:
|
|
18
|
-
(): (rawFile:
|
|
23
|
+
} | ((new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
24
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
19
25
|
new (): any;
|
|
20
26
|
readonly prototype: any;
|
|
21
27
|
} | null)[], unknown, unknown, () => void, boolean>;
|
|
22
28
|
multiple: {
|
|
23
|
-
readonly type:
|
|
29
|
+
readonly type: PropType<boolean>;
|
|
24
30
|
readonly default: true;
|
|
25
31
|
};
|
|
26
32
|
drag: {
|
|
27
|
-
readonly type:
|
|
33
|
+
readonly type: PropType<boolean>;
|
|
28
34
|
readonly default: true;
|
|
29
35
|
};
|
|
30
36
|
disabled: {
|
|
31
|
-
readonly type:
|
|
37
|
+
readonly type: PropType<boolean>;
|
|
32
38
|
readonly default: false;
|
|
33
39
|
};
|
|
34
40
|
modal: {
|
|
35
|
-
readonly type:
|
|
41
|
+
readonly type: PropType<boolean>;
|
|
36
42
|
readonly default: true;
|
|
37
43
|
};
|
|
38
44
|
uploadOssApi: {
|
|
39
|
-
readonly type:
|
|
45
|
+
readonly type: PropType<(file: File) => Promise<any>> | undefined | null;
|
|
40
46
|
readonly default: undefined;
|
|
41
47
|
};
|
|
42
48
|
uploadOssViewApi: {
|
|
43
|
-
readonly type:
|
|
49
|
+
readonly type: PropType<(key: string) => Promise<any>>;
|
|
44
50
|
readonly default: undefined;
|
|
45
51
|
};
|
|
46
52
|
uploadTip: {
|
|
47
|
-
readonly type:
|
|
53
|
+
readonly type: PropType<string>;
|
|
48
54
|
readonly default: "可以上传pdf、excel、word、图片格式";
|
|
49
55
|
};
|
|
50
56
|
maxSize: {
|
|
51
|
-
readonly type:
|
|
57
|
+
readonly type: PropType<number>;
|
|
52
58
|
readonly default: undefined;
|
|
53
59
|
};
|
|
54
60
|
showFileList: {
|
|
55
|
-
readonly type:
|
|
61
|
+
readonly type: PropType<boolean>;
|
|
56
62
|
readonly default: true;
|
|
57
63
|
};
|
|
58
64
|
showUploadArea: {
|
|
59
|
-
readonly type:
|
|
65
|
+
readonly type: PropType<boolean>;
|
|
60
66
|
readonly default: true;
|
|
61
67
|
};
|
|
62
68
|
showTemplateDownload: {
|
|
63
|
-
readonly type:
|
|
69
|
+
readonly type: PropType<boolean>;
|
|
64
70
|
readonly default: false;
|
|
65
71
|
};
|
|
66
72
|
templateText: {
|
|
67
|
-
readonly type:
|
|
73
|
+
readonly type: PropType<string>;
|
|
68
74
|
readonly default: "模板下载";
|
|
69
75
|
};
|
|
70
76
|
showPreview: {
|
|
71
|
-
readonly type:
|
|
77
|
+
readonly type: PropType<boolean>;
|
|
72
78
|
readonly default: true;
|
|
73
79
|
};
|
|
74
80
|
showDownload: {
|
|
75
|
-
readonly type:
|
|
81
|
+
readonly type: PropType<boolean>;
|
|
76
82
|
readonly default: true;
|
|
77
83
|
};
|
|
78
84
|
showDelete: {
|
|
79
|
-
readonly type:
|
|
85
|
+
readonly type: PropType<boolean>;
|
|
80
86
|
readonly default: true;
|
|
81
87
|
};
|
|
82
88
|
gridThreshold: {
|
|
83
|
-
readonly type:
|
|
89
|
+
readonly type: PropType<number>;
|
|
84
90
|
readonly default: 4;
|
|
85
91
|
};
|
|
86
92
|
gridColumns: {
|
|
87
|
-
readonly type:
|
|
93
|
+
readonly type: PropType<number>;
|
|
88
94
|
readonly default: 4;
|
|
89
95
|
};
|
|
90
96
|
showCount: {
|
|
91
|
-
readonly type:
|
|
97
|
+
readonly type: PropType<boolean>;
|
|
92
98
|
readonly default: true;
|
|
93
99
|
};
|
|
94
100
|
ossDir: {
|
|
95
|
-
readonly type:
|
|
101
|
+
readonly type: PropType<string>;
|
|
96
102
|
readonly default: undefined;
|
|
97
103
|
};
|
|
98
104
|
beforeDownload: {
|
|
99
|
-
readonly type:
|
|
105
|
+
readonly type: PropType<boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>)>;
|
|
100
106
|
readonly default: false;
|
|
101
107
|
};
|
|
102
108
|
beforeRemove: {
|
|
103
|
-
readonly type:
|
|
109
|
+
readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
|
|
104
110
|
readonly required: false;
|
|
105
111
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
106
112
|
__epPropKey: true;
|
|
107
113
|
};
|
|
108
|
-
onRemove:
|
|
109
|
-
(): (uploadFile:
|
|
114
|
+
onRemove: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
115
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
110
116
|
new (): any;
|
|
111
117
|
readonly prototype: any;
|
|
112
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
113
|
-
(): (uploadFile:
|
|
118
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
119
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
114
120
|
new (): any;
|
|
115
121
|
readonly prototype: any;
|
|
116
122
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
117
|
-
onChange:
|
|
118
|
-
(): (uploadFile:
|
|
123
|
+
onChange: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
124
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
119
125
|
new (): any;
|
|
120
126
|
readonly prototype: any;
|
|
121
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
122
|
-
(): (uploadFile:
|
|
127
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
128
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
123
129
|
new (): any;
|
|
124
130
|
readonly prototype: any;
|
|
125
131
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
126
|
-
onPreview:
|
|
127
|
-
(): (uploadFile:
|
|
132
|
+
onPreview: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
133
|
+
(): (uploadFile: UploadFile) => void;
|
|
128
134
|
new (): any;
|
|
129
135
|
readonly prototype: any;
|
|
130
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
131
|
-
(): (uploadFile:
|
|
136
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
137
|
+
(): (uploadFile: UploadFile) => void;
|
|
132
138
|
new (): any;
|
|
133
139
|
readonly prototype: any;
|
|
134
140
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
135
|
-
onSuccess:
|
|
136
|
-
(): (response: any, uploadFile:
|
|
141
|
+
onSuccess: EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
142
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
137
143
|
new (): any;
|
|
138
144
|
readonly prototype: any;
|
|
139
|
-
} | (((new (...args: any[]) => (response: any, uploadFile:
|
|
140
|
-
(): (response: any, uploadFile:
|
|
145
|
+
} | (((new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
146
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
141
147
|
new (): any;
|
|
142
148
|
readonly prototype: any;
|
|
143
149
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
144
|
-
onProgress:
|
|
145
|
-
(): (evt:
|
|
150
|
+
onProgress: EpPropFinalized<(new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
151
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
146
152
|
new (): any;
|
|
147
153
|
readonly prototype: any;
|
|
148
|
-
} | (((new (...args: any[]) => (evt:
|
|
149
|
-
(): (evt:
|
|
154
|
+
} | (((new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
155
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
150
156
|
new (): any;
|
|
151
157
|
readonly prototype: any;
|
|
152
158
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
153
|
-
onError:
|
|
154
|
-
(): (error: Error, uploadFile:
|
|
159
|
+
onError: EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
160
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
155
161
|
new (): any;
|
|
156
162
|
readonly prototype: any;
|
|
157
|
-
} | (((new (...args: any[]) => (error: Error, uploadFile:
|
|
158
|
-
(): (error: Error, uploadFile:
|
|
163
|
+
} | (((new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
164
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
159
165
|
new (): any;
|
|
160
166
|
readonly prototype: any;
|
|
161
167
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
162
|
-
onExceed:
|
|
163
|
-
(): (files: File[], uploadFiles:
|
|
168
|
+
onExceed: EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
169
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
164
170
|
new (): any;
|
|
165
171
|
readonly prototype: any;
|
|
166
|
-
} | (((new (...args: any[]) => (files: File[], uploadFiles:
|
|
167
|
-
(): (files: File[], uploadFiles:
|
|
172
|
+
} | (((new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
173
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
168
174
|
new (): any;
|
|
169
175
|
readonly prototype: any;
|
|
170
176
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
171
177
|
crossorigin: {
|
|
172
|
-
readonly type:
|
|
178
|
+
readonly type: PropType<EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | (((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials")) | null)[], unknown, unknown>>;
|
|
173
179
|
readonly required: false;
|
|
174
180
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
175
181
|
__epPropKey: true;
|
|
176
182
|
};
|
|
177
183
|
headers: {
|
|
178
|
-
readonly type:
|
|
184
|
+
readonly type: PropType<EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | (((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers)) | null)[], unknown, unknown>>;
|
|
179
185
|
readonly required: false;
|
|
180
186
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
181
187
|
__epPropKey: true;
|
|
182
188
|
};
|
|
183
|
-
method:
|
|
184
|
-
data:
|
|
185
|
-
name:
|
|
189
|
+
method: EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
190
|
+
data: EpPropFinalized<(new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (((new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>))) | null)[], unknown, unknown, () => Mutable<{}>, boolean>;
|
|
191
|
+
name: EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
186
192
|
withCredentials: BooleanConstructor;
|
|
187
|
-
fileList:
|
|
188
|
-
autoUpload:
|
|
189
|
-
listType:
|
|
190
|
-
httpRequest:
|
|
191
|
-
():
|
|
193
|
+
fileList: EpPropFinalized<(new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[]) | (((new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
194
|
+
autoUpload: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
195
|
+
listType: EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
|
|
196
|
+
httpRequest: EpPropFinalized<(new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
197
|
+
(): UploadRequestHandler;
|
|
192
198
|
new (): any;
|
|
193
199
|
readonly prototype: any;
|
|
194
|
-
} | (((new (...args: any[]) =>
|
|
195
|
-
():
|
|
200
|
+
} | (((new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
201
|
+
(): UploadRequestHandler;
|
|
196
202
|
new (): any;
|
|
197
203
|
readonly prototype: any;
|
|
198
|
-
}) | null)[], unknown, unknown,
|
|
204
|
+
}) | null)[], unknown, unknown, UploadRequestHandler, boolean>;
|
|
199
205
|
limit: NumberConstructor;
|
|
200
206
|
directory: BooleanConstructor;
|
|
201
207
|
modelValue: {
|
|
202
|
-
type:
|
|
208
|
+
type: PropType< TtUploadFileItem[]>;
|
|
203
209
|
};
|
|
204
210
|
}>> & Readonly<{
|
|
205
211
|
onClose?: (() => any) | undefined;
|
|
206
|
-
onError?: ((err: unknown, file:
|
|
207
|
-
onDelete?: ((file:
|
|
208
|
-
"onUpdate:modelValue"?: ((value:
|
|
209
|
-
onAfterUpload?: ((file:
|
|
210
|
-
onPreview?: ((file:
|
|
211
|
-
onDownload?: ((file:
|
|
212
|
+
onError?: ((err: unknown, file: UploadRawFile) => any) | undefined;
|
|
213
|
+
onDelete?: ((file: TtUploadFileItem) => any) | undefined;
|
|
214
|
+
"onUpdate:modelValue"?: ((value: TtUploadFileItem[]) => any) | undefined;
|
|
215
|
+
onAfterUpload?: ((file: TtUploadFileItem) => any) | undefined;
|
|
216
|
+
onPreview?: ((file: TtUploadFileItem) => any) | undefined;
|
|
217
|
+
onDownload?: ((file: TtUploadFileItem) => any) | undefined;
|
|
212
218
|
onTemplateDownload?: (() => any) | undefined;
|
|
213
|
-
onOk?: ((fileList:
|
|
219
|
+
onOk?: ((fileList: TtUploadFileItem[]) => any) | undefined;
|
|
214
220
|
}>, {
|
|
215
|
-
getFileList: () =>
|
|
221
|
+
getFileList: () => TtUploadFileItem[];
|
|
216
222
|
openModal: () => void;
|
|
217
223
|
setModalProps: (props: any) => void;
|
|
218
224
|
closeModal: () => void;
|
|
219
|
-
}, {}, {}, {},
|
|
225
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
220
226
|
close: () => any;
|
|
221
|
-
error: (err: unknown, file:
|
|
222
|
-
delete: (file:
|
|
223
|
-
"update:modelValue": (value:
|
|
224
|
-
afterUpload: (file:
|
|
225
|
-
preview: (file:
|
|
226
|
-
download: (file:
|
|
227
|
+
error: (err: unknown, file: UploadRawFile) => any;
|
|
228
|
+
delete: (file: TtUploadFileItem) => any;
|
|
229
|
+
"update:modelValue": (value: TtUploadFileItem[]) => any;
|
|
230
|
+
afterUpload: (file: TtUploadFileItem) => any;
|
|
231
|
+
preview: (file: TtUploadFileItem) => any;
|
|
232
|
+
download: (file: TtUploadFileItem) => any;
|
|
227
233
|
templateDownload: () => any;
|
|
228
|
-
ok: (fileList:
|
|
229
|
-
},
|
|
230
|
-
data:
|
|
234
|
+
ok: (fileList: TtUploadFileItem[]) => any;
|
|
235
|
+
}, PublicProps, {
|
|
236
|
+
data: EpPropMergeType<(new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | ((new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | null)[], unknown, unknown>;
|
|
231
237
|
drag: boolean;
|
|
232
|
-
onProgress: (evt:
|
|
233
|
-
onChange: (uploadFile:
|
|
234
|
-
onError: (error: Error, uploadFile:
|
|
238
|
+
onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
239
|
+
onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
240
|
+
onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
235
241
|
disabled: boolean;
|
|
236
242
|
name: string;
|
|
237
243
|
showPreview: boolean;
|
|
238
244
|
multiple: boolean;
|
|
239
245
|
action: string;
|
|
240
246
|
accept: string;
|
|
241
|
-
beforeUpload: (rawFile:
|
|
247
|
+
beforeUpload: (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
242
248
|
modal: boolean;
|
|
243
249
|
uploadOssApi: (file: File) => Promise<any>;
|
|
244
250
|
uploadOssViewApi: (key: string) => Promise<any>;
|
|
@@ -254,253 +260,253 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
254
260
|
gridColumns: number;
|
|
255
261
|
showCount: boolean;
|
|
256
262
|
ossDir: string;
|
|
257
|
-
beforeDownload: boolean | ((file:
|
|
258
|
-
onRemove: (uploadFile:
|
|
259
|
-
onPreview: (uploadFile:
|
|
260
|
-
onSuccess: (response: any, uploadFile:
|
|
261
|
-
onExceed: (files: File[], uploadFiles:
|
|
263
|
+
beforeDownload: boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>);
|
|
264
|
+
onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
265
|
+
onPreview: (uploadFile: UploadFile) => void;
|
|
266
|
+
onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
267
|
+
onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
262
268
|
method: string;
|
|
263
269
|
withCredentials: boolean;
|
|
264
|
-
fileList:
|
|
265
|
-
autoUpload:
|
|
266
|
-
listType:
|
|
267
|
-
httpRequest:
|
|
270
|
+
fileList: UploadUserFile[];
|
|
271
|
+
autoUpload: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
272
|
+
listType: EpPropMergeType<StringConstructor, "picture" | "text" | "picture-card", unknown>;
|
|
273
|
+
httpRequest: UploadRequestHandler;
|
|
268
274
|
directory: boolean;
|
|
269
|
-
}, true, {}, {},
|
|
275
|
+
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
270
276
|
P: {};
|
|
271
277
|
B: {};
|
|
272
278
|
D: {};
|
|
273
279
|
C: {};
|
|
274
280
|
M: {};
|
|
275
281
|
Defaults: {};
|
|
276
|
-
}, Readonly<
|
|
282
|
+
}, Readonly< ExtractPropTypes<{
|
|
277
283
|
action: {
|
|
278
|
-
readonly type:
|
|
284
|
+
readonly type: PropType<string>;
|
|
279
285
|
readonly default: "";
|
|
280
286
|
};
|
|
281
287
|
accept: {
|
|
282
|
-
readonly type:
|
|
288
|
+
readonly type: PropType<string>;
|
|
283
289
|
readonly default: ".pdf,.xlsx,.xls,.doc,.docx,.jpg,.jpeg,.png";
|
|
284
290
|
};
|
|
285
|
-
beforeUpload:
|
|
286
|
-
(): (rawFile:
|
|
291
|
+
beforeUpload: EpPropFinalized<(new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
292
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
287
293
|
new (): any;
|
|
288
294
|
readonly prototype: any;
|
|
289
|
-
} | ((new (...args: any[]) => (rawFile:
|
|
290
|
-
(): (rawFile:
|
|
295
|
+
} | ((new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
296
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
291
297
|
new (): any;
|
|
292
298
|
readonly prototype: any;
|
|
293
299
|
} | null)[], unknown, unknown, () => void, boolean>;
|
|
294
300
|
multiple: {
|
|
295
|
-
readonly type:
|
|
301
|
+
readonly type: PropType<boolean>;
|
|
296
302
|
readonly default: true;
|
|
297
303
|
};
|
|
298
304
|
drag: {
|
|
299
|
-
readonly type:
|
|
305
|
+
readonly type: PropType<boolean>;
|
|
300
306
|
readonly default: true;
|
|
301
307
|
};
|
|
302
308
|
disabled: {
|
|
303
|
-
readonly type:
|
|
309
|
+
readonly type: PropType<boolean>;
|
|
304
310
|
readonly default: false;
|
|
305
311
|
};
|
|
306
312
|
modal: {
|
|
307
|
-
readonly type:
|
|
313
|
+
readonly type: PropType<boolean>;
|
|
308
314
|
readonly default: true;
|
|
309
315
|
};
|
|
310
316
|
uploadOssApi: {
|
|
311
|
-
readonly type:
|
|
317
|
+
readonly type: PropType<(file: File) => Promise<any>> | undefined | null;
|
|
312
318
|
readonly default: undefined;
|
|
313
319
|
};
|
|
314
320
|
uploadOssViewApi: {
|
|
315
|
-
readonly type:
|
|
321
|
+
readonly type: PropType<(key: string) => Promise<any>>;
|
|
316
322
|
readonly default: undefined;
|
|
317
323
|
};
|
|
318
324
|
uploadTip: {
|
|
319
|
-
readonly type:
|
|
325
|
+
readonly type: PropType<string>;
|
|
320
326
|
readonly default: "可以上传pdf、excel、word、图片格式";
|
|
321
327
|
};
|
|
322
328
|
maxSize: {
|
|
323
|
-
readonly type:
|
|
329
|
+
readonly type: PropType<number>;
|
|
324
330
|
readonly default: undefined;
|
|
325
331
|
};
|
|
326
332
|
showFileList: {
|
|
327
|
-
readonly type:
|
|
333
|
+
readonly type: PropType<boolean>;
|
|
328
334
|
readonly default: true;
|
|
329
335
|
};
|
|
330
336
|
showUploadArea: {
|
|
331
|
-
readonly type:
|
|
337
|
+
readonly type: PropType<boolean>;
|
|
332
338
|
readonly default: true;
|
|
333
339
|
};
|
|
334
340
|
showTemplateDownload: {
|
|
335
|
-
readonly type:
|
|
341
|
+
readonly type: PropType<boolean>;
|
|
336
342
|
readonly default: false;
|
|
337
343
|
};
|
|
338
344
|
templateText: {
|
|
339
|
-
readonly type:
|
|
345
|
+
readonly type: PropType<string>;
|
|
340
346
|
readonly default: "模板下载";
|
|
341
347
|
};
|
|
342
348
|
showPreview: {
|
|
343
|
-
readonly type:
|
|
349
|
+
readonly type: PropType<boolean>;
|
|
344
350
|
readonly default: true;
|
|
345
351
|
};
|
|
346
352
|
showDownload: {
|
|
347
|
-
readonly type:
|
|
353
|
+
readonly type: PropType<boolean>;
|
|
348
354
|
readonly default: true;
|
|
349
355
|
};
|
|
350
356
|
showDelete: {
|
|
351
|
-
readonly type:
|
|
357
|
+
readonly type: PropType<boolean>;
|
|
352
358
|
readonly default: true;
|
|
353
359
|
};
|
|
354
360
|
gridThreshold: {
|
|
355
|
-
readonly type:
|
|
361
|
+
readonly type: PropType<number>;
|
|
356
362
|
readonly default: 4;
|
|
357
363
|
};
|
|
358
364
|
gridColumns: {
|
|
359
|
-
readonly type:
|
|
365
|
+
readonly type: PropType<number>;
|
|
360
366
|
readonly default: 4;
|
|
361
367
|
};
|
|
362
368
|
showCount: {
|
|
363
|
-
readonly type:
|
|
369
|
+
readonly type: PropType<boolean>;
|
|
364
370
|
readonly default: true;
|
|
365
371
|
};
|
|
366
372
|
ossDir: {
|
|
367
|
-
readonly type:
|
|
373
|
+
readonly type: PropType<string>;
|
|
368
374
|
readonly default: undefined;
|
|
369
375
|
};
|
|
370
376
|
beforeDownload: {
|
|
371
|
-
readonly type:
|
|
377
|
+
readonly type: PropType<boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>)>;
|
|
372
378
|
readonly default: false;
|
|
373
379
|
};
|
|
374
380
|
beforeRemove: {
|
|
375
|
-
readonly type:
|
|
381
|
+
readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
|
|
376
382
|
readonly required: false;
|
|
377
383
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
378
384
|
__epPropKey: true;
|
|
379
385
|
};
|
|
380
|
-
onRemove:
|
|
381
|
-
(): (uploadFile:
|
|
386
|
+
onRemove: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
387
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
382
388
|
new (): any;
|
|
383
389
|
readonly prototype: any;
|
|
384
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
385
|
-
(): (uploadFile:
|
|
390
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
391
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
386
392
|
new (): any;
|
|
387
393
|
readonly prototype: any;
|
|
388
394
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
389
|
-
onChange:
|
|
390
|
-
(): (uploadFile:
|
|
395
|
+
onChange: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
396
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
391
397
|
new (): any;
|
|
392
398
|
readonly prototype: any;
|
|
393
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
394
|
-
(): (uploadFile:
|
|
399
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
400
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
395
401
|
new (): any;
|
|
396
402
|
readonly prototype: any;
|
|
397
403
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
398
|
-
onPreview:
|
|
399
|
-
(): (uploadFile:
|
|
404
|
+
onPreview: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
405
|
+
(): (uploadFile: UploadFile) => void;
|
|
400
406
|
new (): any;
|
|
401
407
|
readonly prototype: any;
|
|
402
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
403
|
-
(): (uploadFile:
|
|
408
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
409
|
+
(): (uploadFile: UploadFile) => void;
|
|
404
410
|
new (): any;
|
|
405
411
|
readonly prototype: any;
|
|
406
412
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
407
|
-
onSuccess:
|
|
408
|
-
(): (response: any, uploadFile:
|
|
413
|
+
onSuccess: EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
414
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
409
415
|
new (): any;
|
|
410
416
|
readonly prototype: any;
|
|
411
|
-
} | (((new (...args: any[]) => (response: any, uploadFile:
|
|
412
|
-
(): (response: any, uploadFile:
|
|
417
|
+
} | (((new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
418
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
413
419
|
new (): any;
|
|
414
420
|
readonly prototype: any;
|
|
415
421
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
416
|
-
onProgress:
|
|
417
|
-
(): (evt:
|
|
422
|
+
onProgress: EpPropFinalized<(new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
423
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
418
424
|
new (): any;
|
|
419
425
|
readonly prototype: any;
|
|
420
|
-
} | (((new (...args: any[]) => (evt:
|
|
421
|
-
(): (evt:
|
|
426
|
+
} | (((new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
427
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
422
428
|
new (): any;
|
|
423
429
|
readonly prototype: any;
|
|
424
430
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
425
|
-
onError:
|
|
426
|
-
(): (error: Error, uploadFile:
|
|
431
|
+
onError: EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
432
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
427
433
|
new (): any;
|
|
428
434
|
readonly prototype: any;
|
|
429
|
-
} | (((new (...args: any[]) => (error: Error, uploadFile:
|
|
430
|
-
(): (error: Error, uploadFile:
|
|
435
|
+
} | (((new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
436
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
431
437
|
new (): any;
|
|
432
438
|
readonly prototype: any;
|
|
433
439
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
434
|
-
onExceed:
|
|
435
|
-
(): (files: File[], uploadFiles:
|
|
440
|
+
onExceed: EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
441
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
436
442
|
new (): any;
|
|
437
443
|
readonly prototype: any;
|
|
438
|
-
} | (((new (...args: any[]) => (files: File[], uploadFiles:
|
|
439
|
-
(): (files: File[], uploadFiles:
|
|
444
|
+
} | (((new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
445
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
440
446
|
new (): any;
|
|
441
447
|
readonly prototype: any;
|
|
442
448
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
443
449
|
crossorigin: {
|
|
444
|
-
readonly type:
|
|
450
|
+
readonly type: PropType<EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | (((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials")) | null)[], unknown, unknown>>;
|
|
445
451
|
readonly required: false;
|
|
446
452
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
447
453
|
__epPropKey: true;
|
|
448
454
|
};
|
|
449
455
|
headers: {
|
|
450
|
-
readonly type:
|
|
456
|
+
readonly type: PropType<EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | (((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers)) | null)[], unknown, unknown>>;
|
|
451
457
|
readonly required: false;
|
|
452
458
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
453
459
|
__epPropKey: true;
|
|
454
460
|
};
|
|
455
|
-
method:
|
|
456
|
-
data:
|
|
457
|
-
name:
|
|
461
|
+
method: EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
462
|
+
data: EpPropFinalized<(new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (((new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>))) | null)[], unknown, unknown, () => Mutable<{}>, boolean>;
|
|
463
|
+
name: EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
458
464
|
withCredentials: BooleanConstructor;
|
|
459
|
-
fileList:
|
|
460
|
-
autoUpload:
|
|
461
|
-
listType:
|
|
462
|
-
httpRequest:
|
|
463
|
-
():
|
|
465
|
+
fileList: EpPropFinalized<(new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[]) | (((new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
466
|
+
autoUpload: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
467
|
+
listType: EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
|
|
468
|
+
httpRequest: EpPropFinalized<(new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
469
|
+
(): UploadRequestHandler;
|
|
464
470
|
new (): any;
|
|
465
471
|
readonly prototype: any;
|
|
466
|
-
} | (((new (...args: any[]) =>
|
|
467
|
-
():
|
|
472
|
+
} | (((new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
473
|
+
(): UploadRequestHandler;
|
|
468
474
|
new (): any;
|
|
469
475
|
readonly prototype: any;
|
|
470
|
-
}) | null)[], unknown, unknown,
|
|
476
|
+
}) | null)[], unknown, unknown, UploadRequestHandler, boolean>;
|
|
471
477
|
limit: NumberConstructor;
|
|
472
478
|
directory: BooleanConstructor;
|
|
473
479
|
modelValue: {
|
|
474
|
-
type:
|
|
480
|
+
type: PropType< TtUploadFileItem[]>;
|
|
475
481
|
};
|
|
476
482
|
}>> & Readonly<{
|
|
477
483
|
onClose?: (() => any) | undefined;
|
|
478
|
-
onError?: ((err: unknown, file:
|
|
479
|
-
onDelete?: ((file:
|
|
480
|
-
"onUpdate:modelValue"?: ((value:
|
|
481
|
-
onAfterUpload?: ((file:
|
|
482
|
-
onPreview?: ((file:
|
|
483
|
-
onDownload?: ((file:
|
|
484
|
+
onError?: ((err: unknown, file: UploadRawFile) => any) | undefined;
|
|
485
|
+
onDelete?: ((file: TtUploadFileItem) => any) | undefined;
|
|
486
|
+
"onUpdate:modelValue"?: ((value: TtUploadFileItem[]) => any) | undefined;
|
|
487
|
+
onAfterUpload?: ((file: TtUploadFileItem) => any) | undefined;
|
|
488
|
+
onPreview?: ((file: TtUploadFileItem) => any) | undefined;
|
|
489
|
+
onDownload?: ((file: TtUploadFileItem) => any) | undefined;
|
|
484
490
|
onTemplateDownload?: (() => any) | undefined;
|
|
485
|
-
onOk?: ((fileList:
|
|
491
|
+
onOk?: ((fileList: TtUploadFileItem[]) => any) | undefined;
|
|
486
492
|
}>, {
|
|
487
|
-
getFileList: () =>
|
|
493
|
+
getFileList: () => TtUploadFileItem[];
|
|
488
494
|
openModal: () => void;
|
|
489
495
|
setModalProps: (props: any) => void;
|
|
490
496
|
closeModal: () => void;
|
|
491
497
|
}, {}, {}, {}, {
|
|
492
|
-
data:
|
|
498
|
+
data: EpPropMergeType<(new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | ((new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | null)[], unknown, unknown>;
|
|
493
499
|
drag: boolean;
|
|
494
|
-
onProgress: (evt:
|
|
495
|
-
onChange: (uploadFile:
|
|
496
|
-
onError: (error: Error, uploadFile:
|
|
500
|
+
onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
501
|
+
onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
502
|
+
onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
497
503
|
disabled: boolean;
|
|
498
504
|
name: string;
|
|
499
505
|
showPreview: boolean;
|
|
500
506
|
multiple: boolean;
|
|
501
507
|
action: string;
|
|
502
508
|
accept: string;
|
|
503
|
-
beforeUpload: (rawFile:
|
|
509
|
+
beforeUpload: (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
504
510
|
modal: boolean;
|
|
505
511
|
uploadOssApi: (file: File) => Promise<any>;
|
|
506
512
|
uploadOssViewApi: (key: string) => Promise<any>;
|
|
@@ -516,260 +522,260 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
516
522
|
gridColumns: number;
|
|
517
523
|
showCount: boolean;
|
|
518
524
|
ossDir: string;
|
|
519
|
-
beforeDownload: boolean | ((file:
|
|
520
|
-
onRemove: (uploadFile:
|
|
521
|
-
onPreview: (uploadFile:
|
|
522
|
-
onSuccess: (response: any, uploadFile:
|
|
523
|
-
onExceed: (files: File[], uploadFiles:
|
|
525
|
+
beforeDownload: boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>);
|
|
526
|
+
onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
527
|
+
onPreview: (uploadFile: UploadFile) => void;
|
|
528
|
+
onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
529
|
+
onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
524
530
|
method: string;
|
|
525
531
|
withCredentials: boolean;
|
|
526
|
-
fileList:
|
|
527
|
-
autoUpload:
|
|
528
|
-
listType:
|
|
529
|
-
httpRequest:
|
|
532
|
+
fileList: UploadUserFile[];
|
|
533
|
+
autoUpload: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
534
|
+
listType: EpPropMergeType<StringConstructor, "picture" | "text" | "picture-card", unknown>;
|
|
535
|
+
httpRequest: UploadRequestHandler;
|
|
530
536
|
directory: boolean;
|
|
531
537
|
}>;
|
|
532
538
|
__isFragment?: never;
|
|
533
539
|
__isTeleport?: never;
|
|
534
540
|
__isSuspense?: never;
|
|
535
|
-
} &
|
|
541
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
536
542
|
action: {
|
|
537
|
-
readonly type:
|
|
543
|
+
readonly type: PropType<string>;
|
|
538
544
|
readonly default: "";
|
|
539
545
|
};
|
|
540
546
|
accept: {
|
|
541
|
-
readonly type:
|
|
547
|
+
readonly type: PropType<string>;
|
|
542
548
|
readonly default: ".pdf,.xlsx,.xls,.doc,.docx,.jpg,.jpeg,.png";
|
|
543
549
|
};
|
|
544
|
-
beforeUpload:
|
|
545
|
-
(): (rawFile:
|
|
550
|
+
beforeUpload: EpPropFinalized<(new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
551
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
546
552
|
new (): any;
|
|
547
553
|
readonly prototype: any;
|
|
548
|
-
} | ((new (...args: any[]) => (rawFile:
|
|
549
|
-
(): (rawFile:
|
|
554
|
+
} | ((new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
555
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
550
556
|
new (): any;
|
|
551
557
|
readonly prototype: any;
|
|
552
558
|
} | null)[], unknown, unknown, () => void, boolean>;
|
|
553
559
|
multiple: {
|
|
554
|
-
readonly type:
|
|
560
|
+
readonly type: PropType<boolean>;
|
|
555
561
|
readonly default: true;
|
|
556
562
|
};
|
|
557
563
|
drag: {
|
|
558
|
-
readonly type:
|
|
564
|
+
readonly type: PropType<boolean>;
|
|
559
565
|
readonly default: true;
|
|
560
566
|
};
|
|
561
567
|
disabled: {
|
|
562
|
-
readonly type:
|
|
568
|
+
readonly type: PropType<boolean>;
|
|
563
569
|
readonly default: false;
|
|
564
570
|
};
|
|
565
571
|
modal: {
|
|
566
|
-
readonly type:
|
|
572
|
+
readonly type: PropType<boolean>;
|
|
567
573
|
readonly default: true;
|
|
568
574
|
};
|
|
569
575
|
uploadOssApi: {
|
|
570
|
-
readonly type:
|
|
576
|
+
readonly type: PropType<(file: File) => Promise<any>> | undefined | null;
|
|
571
577
|
readonly default: undefined;
|
|
572
578
|
};
|
|
573
579
|
uploadOssViewApi: {
|
|
574
|
-
readonly type:
|
|
580
|
+
readonly type: PropType<(key: string) => Promise<any>>;
|
|
575
581
|
readonly default: undefined;
|
|
576
582
|
};
|
|
577
583
|
uploadTip: {
|
|
578
|
-
readonly type:
|
|
584
|
+
readonly type: PropType<string>;
|
|
579
585
|
readonly default: "可以上传pdf、excel、word、图片格式";
|
|
580
586
|
};
|
|
581
587
|
maxSize: {
|
|
582
|
-
readonly type:
|
|
588
|
+
readonly type: PropType<number>;
|
|
583
589
|
readonly default: undefined;
|
|
584
590
|
};
|
|
585
591
|
showFileList: {
|
|
586
|
-
readonly type:
|
|
592
|
+
readonly type: PropType<boolean>;
|
|
587
593
|
readonly default: true;
|
|
588
594
|
};
|
|
589
595
|
showUploadArea: {
|
|
590
|
-
readonly type:
|
|
596
|
+
readonly type: PropType<boolean>;
|
|
591
597
|
readonly default: true;
|
|
592
598
|
};
|
|
593
599
|
showTemplateDownload: {
|
|
594
|
-
readonly type:
|
|
600
|
+
readonly type: PropType<boolean>;
|
|
595
601
|
readonly default: false;
|
|
596
602
|
};
|
|
597
603
|
templateText: {
|
|
598
|
-
readonly type:
|
|
604
|
+
readonly type: PropType<string>;
|
|
599
605
|
readonly default: "模板下载";
|
|
600
606
|
};
|
|
601
607
|
showPreview: {
|
|
602
|
-
readonly type:
|
|
608
|
+
readonly type: PropType<boolean>;
|
|
603
609
|
readonly default: true;
|
|
604
610
|
};
|
|
605
611
|
showDownload: {
|
|
606
|
-
readonly type:
|
|
612
|
+
readonly type: PropType<boolean>;
|
|
607
613
|
readonly default: true;
|
|
608
614
|
};
|
|
609
615
|
showDelete: {
|
|
610
|
-
readonly type:
|
|
616
|
+
readonly type: PropType<boolean>;
|
|
611
617
|
readonly default: true;
|
|
612
618
|
};
|
|
613
619
|
gridThreshold: {
|
|
614
|
-
readonly type:
|
|
620
|
+
readonly type: PropType<number>;
|
|
615
621
|
readonly default: 4;
|
|
616
622
|
};
|
|
617
623
|
gridColumns: {
|
|
618
|
-
readonly type:
|
|
624
|
+
readonly type: PropType<number>;
|
|
619
625
|
readonly default: 4;
|
|
620
626
|
};
|
|
621
627
|
showCount: {
|
|
622
|
-
readonly type:
|
|
628
|
+
readonly type: PropType<boolean>;
|
|
623
629
|
readonly default: true;
|
|
624
630
|
};
|
|
625
631
|
ossDir: {
|
|
626
|
-
readonly type:
|
|
632
|
+
readonly type: PropType<string>;
|
|
627
633
|
readonly default: undefined;
|
|
628
634
|
};
|
|
629
635
|
beforeDownload: {
|
|
630
|
-
readonly type:
|
|
636
|
+
readonly type: PropType<boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>)>;
|
|
631
637
|
readonly default: false;
|
|
632
638
|
};
|
|
633
639
|
beforeRemove: {
|
|
634
|
-
readonly type:
|
|
640
|
+
readonly type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
|
|
635
641
|
readonly required: false;
|
|
636
642
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
637
643
|
__epPropKey: true;
|
|
638
644
|
};
|
|
639
|
-
onRemove:
|
|
640
|
-
(): (uploadFile:
|
|
645
|
+
onRemove: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
646
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
641
647
|
new (): any;
|
|
642
648
|
readonly prototype: any;
|
|
643
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
644
|
-
(): (uploadFile:
|
|
649
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
650
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
645
651
|
new (): any;
|
|
646
652
|
readonly prototype: any;
|
|
647
653
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
648
|
-
onChange:
|
|
649
|
-
(): (uploadFile:
|
|
654
|
+
onChange: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
655
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
650
656
|
new (): any;
|
|
651
657
|
readonly prototype: any;
|
|
652
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
653
|
-
(): (uploadFile:
|
|
658
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
659
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
654
660
|
new (): any;
|
|
655
661
|
readonly prototype: any;
|
|
656
662
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
657
|
-
onPreview:
|
|
658
|
-
(): (uploadFile:
|
|
663
|
+
onPreview: EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
664
|
+
(): (uploadFile: UploadFile) => void;
|
|
659
665
|
new (): any;
|
|
660
666
|
readonly prototype: any;
|
|
661
|
-
} | (((new (...args: any[]) => (uploadFile:
|
|
662
|
-
(): (uploadFile:
|
|
667
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
668
|
+
(): (uploadFile: UploadFile) => void;
|
|
663
669
|
new (): any;
|
|
664
670
|
readonly prototype: any;
|
|
665
671
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
666
|
-
onSuccess:
|
|
667
|
-
(): (response: any, uploadFile:
|
|
672
|
+
onSuccess: EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
673
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
668
674
|
new (): any;
|
|
669
675
|
readonly prototype: any;
|
|
670
|
-
} | (((new (...args: any[]) => (response: any, uploadFile:
|
|
671
|
-
(): (response: any, uploadFile:
|
|
676
|
+
} | (((new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
677
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
672
678
|
new (): any;
|
|
673
679
|
readonly prototype: any;
|
|
674
680
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
675
|
-
onProgress:
|
|
676
|
-
(): (evt:
|
|
681
|
+
onProgress: EpPropFinalized<(new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
682
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
677
683
|
new (): any;
|
|
678
684
|
readonly prototype: any;
|
|
679
|
-
} | (((new (...args: any[]) => (evt:
|
|
680
|
-
(): (evt:
|
|
685
|
+
} | (((new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
686
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
681
687
|
new (): any;
|
|
682
688
|
readonly prototype: any;
|
|
683
689
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
684
|
-
onError:
|
|
685
|
-
(): (error: Error, uploadFile:
|
|
690
|
+
onError: EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
691
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
686
692
|
new (): any;
|
|
687
693
|
readonly prototype: any;
|
|
688
|
-
} | (((new (...args: any[]) => (error: Error, uploadFile:
|
|
689
|
-
(): (error: Error, uploadFile:
|
|
694
|
+
} | (((new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
695
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
690
696
|
new (): any;
|
|
691
697
|
readonly prototype: any;
|
|
692
698
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
693
|
-
onExceed:
|
|
694
|
-
(): (files: File[], uploadFiles:
|
|
699
|
+
onExceed: EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
700
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
695
701
|
new (): any;
|
|
696
702
|
readonly prototype: any;
|
|
697
|
-
} | (((new (...args: any[]) => (files: File[], uploadFiles:
|
|
698
|
-
(): (files: File[], uploadFiles:
|
|
703
|
+
} | (((new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
704
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
699
705
|
new (): any;
|
|
700
706
|
readonly prototype: any;
|
|
701
707
|
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
702
708
|
crossorigin: {
|
|
703
|
-
readonly type:
|
|
709
|
+
readonly type: PropType<EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | (((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials")) | null)[], unknown, unknown>>;
|
|
704
710
|
readonly required: false;
|
|
705
711
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
706
712
|
__epPropKey: true;
|
|
707
713
|
};
|
|
708
714
|
headers: {
|
|
709
|
-
readonly type:
|
|
715
|
+
readonly type: PropType<EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | (((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers)) | null)[], unknown, unknown>>;
|
|
710
716
|
readonly required: false;
|
|
711
717
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
712
718
|
__epPropKey: true;
|
|
713
719
|
};
|
|
714
|
-
method:
|
|
715
|
-
data:
|
|
716
|
-
name:
|
|
720
|
+
method: EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
721
|
+
data: EpPropFinalized<(new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (((new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>))) | null)[], unknown, unknown, () => Mutable<{}>, boolean>;
|
|
722
|
+
name: EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
717
723
|
withCredentials: BooleanConstructor;
|
|
718
|
-
fileList:
|
|
719
|
-
autoUpload:
|
|
720
|
-
listType:
|
|
721
|
-
httpRequest:
|
|
722
|
-
():
|
|
724
|
+
fileList: EpPropFinalized<(new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[]) | (((new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
725
|
+
autoUpload: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
726
|
+
listType: EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
|
|
727
|
+
httpRequest: EpPropFinalized<(new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
728
|
+
(): UploadRequestHandler;
|
|
723
729
|
new (): any;
|
|
724
730
|
readonly prototype: any;
|
|
725
|
-
} | (((new (...args: any[]) =>
|
|
726
|
-
():
|
|
731
|
+
} | (((new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
732
|
+
(): UploadRequestHandler;
|
|
727
733
|
new (): any;
|
|
728
734
|
readonly prototype: any;
|
|
729
|
-
}) | null)[], unknown, unknown,
|
|
735
|
+
}) | null)[], unknown, unknown, UploadRequestHandler, boolean>;
|
|
730
736
|
limit: NumberConstructor;
|
|
731
737
|
directory: BooleanConstructor;
|
|
732
738
|
modelValue: {
|
|
733
|
-
type:
|
|
739
|
+
type: PropType< TtUploadFileItem[]>;
|
|
734
740
|
};
|
|
735
741
|
}>> & Readonly<{
|
|
736
742
|
onClose?: (() => any) | undefined;
|
|
737
|
-
onError?: ((err: unknown, file:
|
|
738
|
-
onDelete?: ((file:
|
|
739
|
-
"onUpdate:modelValue"?: ((value:
|
|
740
|
-
onAfterUpload?: ((file:
|
|
741
|
-
onPreview?: ((file:
|
|
742
|
-
onDownload?: ((file:
|
|
743
|
+
onError?: ((err: unknown, file: UploadRawFile) => any) | undefined;
|
|
744
|
+
onDelete?: ((file: TtUploadFileItem) => any) | undefined;
|
|
745
|
+
"onUpdate:modelValue"?: ((value: TtUploadFileItem[]) => any) | undefined;
|
|
746
|
+
onAfterUpload?: ((file: TtUploadFileItem) => any) | undefined;
|
|
747
|
+
onPreview?: ((file: TtUploadFileItem) => any) | undefined;
|
|
748
|
+
onDownload?: ((file: TtUploadFileItem) => any) | undefined;
|
|
743
749
|
onTemplateDownload?: (() => any) | undefined;
|
|
744
|
-
onOk?: ((fileList:
|
|
750
|
+
onOk?: ((fileList: TtUploadFileItem[]) => any) | undefined;
|
|
745
751
|
}>, {
|
|
746
|
-
getFileList: () =>
|
|
752
|
+
getFileList: () => TtUploadFileItem[];
|
|
747
753
|
openModal: () => void;
|
|
748
754
|
setModalProps: (props: any) => void;
|
|
749
755
|
closeModal: () => void;
|
|
750
|
-
}, {}, {}, {},
|
|
756
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
751
757
|
close: () => any;
|
|
752
|
-
error: (err: unknown, file:
|
|
753
|
-
delete: (file:
|
|
754
|
-
"update:modelValue": (value:
|
|
755
|
-
afterUpload: (file:
|
|
756
|
-
preview: (file:
|
|
757
|
-
download: (file:
|
|
758
|
+
error: (err: unknown, file: UploadRawFile) => any;
|
|
759
|
+
delete: (file: TtUploadFileItem) => any;
|
|
760
|
+
"update:modelValue": (value: TtUploadFileItem[]) => any;
|
|
761
|
+
afterUpload: (file: TtUploadFileItem) => any;
|
|
762
|
+
preview: (file: TtUploadFileItem) => any;
|
|
763
|
+
download: (file: TtUploadFileItem) => any;
|
|
758
764
|
templateDownload: () => any;
|
|
759
|
-
ok: (fileList:
|
|
765
|
+
ok: (fileList: TtUploadFileItem[]) => any;
|
|
760
766
|
}, string, {
|
|
761
|
-
data:
|
|
767
|
+
data: EpPropMergeType<(new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | ((new (...args: any[]) => Mutable<Record<string, any>> | Promise< Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | null)[], unknown, unknown>;
|
|
762
768
|
drag: boolean;
|
|
763
|
-
onProgress: (evt:
|
|
764
|
-
onChange: (uploadFile:
|
|
765
|
-
onError: (error: Error, uploadFile:
|
|
769
|
+
onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
770
|
+
onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
771
|
+
onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
766
772
|
disabled: boolean;
|
|
767
773
|
name: string;
|
|
768
774
|
showPreview: boolean;
|
|
769
775
|
multiple: boolean;
|
|
770
776
|
action: string;
|
|
771
777
|
accept: string;
|
|
772
|
-
beforeUpload: (rawFile:
|
|
778
|
+
beforeUpload: (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
773
779
|
modal: boolean;
|
|
774
780
|
uploadOssApi: (file: File) => Promise<any>;
|
|
775
781
|
uploadOssViewApi: (key: string) => Promise<any>;
|
|
@@ -785,43 +791,43 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<{
|
|
|
785
791
|
gridColumns: number;
|
|
786
792
|
showCount: boolean;
|
|
787
793
|
ossDir: string;
|
|
788
|
-
beforeDownload: boolean | ((file:
|
|
789
|
-
onRemove: (uploadFile:
|
|
790
|
-
onPreview: (uploadFile:
|
|
791
|
-
onSuccess: (response: any, uploadFile:
|
|
792
|
-
onExceed: (files: File[], uploadFiles:
|
|
794
|
+
beforeDownload: boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>);
|
|
795
|
+
onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
796
|
+
onPreview: (uploadFile: UploadFile) => void;
|
|
797
|
+
onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
798
|
+
onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
793
799
|
method: string;
|
|
794
800
|
withCredentials: boolean;
|
|
795
|
-
fileList:
|
|
796
|
-
autoUpload:
|
|
797
|
-
listType:
|
|
798
|
-
httpRequest:
|
|
801
|
+
fileList: UploadUserFile[];
|
|
802
|
+
autoUpload: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
803
|
+
listType: EpPropMergeType<StringConstructor, "picture" | "text" | "picture-card", unknown>;
|
|
804
|
+
httpRequest: UploadRequestHandler;
|
|
799
805
|
directory: boolean;
|
|
800
|
-
}, {}, string, {},
|
|
806
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
801
807
|
$slots: Readonly<{
|
|
802
|
-
uploadContent?: () =>
|
|
803
|
-
uploadTip?: () =>
|
|
808
|
+
uploadContent?: () => VNode[];
|
|
809
|
+
uploadTip?: () => VNode[];
|
|
804
810
|
fileItem?: (props: {
|
|
805
|
-
file:
|
|
811
|
+
file: TtUploadFileItem;
|
|
806
812
|
index: number;
|
|
807
|
-
}) =>
|
|
813
|
+
}) => VNode[];
|
|
808
814
|
fileActions?: (props: {
|
|
809
|
-
file:
|
|
815
|
+
file: TtUploadFileItem;
|
|
810
816
|
index: number;
|
|
811
|
-
}) =>
|
|
812
|
-
footer?: () =>
|
|
817
|
+
}) => VNode[];
|
|
818
|
+
footer?: () => VNode[];
|
|
813
819
|
}> & {
|
|
814
|
-
uploadContent?: () =>
|
|
815
|
-
uploadTip?: () =>
|
|
820
|
+
uploadContent?: () => VNode[];
|
|
821
|
+
uploadTip?: () => VNode[];
|
|
816
822
|
fileItem?: (props: {
|
|
817
|
-
file:
|
|
823
|
+
file: TtUploadFileItem;
|
|
818
824
|
index: number;
|
|
819
|
-
}) =>
|
|
825
|
+
}) => VNode[];
|
|
820
826
|
fileActions?: (props: {
|
|
821
|
-
file:
|
|
827
|
+
file: TtUploadFileItem;
|
|
822
828
|
index: number;
|
|
823
|
-
}) =>
|
|
824
|
-
footer?: () =>
|
|
829
|
+
}) => VNode[];
|
|
830
|
+
footer?: () => VNode[];
|
|
825
831
|
};
|
|
826
832
|
})> & Record<string, any>;
|
|
827
833
|
export type TtUploadInstance = InstanceType<typeof TtUploadConstructor> & TtUploadExposed;
|