This commit is contained in:
parent
4c3df301a0
commit
699997786b
|
|
@ -78,12 +78,12 @@ export default defineNuxtConfig({
|
|||
devServer: {
|
||||
host: '0.0.0.0'
|
||||
},
|
||||
appConfig: {
|
||||
pageIgnorePatterns: [
|
||||
'**/_*/**',
|
||||
'**/_*.*'
|
||||
]
|
||||
},
|
||||
// appConfig: {
|
||||
// pageIgnorePatterns: [
|
||||
// '**/_*/**',
|
||||
// '**/_*.*'
|
||||
// ]
|
||||
// },
|
||||
// ignore: [
|
||||
// 'src/pages/**/_*/**',
|
||||
// 'src/pages/**/_*.*'
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
"@vue/eslint-config-typescript": "^11.0.2",
|
||||
"eslint": "^8.25.0",
|
||||
"eslint-plugin-nuxt": "^4.0.0",
|
||||
"nuxt": "3.18.0",
|
||||
"nuxt": "3.6.5",
|
||||
"prettier": "^2.7.1",
|
||||
"sass-loader": "^16.0.5",
|
||||
"swiper": "^11.0.3",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// import { FetchOptions, $fetch } from "ofetch";
|
||||
import { ofetch } from "ofetch"; // ✅ 正确,没有 default,只能这样导入
|
||||
import type { FetchOptions } from "ofetch"; // ✅ 类型也正确
|
||||
const $fetch = ofetch;
|
||||
import { FetchOptions, $fetch } from "ofetch";
|
||||
// import { ofetch } from "ofetch"; // ✅ 正确,没有 default,只能这样导入
|
||||
// import type { FetchOptions } from "ofetch"; // ✅ 类型也正确
|
||||
// const $fetch = ofetch;
|
||||
import { RequestCodeEnum, RequestMethodsEnum } from "@/enums/requestEnums";
|
||||
import feedback from "@/utils/feedback";
|
||||
import { merge } from "lodash-es";
|
||||
|
|
|
|||
|
|
@ -2,26 +2,26 @@
|
|||
* HTTP请求封装模块
|
||||
* 基于ofetch库实现的HTTP请求封装,支持拦截器、取消请求、上传文件和事件流等功能
|
||||
*/
|
||||
// import {
|
||||
// FetchOptions,
|
||||
// $fetch,
|
||||
// $Fetch,
|
||||
// FetchResponse,
|
||||
// RequestOptions,
|
||||
// FileParams,
|
||||
// RequestEventStreamOptions,
|
||||
// } from "ofetch";
|
||||
|
||||
import { ofetch } from "ofetch"; // ✅ 没有 default export
|
||||
import type {
|
||||
FetchOptions,
|
||||
FetchResponse,
|
||||
RequestOptions,
|
||||
FileParams,
|
||||
RequestEventStreamOptions,
|
||||
import {
|
||||
FetchOptions,
|
||||
$fetch,
|
||||
$Fetch,
|
||||
FetchResponse,
|
||||
RequestOptions,
|
||||
FileParams,
|
||||
RequestEventStreamOptions,
|
||||
} from "ofetch";
|
||||
|
||||
const $fetch = ofetch; // ✅ 手动绑定
|
||||
// import { ofetch } from "ofetch"; // ✅ 没有 default export
|
||||
// import type {
|
||||
// FetchOptions,
|
||||
// FetchResponse,
|
||||
// RequestOptions,
|
||||
// FileParams,
|
||||
// RequestEventStreamOptions,
|
||||
// } from "ofetch";
|
||||
|
||||
// const $fetch = ofetch; // ✅ 手动绑定
|
||||
|
||||
import { merge } from "lodash-es";
|
||||
import { isFunction } from "../validate";
|
||||
|
|
|
|||
Loading…
Reference in New Issue