This commit is contained in:
hailin 2025-07-29 23:22:27 +08:00
parent 3bcfa1382d
commit c6020ba819
2 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,6 @@
// import { FetchOptions, $fetch } from "ofetch";
import ofetch, { FetchOptions } from "ofetch";
import ofetch from "ofetch";
import type { FetchOptions } from "ofetch"; // 👈 用 `type` 引入类型
const $fetch = ofetch;
import { RequestCodeEnum, RequestMethodsEnum } from "@/enums/requestEnums";
import feedback from "@/utils/feedback";

View File

@ -12,12 +12,13 @@
// RequestEventStreamOptions,
// } from "ofetch";
import ofetch, {
FetchOptions,
FetchResponse,
RequestOptions,
FileParams,
RequestEventStreamOptions,
import ofetch from "ofetch";
import type {
FetchOptions,
FetchResponse,
RequestOptions,
FileParams,
RequestEventStreamOptions
} from "ofetch";
const $fetch: typeof ofetch = ofetch;