@aplus-frontend/ui
Version:
24 lines (23 loc) • 931 B
TypeScript
import { accessCreate, Oss } from '@aplus-frontend/oss';
import { Translator } from '../../../config-provider';
import { Ref } from 'vue';
export type { Oss } from '@aplus-frontend/oss';
export type GetOssAccess = () => Promise<accessCreate>;
export declare function injectLocaleToOss(tValue: Translator, langValue: Ref<string>): void;
declare function put({ file, dirName, oss, successCallBack, errorCallBack, progressCallBack }: {
file: File;
dirName: string;
oss: Oss;
successCallBack: (saveUrl: string, previewUrl: string) => void;
errorCallBack: (msg: string) => void;
progressCallBack: (p: number) => void;
}): Promise<void>;
export declare function useOss(): {
client: Oss;
put: typeof put;
};
export declare function useOssInit(getOssAccess: GetOssAccess): Promise<{
client: Oss;
put: typeof put;
}>;
export declare function getOssInstance(getOssAccess: GetOssAccess): Promise<Oss>;