| | |
| | | import { ImageProps } from '../image/index'; |
| | | export interface TdUploadProps { |
| | | addBtn?: { |
| | | type: BooleanConstructor; |
| | | value?: boolean; |
| | | }; |
| | | addContent?: { |
| | | type: StringConstructor; |
| | | value?: string; |
| | |
| | | type: ObjectConstructor; |
| | | value?: UploadMpConfig; |
| | | }; |
| | | style?: { |
| | | type: StringConstructor; |
| | | value?: string; |
| | | disabled?: { |
| | | type: BooleanConstructor; |
| | | value?: boolean; |
| | | }; |
| | | 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?: { |
| | |
| | | source?: { |
| | | type: StringConstructor; |
| | | value?: 'media' | 'messageFile'; |
| | | }; |
| | | transition?: { |
| | | type: ObjectConstructor; |
| | | value?: Transition; |
| | | }; |
| | | } |
| | | export declare type UploadMpConfig = ImageConfig | VideoConfig; |
| | |
| | | compressed?: boolean; |
| | | 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; |
| | |
| | | } |
| | | export declare type SizeUnitArray = ['B', 'KB', 'MB', 'GB']; |
| | | export declare type SizeUnit = SizeUnitArray[number]; |
| | | export interface Transition { |
| | | backTransition?: boolean; |
| | | duration?: number; |
| | | timingFunction?: string; |
| | | } |