faim
Version:
Element Plus & Element UI isomorphic UI component library, more than Element.
43 lines (42 loc) • 2.41 kB
TypeScript
import type { ComponentPublicInstance } from 'vue-demi';
export declare const MB: number;
export declare const KB = 1024;
export declare function getListeners(this: ComponentPublicInstance, globalListeners: Record<string, any>): any;
export declare function isGlobalSlot(slot: any): any;
export declare function isEmpty(value: any): boolean;
export declare function notEmpty(value: any): boolean;
export declare function isObject(value: any): boolean;
export declare function isBase64WithScheme(str: string, mediaType?: string): boolean;
export declare function blobLikeToBase64(binary: File | Blob): Promise<unknown>;
export declare function toBlobLike(source: File | Blob | string): Promise<Blob>;
export declare function toLocalURL(source: File | Blob | string): Promise<unknown>;
export declare function toImageTag(src: string): Promise<unknown>;
export declare function unwrap(value: any, srcAt: string | ((value: any) => unknown) | symbol): any;
export declare function handleNumericalProp({ config, labelTip, createTitleTextOfNotMatched, createTitleTextOfMinExceeded, createTitleTextOfMaxExceeded, withUnit, getValue, }: {
config: any[];
labelTip: string;
createTitleTextOfNotMatched: (replacement: string) => string;
createTitleTextOfMinExceeded: (replacement: string) => string;
createTitleTextOfMaxExceeded: (replacement: string) => string;
withUnit: (value: number) => string;
getValue: (value: any) => number;
}): {
tip: string | undefined;
validate: (v: any) => boolean;
min: number | undefined;
minLabel: string | undefined;
max: number | undefined;
maxLabel: string | undefined;
options: number[] | undefined;
optionsLabel: string | undefined;
target: number | undefined;
targetLabel: string | undefined;
};
export declare function getVideoMetadata(source: File | Blob | string): Promise<unknown>;
export declare function getAudioMetadata(source: File | Blob | string): Promise<unknown>;
export declare function secondsToHHMMSS(seconds: number): string;
export declare function sizeToLabel(bytes: number): string;
export declare function getOrigin(url: string): string;
export declare function fileToBlob(file: File | Blob): Promise<unknown>;
export declare function blobLikeToArrayBuffer(blobLike: File | Blob): Promise<unknown>;
export declare function blobToFile(blob: File | Blob, fileName?: string, fileType?: string): File;