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;
@@ -12,9 +16,16 @@
        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;
@@ -48,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?: {
@@ -59,6 +78,10 @@
    source?: {
        type: StringConstructor;
        value?: 'media' | 'messageFile';
    };
    transition?: {
        type: ObjectConstructor;
        value?: Transition;
    };
}
export declare type UploadMpConfig = ImageConfig | VideoConfig;
@@ -74,12 +97,6 @@
    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;
@@ -97,3 +114,8 @@
}
export declare type SizeUnitArray = ['B', 'KB', 'MB', 'GB'];
export declare type SizeUnit = SizeUnitArray[number];
export interface Transition {
    backTransition?: boolean;
    duration?: number;
    timingFunction?: string;
}