@minto-ai/mt-ui
Version:
UI组件库
130 lines (129 loc) • 4.81 kB
TypeScript
import { UploadFile, UploadRawFile } from './upload';
declare function abort(uploadFile?: UploadFile): void;
declare function choose(): void;
declare function reload(uid: number, file: File): void;
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
fileList: {
type: import('vue').PropType<UploadFile[]>;
default: () => never[];
};
limit: {
type: NumberConstructor;
};
multiple: {
type: BooleanConstructor;
};
size: {
type: NumberConstructor;
};
suffixes: {
type: import('vue').PropType<import('@minto-ai/tools').FileSuffix[]>;
};
disabled: {
type: BooleanConstructor;
};
onExceed: {
type: import('vue').PropType<(files: File[]) => void>;
default: typeof import('../../utils').NOOP;
};
onStart: {
type: import('vue').PropType<(rawFile: UploadRawFile) => void>;
default: () => void;
};
onReload: {
type: import('vue').PropType<(rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
onProgress: {
type: import('vue').PropType<(evtnt: import('./upload').UploadProgressEvent, rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
onError: {
type: import('vue').PropType<(error: Error, rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
onSuccess: {
type: import('vue').PropType<(response: import('@minto-ai/obs-server').IUploadFileSuccessResponse, rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
onRemove: {
type: import('vue').PropType<(rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
beforeUpload: {
type: import('vue').PropType<(rawFile: UploadRawFile) => Promise<boolean> | boolean>;
default: typeof import('../../utils').NOOP;
};
}>, {
abort: typeof abort;
choose: typeof choose;
reload: typeof reload;
upload: (files: Array<File>) => void;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
fileList: {
type: import('vue').PropType<UploadFile[]>;
default: () => never[];
};
limit: {
type: NumberConstructor;
};
multiple: {
type: BooleanConstructor;
};
size: {
type: NumberConstructor;
};
suffixes: {
type: import('vue').PropType<import('@minto-ai/tools').FileSuffix[]>;
};
disabled: {
type: BooleanConstructor;
};
onExceed: {
type: import('vue').PropType<(files: File[]) => void>;
default: typeof import('../../utils').NOOP;
};
onStart: {
type: import('vue').PropType<(rawFile: UploadRawFile) => void>;
default: () => void;
};
onReload: {
type: import('vue').PropType<(rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
onProgress: {
type: import('vue').PropType<(evtnt: import('./upload').UploadProgressEvent, rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
onError: {
type: import('vue').PropType<(error: Error, rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
onSuccess: {
type: import('vue').PropType<(response: import('@minto-ai/obs-server').IUploadFileSuccessResponse, rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
onRemove: {
type: import('vue').PropType<(rawFile: UploadRawFile) => void>;
default: typeof import('../../utils').NOOP;
};
beforeUpload: {
type: import('vue').PropType<(rawFile: UploadRawFile) => Promise<boolean> | boolean>;
default: typeof import('../../utils').NOOP;
};
}>> & Readonly<{}>, {
onError: (error: Error, rawFile: UploadRawFile) => void;
onProgress: (evtnt: import('./upload').UploadProgressEvent, rawFile: UploadRawFile) => void;
disabled: boolean;
multiple: boolean;
beforeUpload: (rawFile: UploadRawFile) => Promise<boolean> | boolean;
fileList: UploadFile[];
onRemove: (rawFile: UploadRawFile) => void;
onExceed: (files: File[]) => void;
onStart: (rawFile: UploadRawFile) => void;
onReload: (rawFile: UploadRawFile) => void;
onSuccess: (response: import('@minto-ai/obs-server').IUploadFileSuccessResponse, rawFile: UploadRawFile) => void;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
inputRef: HTMLInputElement;
}, HTMLDivElement>;
export default _default;