feat: 新增选择文件上传功能,优化部分代码实现

This commit is contained in:
539943419 committed 2024-08-16 00:39:35 +08:00
1 parent 60477a9112
commit fda693326e
11 files changed
+292 -71

No files matched your search

+20 -21
View File
@@ -1,29 +1,28 @@
import { directory, file } from "./type";
export type miaoFetchConfig = {
retry?: number
}
retry?: number;
};
export type getOption = {
} & miaoFetchConfig
export type getOption = {} & miaoFetchConfig;
export type getResponse = (file | directory)[]
export type getResponse = (file | directory)[];
export type uploadOption = {
/**
* 上传进度回调函数
* @param {any} percent 进度百分比,float类型
*/
onProcess?: (percent: number) => void
/**
* 上传文件执行的操作
* write即为覆盖写
* append即为增量写
*/
type?: 'write' | 'append'
} & miaoFetchConfig
/**
* 上传进度回调函数
* @param {any} percent 进度百分比,float类型
*/
onProcess?: (percent: number) => void;
/**
* 上传文件执行的操作
* write即为覆盖写
* append即为增量写
*/
type?: "write" | "append";
} & miaoFetchConfig;
export type deleteOption = {
} & miaoFetchConfig
export type queryOption = {
} & miaoFetchConfig
export type deleteOption = {} & miaoFetchConfig;
export type renameOption = {} & miaoFetchConfig;
export type cutOption = {} & miaoFetchConfig;
export type queryOption = {} & miaoFetchConfig;