UNPKG

im-ui-mobile

Version:

A Vue3.0 + Typescript instant messaging component library for Uniapp

58 lines (53 loc) 1.63 kB
import { AllowedComponentProps, VNodeProps } from '../common' declare interface UploadFile { url: string name?: string size?: number type?: string progress?: number status?: 'uploading' | 'success' | 'error' response?: any } declare interface ChatUploadProps { modelValue?: UploadFile[] maxCount?: number maxSize?: number sizeType?: string[] sourceType?: string[] deletable?: boolean previewFullImage?: boolean multiple?: boolean disabled?: boolean customBtn?: boolean showProgress?: boolean uploadText?: string width?: number | string height?: number | string action?: string name?: string headers?: Record<string, string> data?: Record<string, any> autoUpload?: boolean token?: string } declare interface ChatUploadEmits { (e: 'update:modelValue', files: UploadFile[]): void (e: 'change', files: UploadFile[]): void (e: 'before', file: UploadFile): void (e: 'success', file: UploadFile, response: any): void (e: 'fail', file: UploadFile, error: any): void (e: 'progress', file: UploadFile, progress: number): void (e: 'delete', file: UploadFile, index: number): void (e: 'oversize', file: UploadFile): void } declare interface _ChatUpload { new(): { $props: AllowedComponentProps & VNodeProps & ChatUploadProps $emit: ChatUploadEmits } submit: () => Promise<UploadFile[]> clearFiles: () => void getFiles: () => UploadFile[] hide: () => void } export declare const ChatUpload: _ChatUpload