fix: 参数配置移除编辑器输入

This commit is contained in:
TsMask
2023-10-09 20:01:23 +08:00
parent 3ef38f12c5
commit 5002ba3297
2 changed files with 2 additions and 64 deletions

View File

@@ -89,7 +89,7 @@ const FATCH_OPTIONS: OptionsType = {
credentials: undefined,
repeatSubmit: true,
whithToken: true,
signal: undefined
signal: undefined,
};
/**请求前的拦截 */
@@ -209,7 +209,7 @@ export async function request(options: OptionsType): Promise<ResultType> {
if (!options.signal) {
const controller = new AbortController();
const { signal } = controller;
options.signal = signal;
options.signal = signal;
timeoutId = setTimeout(() => {
controller.abort(); // 终止请求
}, options.timeout);