tdesign-mobile-vue
Version:
tdesign-mobile-vue
511 lines (510 loc) • 20.9 kB
TypeScript
import { UploadFile } from './type';
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
accept: {
type: StringConstructor;
default: string;
};
action: {
type: StringConstructor;
default: string;
};
addBtn: {
type: BooleanConstructor;
default: boolean;
};
addContent: {
type: import("vue").PropType<string | ((h: typeof import("vue").h) => import("@/common").SlotReturnValue)>;
};
allowUploadDuplicateFile: BooleanConstructor;
autoUpload: {
type: BooleanConstructor;
default: boolean;
};
beforeAllFilesUpload: {
type: import("vue").PropType<(file: UploadFile[]) => boolean | Promise<boolean>>;
};
beforeUpload: {
type: import("vue").PropType<(file: UploadFile) => boolean | Promise<boolean>>;
};
capture: {
type: import("vue").PropType<string | boolean>;
};
data: {
type: import("vue").PropType<Record<string, any> | ((files: UploadFile[]) => Record<string, any>)>;
};
disabled: {
type: BooleanConstructor;
default: any;
};
fileListDisplay: {
type: import("vue").PropType<(h: typeof import("vue").h, props: {
files: UploadFile[];
dragEvents?: import("@/common").UploadDisplayDragEvents;
}) => import("@/common").SlotReturnValue>;
};
files: {
type: import("vue").PropType<UploadFile[]>;
default: UploadFile[];
};
defaultFiles: {
type: import("vue").PropType<UploadFile[]>;
default: () => UploadFile[];
};
format: {
type: import("vue").PropType<(file: File) => UploadFile>;
};
formatRequest: {
type: import("vue").PropType<(requestData: {
[key: string]: any;
}) => {
[key: string]: any;
}>;
};
formatResponse: {
type: import("vue").PropType<(response: any, context: import("@/components").FormatResponseContext) => import("@/components").ResponseType>;
};
headers: {
type: import("vue").PropType<{
[key: string]: string;
}>;
};
imageProps: {
type: import("vue").PropType<import("@/components").TdImageProps>;
};
isBatchUpload: BooleanConstructor;
max: {
type: NumberConstructor;
default: number;
};
method: {
type: import("vue").PropType<"GET" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "get" | "options" | "patch" | "post" | "put">;
default: "GET" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "get" | "options" | "patch" | "post" | "put";
validator(val: "GET" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "get" | "options" | "patch" | "post" | "put"): boolean;
};
mockProgressDuration: {
type: NumberConstructor;
};
multiple: BooleanConstructor;
name: {
type: StringConstructor;
default: string;
};
preview: {
type: BooleanConstructor;
default: boolean;
};
removeBtn: {
type: BooleanConstructor;
default: boolean;
};
requestMethod: {
type: import("vue").PropType<(files: UploadFile[] | UploadFile) => Promise<import("@/components").RequestMethodResponse>>;
};
sizeLimit: {
type: import("vue").PropType<number | import("@/components").SizeLimitObj>;
};
useMockProgress: {
type: BooleanConstructor;
default: boolean;
};
uploadAllFilesInOneRequest: BooleanConstructor;
value: {
type: import("vue").PropType<UploadFile[]>;
default: UploadFile[];
};
modelValue: {
type: import("vue").PropType<UploadFile[]>;
default: UploadFile[];
};
defaultValue: {
type: import("vue").PropType<UploadFile[]>;
default: () => UploadFile[];
};
withCredentials: BooleanConstructor;
onCancelUpload: import("vue").PropType<() => void>;
onChange: import("vue").PropType<(value: UploadFile[], context: import("@/components").UploadChangeContext) => void>;
onClickUpload: import("vue").PropType<(context: {
e: MouseEvent;
}) => void>;
onFail: import("vue").PropType<(options: import("@/components").UploadFailContext) => void>;
onOneFileFail: import("vue").PropType<(options: import("@/components").UploadFailContext) => void>;
onOneFileSuccess: import("vue").PropType<(context: Pick<import("@/components").SuccessContext, "XMLHttpRequest" | "e" | "file" | "response">) => void>;
onPreview: import("vue").PropType<(options: {
file: UploadFile;
index: number;
e: MouseEvent;
}) => void>;
onProgress: import("vue").PropType<(options: import("@/components").ProgressContext) => void>;
onRemove: import("vue").PropType<(context: import("@/components").UploadRemoveContext) => void>;
onSelectChange: import("vue").PropType<(files: File[], context: import("@/components").UploadSelectChangeContext) => void>;
onSuccess: import("vue").PropType<(context: import("@/components").SuccessContext) => void>;
onValidate: import("vue").PropType<(context: {
type: import("@/components").UploadValidateType;
files: UploadFile[];
}) => void>;
onWaitingUploadFilesChange: import("vue").PropType<(context: {
files: UploadFile[];
trigger: "remove" | "uploaded" | "validate";
}) => void>;
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "click-upload" | "fail" | "preview" | "progress" | "remove" | "select-change" | "success" | "update:files" | "update:modelValue" | "validate")[], "change" | "click-upload" | "fail" | "preview" | "progress" | "remove" | "select-change" | "success" | "update:files" | "update:modelValue" | "validate", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
accept: {
type: StringConstructor;
default: string;
};
action: {
type: StringConstructor;
default: string;
};
addBtn: {
type: BooleanConstructor;
default: boolean;
};
addContent: {
type: import("vue").PropType<string | ((h: typeof import("vue").h) => import("@/common").SlotReturnValue)>;
};
allowUploadDuplicateFile: BooleanConstructor;
autoUpload: {
type: BooleanConstructor;
default: boolean;
};
beforeAllFilesUpload: {
type: import("vue").PropType<(file: UploadFile[]) => boolean | Promise<boolean>>;
};
beforeUpload: {
type: import("vue").PropType<(file: UploadFile) => boolean | Promise<boolean>>;
};
capture: {
type: import("vue").PropType<string | boolean>;
};
data: {
type: import("vue").PropType<Record<string, any> | ((files: UploadFile[]) => Record<string, any>)>;
};
disabled: {
type: BooleanConstructor;
default: any;
};
fileListDisplay: {
type: import("vue").PropType<(h: typeof import("vue").h, props: {
files: UploadFile[];
dragEvents?: import("@/common").UploadDisplayDragEvents;
}) => import("@/common").SlotReturnValue>;
};
files: {
type: import("vue").PropType<UploadFile[]>;
default: UploadFile[];
};
defaultFiles: {
type: import("vue").PropType<UploadFile[]>;
default: () => UploadFile[];
};
format: {
type: import("vue").PropType<(file: File) => UploadFile>;
};
formatRequest: {
type: import("vue").PropType<(requestData: {
[key: string]: any;
}) => {
[key: string]: any;
}>;
};
formatResponse: {
type: import("vue").PropType<(response: any, context: import("@/components").FormatResponseContext) => import("@/components").ResponseType>;
};
headers: {
type: import("vue").PropType<{
[key: string]: string;
}>;
};
imageProps: {
type: import("vue").PropType<import("@/components").TdImageProps>;
};
isBatchUpload: BooleanConstructor;
max: {
type: NumberConstructor;
default: number;
};
method: {
type: import("vue").PropType<"GET" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "get" | "options" | "patch" | "post" | "put">;
default: "GET" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "get" | "options" | "patch" | "post" | "put";
validator(val: "GET" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "get" | "options" | "patch" | "post" | "put"): boolean;
};
mockProgressDuration: {
type: NumberConstructor;
};
multiple: BooleanConstructor;
name: {
type: StringConstructor;
default: string;
};
preview: {
type: BooleanConstructor;
default: boolean;
};
removeBtn: {
type: BooleanConstructor;
default: boolean;
};
requestMethod: {
type: import("vue").PropType<(files: UploadFile[] | UploadFile) => Promise<import("@/components").RequestMethodResponse>>;
};
sizeLimit: {
type: import("vue").PropType<number | import("@/components").SizeLimitObj>;
};
useMockProgress: {
type: BooleanConstructor;
default: boolean;
};
uploadAllFilesInOneRequest: BooleanConstructor;
value: {
type: import("vue").PropType<UploadFile[]>;
default: UploadFile[];
};
modelValue: {
type: import("vue").PropType<UploadFile[]>;
default: UploadFile[];
};
defaultValue: {
type: import("vue").PropType<UploadFile[]>;
default: () => UploadFile[];
};
withCredentials: BooleanConstructor;
onCancelUpload: import("vue").PropType<() => void>;
onChange: import("vue").PropType<(value: UploadFile[], context: import("@/components").UploadChangeContext) => void>;
onClickUpload: import("vue").PropType<(context: {
e: MouseEvent;
}) => void>;
onFail: import("vue").PropType<(options: import("@/components").UploadFailContext) => void>;
onOneFileFail: import("vue").PropType<(options: import("@/components").UploadFailContext) => void>;
onOneFileSuccess: import("vue").PropType<(context: Pick<import("@/components").SuccessContext, "XMLHttpRequest" | "e" | "file" | "response">) => void>;
onPreview: import("vue").PropType<(options: {
file: UploadFile;
index: number;
e: MouseEvent;
}) => void>;
onProgress: import("vue").PropType<(options: import("@/components").ProgressContext) => void>;
onRemove: import("vue").PropType<(context: import("@/components").UploadRemoveContext) => void>;
onSelectChange: import("vue").PropType<(files: File[], context: import("@/components").UploadSelectChangeContext) => void>;
onSuccess: import("vue").PropType<(context: import("@/components").SuccessContext) => void>;
onValidate: import("vue").PropType<(context: {
type: import("@/components").UploadValidateType;
files: UploadFile[];
}) => void>;
onWaitingUploadFilesChange: import("vue").PropType<(context: {
files: UploadFile[];
trigger: "remove" | "uploaded" | "validate";
}) => void>;
}>> & Readonly<{
onChange?: (...args: any[]) => any;
"onClick-upload"?: (...args: any[]) => any;
onFail?: (...args: any[]) => any;
onPreview?: (...args: any[]) => any;
onProgress?: (...args: any[]) => any;
onRemove?: (...args: any[]) => any;
"onSelect-change"?: (...args: any[]) => any;
onSuccess?: (...args: any[]) => any;
"onUpdate:files"?: (...args: any[]) => any;
"onUpdate:modelValue"?: (...args: any[]) => any;
onValidate?: (...args: any[]) => any;
}>, {
accept: string;
action: string;
addBtn: boolean;
allowUploadDuplicateFile: boolean;
autoUpload: boolean;
disabled: boolean;
files: UploadFile[];
defaultFiles: UploadFile[];
isBatchUpload: boolean;
max: number;
method: "GET" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "get" | "options" | "patch" | "post" | "put";
multiple: boolean;
name: string;
preview: boolean;
removeBtn: boolean;
useMockProgress: boolean;
uploadAllFilesInOneRequest: boolean;
value: UploadFile[];
modelValue: UploadFile[];
defaultValue: UploadFile[];
withCredentials: boolean;
}, {}, {
TImage: {
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
alt: {
type: StringConstructor;
default: string;
};
error: {
type: import("vue").PropType<string | ((h: typeof import("vue").h) => import("@/common").SlotReturnValue)>;
};
fallback: {
type: StringConstructor;
default: string;
};
fit: {
type: import("vue").PropType<"contain" | "cover" | "fill" | "none" | "scale-down">;
default: "contain" | "cover" | "fill" | "none" | "scale-down";
validator(val: "contain" | "cover" | "fill" | "none" | "scale-down"): boolean;
};
lazy: BooleanConstructor;
loading: {
type: import("vue").PropType<string | ((h: typeof import("vue").h) => import("@/common").SlotReturnValue)>;
};
position: {
type: StringConstructor;
default: string;
};
referrerpolicy: {
type: import("vue").PropType<"no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
validator(val: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url"): boolean;
};
shape: {
type: import("vue").PropType<"circle" | "round" | "square">;
default: "circle" | "round" | "square";
validator(val: "circle" | "round" | "square"): boolean;
};
src: {
type: StringConstructor;
default: string;
};
srcset: {
type: import("vue").PropType<import("@/components").ImageSrcset>;
};
onError: import("vue").PropType<(context: {
e: Event;
}) => void>;
onLoad: import("vue").PropType<(context: {
e: Event;
}) => void>;
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
alt: string;
fallback: string;
fit: "contain" | "cover" | "fill" | "none" | "scale-down";
lazy: boolean;
position: string;
shape: "circle" | "round" | "square";
src: string;
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly<import("vue").ExtractPropTypes<{
alt: {
type: StringConstructor;
default: string;
};
error: {
type: import("vue").PropType<string | ((h: typeof import("vue").h) => import("@/common").SlotReturnValue)>;
};
fallback: {
type: StringConstructor;
default: string;
};
fit: {
type: import("vue").PropType<"contain" | "cover" | "fill" | "none" | "scale-down">;
default: "contain" | "cover" | "fill" | "none" | "scale-down";
validator(val: "contain" | "cover" | "fill" | "none" | "scale-down"): boolean;
};
lazy: BooleanConstructor;
loading: {
type: import("vue").PropType<string | ((h: typeof import("vue").h) => import("@/common").SlotReturnValue)>;
};
position: {
type: StringConstructor;
default: string;
};
referrerpolicy: {
type: import("vue").PropType<"no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
validator(val: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url"): boolean;
};
shape: {
type: import("vue").PropType<"circle" | "round" | "square">;
default: "circle" | "round" | "square";
validator(val: "circle" | "round" | "square"): boolean;
};
src: {
type: StringConstructor;
default: string;
};
srcset: {
type: import("vue").PropType<import("@/components").ImageSrcset>;
};
onError: import("vue").PropType<(context: {
e: Event;
}) => void>;
onLoad: import("vue").PropType<(context: {
e: Event;
}) => void>;
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
alt: string;
fallback: string;
fit: "contain" | "cover" | "fill" | "none" | "scale-down";
lazy: boolean;
position: string;
shape: "circle" | "round" | "square";
src: string;
}>;
__isFragment?: never;
__isTeleport?: never;
__isSuspense?: never;
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
alt: {
type: StringConstructor;
default: string;
};
error: {
type: import("vue").PropType<string | ((h: typeof import("vue").h) => import("@/common").SlotReturnValue)>;
};
fallback: {
type: StringConstructor;
default: string;
};
fit: {
type: import("vue").PropType<"contain" | "cover" | "fill" | "none" | "scale-down">;
default: "contain" | "cover" | "fill" | "none" | "scale-down";
validator(val: "contain" | "cover" | "fill" | "none" | "scale-down"): boolean;
};
lazy: BooleanConstructor;
loading: {
type: import("vue").PropType<string | ((h: typeof import("vue").h) => import("@/common").SlotReturnValue)>;
};
position: {
type: StringConstructor;
default: string;
};
referrerpolicy: {
type: import("vue").PropType<"no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
validator(val: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url"): boolean;
};
shape: {
type: import("vue").PropType<"circle" | "round" | "square">;
default: "circle" | "round" | "square";
validator(val: "circle" | "round" | "square"): boolean;
};
src: {
type: StringConstructor;
default: string;
};
srcset: {
type: import("vue").PropType<import("@/components").ImageSrcset>;
};
onError: import("vue").PropType<(context: {
e: Event;
}) => void>;
onLoad: import("vue").PropType<(context: {
e: Event;
}) => void>;
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
alt: string;
fallback: string;
fit: "contain" | "cover" | "fill" | "none" | "scale-down";
lazy: boolean;
position: string;
shape: "circle" | "round" | "square";
src: string;
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;