23 lines
595 B
TypeScript
23 lines
595 B
TypeScript
export interface DeleteFileItem {
|
|
/** 文件URL */
|
|
filePath?: string;
|
|
/** 文件ID */
|
|
id?: string;
|
|
[key: string]: any;
|
|
}
|
|
|
|
export interface DeleteFileOptions {
|
|
/** 要删除的文件列表 */
|
|
files: DeleteFileItem[];
|
|
/** 是否单文件删除 */
|
|
single?: boolean;
|
|
}
|
|
|
|
export type DeleteFileFunction = (options: DeleteFileOptions) => Promise<any>;
|
|
|
|
/**
|
|
* 删除文件
|
|
*/
|
|
export default function useDeleteFile(returnType: "array"): [boolean, DeleteFileFunction];
|
|
export default function useDeleteFile(returnType?: "object"): { loading: boolean; deleteFile: DeleteFileFunction };
|