riku
2026-04-02 3282e95db0207ee133d1e98d9771dec9d83b0fc4
miniprogram_npm/tdesign-miniprogram/upload/type.d.ts
@@ -1,5 +1,9 @@
import { ImageProps } from '../image/index';
export interface TdUploadProps {
    addBtn?: {
        type: BooleanConstructor;
        value?: boolean;
    };
    addContent?: {
        type: StringConstructor;
        value?: string;
@@ -16,9 +20,12 @@
        type: BooleanConstructor;
        value?: boolean;
    };
    style?: {
        type: StringConstructor;
        value?: string;
    draggable?: {
        type: null;
        value?: boolean | {
            vibrate?: boolean;
            collisionVibrate?: boolean;
        };
    };
    files?: {
        type: ArrayConstructor;
@@ -52,8 +59,16 @@
        type: ArrayConstructor;
        value?: Array<MediaType>;
    };
    preview?: {
        type: BooleanConstructor;
        value?: boolean;
    };
    removeBtn?: {
        type: BooleanConstructor;
        value?: boolean;
    };
    requestMethod?: {
        type: null;
        type: undefined;
        value?: null;
    };
    sizeLimit?: {
@@ -64,13 +79,9 @@
        type: StringConstructor;
        value?: 'media' | 'messageFile';
    };
    draggable?: {
        type: null;
        value?: boolean | Draggable;
    };
    transition?: {
        type: ObjectConstructor;
        value: Transition;
        value?: Transition;
    };
}
export declare type UploadMpConfig = ImageConfig | VideoConfig;
@@ -87,12 +98,6 @@
    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;
@@ -100,7 +105,6 @@
    type?: 'image' | 'video';
    percent?: number;
    status: 'loading' | 'reload' | 'failed' | 'done';
    thumb?: string;
}
export declare type MediaType = 'image' | 'video';
export interface SizeLimitObj {
@@ -110,10 +114,6 @@
}
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;