tdesign-mobile-vue
Version:
tdesign-mobile-vue
144 lines (143 loc) • 4.65 kB
TypeScript
import { TdUploadProps, UploadFile } from './type';
import { PropType } from 'vue';
declare const _default: {
accept: {
type: StringConstructor;
default: string;
};
action: {
type: StringConstructor;
default: string;
};
addContent: {
type: PropType<string | ((h: typeof import("vue").h) => import("..").SlotReturnValue)>;
};
allowUploadDuplicateFile: BooleanConstructor;
autoUpload: {
type: BooleanConstructor;
default: boolean;
};
beforeAllFilesUpload: {
type: PropType<(file: UploadFile[]) => boolean | Promise<boolean>>;
};
beforeUpload: {
type: PropType<(file: UploadFile) => boolean | Promise<boolean>>;
};
capture: {
type: StringConstructor;
};
data: {
type: PropType<Record<string, any> | ((files: UploadFile[]) => Record<string, any>)>;
};
disabled: {
type: BooleanConstructor;
default: any;
};
fileListDisplay: {
type: PropType<(h: typeof import("vue").h, props: {
files: UploadFile[];
dragEvents?: import("..").UploadDisplayDragEvents;
}) => import("..").SlotReturnValue>;
};
files: {
type: PropType<UploadFile[]>;
default: any;
};
defaultFiles: {
type: PropType<UploadFile[]>;
default: () => TdUploadProps['defaultFiles'];
};
format: {
type: PropType<(file: File) => UploadFile>;
};
formatRequest: {
type: PropType<(requestData: {
[key: string]: any;
}) => {
[key: string]: any;
}>;
};
formatResponse: {
type: PropType<(response: any, context: import("./type").FormatResponseContext) => import("./type").ResponseType>;
};
headers: {
type: PropType<{
[key: string]: string;
}>;
};
imageProps: {
type: PropType<import("..").TdImageProps>;
};
isBatchUpload: BooleanConstructor;
max: {
type: NumberConstructor;
default: number;
};
method: {
type: PropType<"options" | "post" | "get" | "POST" | "GET" | "PUT" | "OPTIONS" | "PATCH" | "put" | "patch">;
default: "options" | "post" | "get" | "POST" | "GET" | "PUT" | "OPTIONS" | "PATCH" | "put" | "patch";
validator(val: TdUploadProps['method']): boolean;
};
mockProgressDuration: {
type: NumberConstructor;
};
multiple: BooleanConstructor;
name: {
type: StringConstructor;
default: string;
};
preview: {
type: BooleanConstructor;
default: boolean;
};
requestMethod: {
type: PropType<(files: UploadFile | UploadFile[]) => Promise<import("./type").RequestMethodResponse>>;
};
sizeLimit: {
type: PropType<number | import("./type").SizeLimitObj>;
};
useMockProgress: {
type: BooleanConstructor;
default: boolean;
};
uploadAllFilesInOneRequest: BooleanConstructor;
value: {
type: PropType<UploadFile[]>;
default: any;
};
modelValue: {
type: PropType<UploadFile[]>;
default: any;
};
defaultValue: {
type: PropType<UploadFile[]>;
default: () => TdUploadProps['defaultValue'];
};
withCredentials: BooleanConstructor;
onCancelUpload: PropType<() => void>;
onChange: PropType<(value: UploadFile[], context: import("./type").UploadChangeContext) => void>;
onClickUpload: PropType<(context: {
e: MouseEvent;
}) => void>;
onFail: PropType<(options: import("./type").UploadFailContext) => void>;
onOneFileFail: PropType<(options: import("./type").UploadFailContext) => void>;
onOneFileSuccess: PropType<(context: Pick<import("./type").SuccessContext, "XMLHttpRequest" | "e" | "file" | "response">) => void>;
onPreview: PropType<(options: {
file: UploadFile;
index: number;
e: MouseEvent;
}) => void>;
onProgress: PropType<(options: import("./type").ProgressContext) => void>;
onRemove: PropType<(context: import("./type").UploadRemoveContext) => void>;
onSelectChange: PropType<(files: File[], context: import("./type").UploadSelectChangeContext) => void>;
onSuccess: PropType<(context: import("./type").SuccessContext) => void>;
onValidate: PropType<(context: {
type: import("./type").UploadValidateType;
files: UploadFile[];
}) => void>;
onWaitingUploadFilesChange: PropType<(context: {
files: UploadFile[];
trigger: "remove" | "validate" | "uploaded";
}) => void>;
};
export default _default;