UNPKG

@minto-ai/mt-ui

Version:

UI组件库

61 lines (60 loc) 1.92 kB
import { IUploadFileSuccessResponse } from '@minto-ai/huawei-obs-server'; import { FileSuffix } from '@minto-ai/tools'; import { ExtractPropTypes, PropType } from 'vue'; import { UploadFile, UploadProgressEvent, UploadRawFile } from './upload'; import { default as UploadContent } from './upload-content.vue'; import { NOOP } from '../../utils'; declare const uploadContentProps: { fileList: { type: PropType<UploadFile[]>; default: () => never[]; }; limit: { type: NumberConstructor; }; multiple: { type: BooleanConstructor; }; suffixes: { type: PropType<FileSuffix[]>; }; disabled: { type: BooleanConstructor; }; onExceed: { type: PropType<(files: File[]) => void>; default: typeof NOOP; }; onStart: { type: PropType<(rawFile: UploadRawFile) => void>; default: () => void; }; onReload: { type: PropType<(rawFile: UploadRawFile) => void>; default: typeof NOOP; }; onProgress: { type: PropType<(evtnt: UploadProgressEvent, rawFile: UploadRawFile) => void>; default: typeof NOOP; }; onError: { type: PropType<(error: Error, rawFile: UploadRawFile) => void>; default: typeof NOOP; }; onSuccess: { type: PropType<(response: IUploadFileSuccessResponse, rawFile: UploadRawFile) => void>; default: typeof NOOP; }; onRemove: { type: PropType<(rawFile: UploadRawFile) => void>; default: typeof NOOP; }; beforeUpload: { type: PropType<(rawFile: UploadRawFile) => Promise<boolean> | boolean>; default: typeof NOOP; }; }; type UploadContentProps = ExtractPropTypes<typeof uploadContentProps>; type UploadContentInstance = InstanceType<typeof UploadContent>; export type { UploadContentInstance, UploadContentProps, }; export { uploadContentProps };