chore: bump version to 0.0.40, update rollup and zustand dependencies, and refine adapter logic

This commit is contained in:
2026-02-09 00:17:16 +08:00
parent 3920183a21
commit 7adedc0552
5 changed files with 150 additions and 135 deletions

View File

@@ -105,6 +105,9 @@ export class Query {
stop?: boolean;
// 默认不使用ws
qws: QueryWs;
/**
* 默认是 /client/router或者 默认是 /api/router
*/
isClient = false;
constructor(opts?: QueryOptions) {
this.adapter = opts?.adapter || adapter;
@@ -114,7 +117,7 @@ export class Query {
'Content-Type': 'application/json',
};
this.timeout = opts?.timeout || 60000 * 3; // 默认超时时间为 60s * 3
if (opts.beforeRequest) {
if (opts?.beforeRequest) {
this.beforeRequest = opts.beforeRequest;
} else {
this.beforeRequest = async (opts) => {