| | |
| | | import { ImageProps } from '../image/index'; |
| | | export interface TdUploadProps { |
| | | addBtn?: { |
| | | type: BooleanConstructor; |
| | | value?: boolean; |
| | | }; |
| | | addContent?: { |
| | | type: StringConstructor; |
| | | value?: string; |
| | |
| | | type: BooleanConstructor; |
| | | value?: boolean; |
| | | }; |
| | | style?: { |
| | | type: StringConstructor; |
| | | value?: string; |
| | | draggable?: { |
| | | type: null; |
| | | value?: boolean | { |
| | | vibrate?: boolean; |
| | | collisionVibrate?: boolean; |
| | | }; |
| | | }; |
| | | files?: { |
| | | type: ArrayConstructor; |
| | |
| | | type: ArrayConstructor; |
| | | value?: Array<MediaType>; |
| | | }; |
| | | preview?: { |
| | | type: BooleanConstructor; |
| | | value?: boolean; |
| | | }; |
| | | removeBtn?: { |
| | | type: BooleanConstructor; |
| | | value?: boolean; |
| | | }; |
| | | requestMethod?: { |
| | | type: null; |
| | | type: undefined; |
| | | value?: null; |
| | | }; |
| | | sizeLimit?: { |
| | |
| | | type: StringConstructor; |
| | | value?: 'media' | 'messageFile'; |
| | | }; |
| | | draggable?: { |
| | | type: null; |
| | | value?: boolean | Draggable; |
| | | }; |
| | | transition?: { |
| | | type: ObjectConstructor; |
| | | value: Transition; |
| | | value?: Transition; |
| | | }; |
| | | } |
| | | export declare type UploadMpConfig = ImageConfig | VideoConfig; |
| | |
| | | maxDuration?: number; |
| | | camera?: 'back' | 'front'; |
| | | } |
| | | export interface UploadDisplayDragEvents { |
| | | onDrop?: (event: DragEvent) => void; |
| | | onDragenter?: (event: DragEvent) => void; |
| | | onDragover?: (event: DragEvent) => void; |
| | | onDragleave?: (event: DragEvent) => void; |
| | | } |
| | | export interface UploadFile { |
| | | url: string; |
| | | name?: string; |
| | |
| | | type?: 'image' | 'video'; |
| | | percent?: number; |
| | | status: 'loading' | 'reload' | 'failed' | 'done'; |
| | | thumb?: string; |
| | | } |
| | | export declare type MediaType = 'image' | 'video'; |
| | | export interface SizeLimitObj { |
| | |
| | | } |
| | | export declare type SizeUnitArray = ['B', 'KB', 'MB', 'GB']; |
| | | export declare type SizeUnit = SizeUnitArray[number]; |
| | | export interface Draggable { |
| | | vibrate?: boolean; |
| | | collisionVibrate?: boolean; |
| | | } |
| | | export interface Transition { |
| | | backTransition?: boolean; |
| | | duration?: number; |