update add update

This commit is contained in:
2025-11-28 02:49:52 +08:00
parent 01c253e553
commit b2fcc84321
10 changed files with 162 additions and 81 deletions

View File

@@ -26,8 +26,14 @@ export type Package = {
};
type Options = {
check?: boolean;
/**
* 是否返回文本内容
*/
returnContent?: boolean;
setToken?: boolean;
/**
* 本地文件hash
*/
hash?: string;
[key: string]: any;
};

View File

@@ -66,7 +66,7 @@ type UploadOptions = {
* @param opts.meta meta
* @returns
*/
export const upload = (opts: UploadOptions): Promise<{ code?: number; message?: string; [key: string]: any }> => {
export const upload = (opts: UploadOptions): Promise<{ code?: number; message?: string;[key: string]: any }> => {
const form = opts?.form || new FormData();
if (!opts.form) {
let hash = '';