chore: bump version to 0.0.40, update rollup and zustand dependencies, and refine adapter logic
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user