UNPKG

6.89 kBTypeScriptView Raw
1import { type PropType, type ExtractPropTypes } from 'vue';
2import { Interceptor, type Numeric } from '../utils';
3import { type ImagePreviewOptions } from '../image-preview';
4import type { UploaderMaxSize, UploaderAfterRead, UploaderBeforeRead, UploaderResultType, UploaderFileListItem } from './types';
5export declare const uploaderProps: {
6 name: {
7 type: (NumberConstructor | StringConstructor)[];
8 default: string;
9 };
10 accept: {
11 type: PropType<string>;
12 default: string;
13 };
14 capture: StringConstructor;
15 multiple: BooleanConstructor;
16 disabled: BooleanConstructor;
17 readonly: BooleanConstructor;
18 lazyLoad: BooleanConstructor;
19 maxCount: {
20 type: (NumberConstructor | StringConstructor)[];
21 default: number;
22 };
23 imageFit: {
24 type: PropType<import("csstype").Property.ObjectFit | undefined>;
25 default: import("csstype").Property.ObjectFit | undefined;
26 };
27 resultType: {
28 type: PropType<UploaderResultType>;
29 default: UploaderResultType;
30 };
31 uploadIcon: {
32 type: PropType<string>;
33 default: string;
34 };
35 uploadText: StringConstructor;
36 deletable: {
37 type: BooleanConstructor;
38 default: true;
39 };
40 reupload: BooleanConstructor;
41 afterRead: PropType<UploaderAfterRead>;
42 showUpload: {
43 type: BooleanConstructor;
44 default: true;
45 };
46 modelValue: {
47 type: PropType<UploaderFileListItem[]>;
48 default: () => never[];
49 };
50 beforeRead: PropType<UploaderBeforeRead>;
51 beforeDelete: PropType<Interceptor>;
52 previewSize: PropType<Numeric | [Numeric, Numeric]>;
53 previewImage: {
54 type: BooleanConstructor;
55 default: true;
56 };
57 previewOptions: PropType<Partial<ImagePreviewOptions>>;
58 previewFullImage: {
59 type: BooleanConstructor;
60 default: true;
61 };
62 maxSize: {
63 type: PropType<UploaderMaxSize>;
64 default: number;
65 };
66};
67export type UploaderProps = ExtractPropTypes<typeof uploaderProps>;
68declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
69 name: {
70 type: (NumberConstructor | StringConstructor)[];
71 default: string;
72 };
73 accept: {
74 type: PropType<string>;
75 default: string;
76 };
77 capture: StringConstructor;
78 multiple: BooleanConstructor;
79 disabled: BooleanConstructor;
80 readonly: BooleanConstructor;
81 lazyLoad: BooleanConstructor;
82 maxCount: {
83 type: (NumberConstructor | StringConstructor)[];
84 default: number;
85 };
86 imageFit: {
87 type: PropType<import("csstype").Property.ObjectFit | undefined>;
88 default: import("csstype").Property.ObjectFit | undefined;
89 };
90 resultType: {
91 type: PropType<UploaderResultType>;
92 default: UploaderResultType;
93 };
94 uploadIcon: {
95 type: PropType<string>;
96 default: string;
97 };
98 uploadText: StringConstructor;
99 deletable: {
100 type: BooleanConstructor;
101 default: true;
102 };
103 reupload: BooleanConstructor;
104 afterRead: PropType<UploaderAfterRead>;
105 showUpload: {
106 type: BooleanConstructor;
107 default: true;
108 };
109 modelValue: {
110 type: PropType<UploaderFileListItem[]>;
111 default: () => never[];
112 };
113 beforeRead: PropType<UploaderBeforeRead>;
114 beforeDelete: PropType<Interceptor>;
115 previewSize: PropType<Numeric | [Numeric, Numeric]>;
116 previewImage: {
117 type: BooleanConstructor;
118 default: true;
119 };
120 previewOptions: PropType<Partial<ImagePreviewOptions>>;
121 previewFullImage: {
122 type: BooleanConstructor;
123 default: true;
124 };
125 maxSize: {
126 type: PropType<UploaderMaxSize>;
127 default: number;
128 };
129}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "update:modelValue" | "oversize" | "clickUpload" | "closePreview" | "clickPreview" | "clickReupload")[], "delete" | "update:modelValue" | "oversize" | "clickUpload" | "closePreview" | "clickPreview" | "clickReupload", import("vue").PublicProps, Readonly<ExtractPropTypes<{
130 name: {
131 type: (NumberConstructor | StringConstructor)[];
132 default: string;
133 };
134 accept: {
135 type: PropType<string>;
136 default: string;
137 };
138 capture: StringConstructor;
139 multiple: BooleanConstructor;
140 disabled: BooleanConstructor;
141 readonly: BooleanConstructor;
142 lazyLoad: BooleanConstructor;
143 maxCount: {
144 type: (NumberConstructor | StringConstructor)[];
145 default: number;
146 };
147 imageFit: {
148 type: PropType<import("csstype").Property.ObjectFit | undefined>;
149 default: import("csstype").Property.ObjectFit | undefined;
150 };
151 resultType: {
152 type: PropType<UploaderResultType>;
153 default: UploaderResultType;
154 };
155 uploadIcon: {
156 type: PropType<string>;
157 default: string;
158 };
159 uploadText: StringConstructor;
160 deletable: {
161 type: BooleanConstructor;
162 default: true;
163 };
164 reupload: BooleanConstructor;
165 afterRead: PropType<UploaderAfterRead>;
166 showUpload: {
167 type: BooleanConstructor;
168 default: true;
169 };
170 modelValue: {
171 type: PropType<UploaderFileListItem[]>;
172 default: () => never[];
173 };
174 beforeRead: PropType<UploaderBeforeRead>;
175 beforeDelete: PropType<Interceptor>;
176 previewSize: PropType<Numeric | [Numeric, Numeric]>;
177 previewImage: {
178 type: BooleanConstructor;
179 default: true;
180 };
181 previewOptions: PropType<Partial<ImagePreviewOptions>>;
182 previewFullImage: {
183 type: BooleanConstructor;
184 default: true;
185 };
186 maxSize: {
187 type: PropType<UploaderMaxSize>;
188 default: number;
189 };
190}>> & Readonly<{
191 "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
192 onDelete?: ((...args: any[]) => any) | undefined;
193 onOversize?: ((...args: any[]) => any) | undefined;
194 onClickUpload?: ((...args: any[]) => any) | undefined;
195 onClosePreview?: ((...args: any[]) => any) | undefined;
196 onClickPreview?: ((...args: any[]) => any) | undefined;
197 onClickReupload?: ((...args: any[]) => any) | undefined;
198}>, {
199 name: string | number;
200 accept: string;
201 disabled: boolean;
202 multiple: boolean;
203 modelValue: UploaderFileListItem[];
204 readonly: boolean;
205 lazyLoad: boolean;
206 maxCount: string | number;
207 imageFit: import("csstype").Property.ObjectFit | undefined;
208 resultType: UploaderResultType;
209 uploadIcon: string;
210 deletable: boolean;
211 reupload: boolean;
212 showUpload: boolean;
213 previewImage: boolean;
214 previewFullImage: boolean;
215 maxSize: UploaderMaxSize;
216}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
217export default _default;
218
\No newline at end of file