This commit is contained in:
parent
899405b03b
commit
3bcfa1382d
|
|
@ -1,4 +1,6 @@
|
|||
import { FetchOptions, $fetch } from "ofetch";
|
||||
// import { FetchOptions, $fetch } from "ofetch";
|
||||
import ofetch, { FetchOptions } from "ofetch";
|
||||
const $fetch = ofetch;
|
||||
import { RequestCodeEnum, RequestMethodsEnum } from "@/enums/requestEnums";
|
||||
import feedback from "@/utils/feedback";
|
||||
import { merge } from "lodash-es";
|
||||
|
|
|
|||
|
|
@ -2,15 +2,27 @@
|
|||
* HTTP请求封装模块
|
||||
* 基于ofetch库实现的HTTP请求封装,支持拦截器、取消请求、上传文件和事件流等功能
|
||||
*/
|
||||
import {
|
||||
// import {
|
||||
// FetchOptions,
|
||||
// $fetch,
|
||||
// $Fetch,
|
||||
// FetchResponse,
|
||||
// RequestOptions,
|
||||
// FileParams,
|
||||
// RequestEventStreamOptions,
|
||||
// } from "ofetch";
|
||||
|
||||
import ofetch, {
|
||||
FetchOptions,
|
||||
$fetch,
|
||||
$Fetch,
|
||||
FetchResponse,
|
||||
RequestOptions,
|
||||
FileParams,
|
||||
RequestEventStreamOptions,
|
||||
} from "ofetch";
|
||||
|
||||
const $fetch: typeof ofetch = ofetch;
|
||||
type $Fetch = typeof ofetch;
|
||||
|
||||
import { merge } from "lodash-es";
|
||||
import { isFunction } from "../validate";
|
||||
import { RequestMethodsEnum } from "@/enums/requestEnums";
|
||||
|
|
|
|||
Loading…
Reference in New Issue