This commit is contained in:
hailin 2025-07-29 23:43:52 +08:00
parent 4c3df301a0
commit 699997786b
4 changed files with 29 additions and 29 deletions

View File

@ -78,12 +78,12 @@ export default defineNuxtConfig({
devServer: {
host: '0.0.0.0'
},
appConfig: {
pageIgnorePatterns: [
'**/_*/**',
'**/_*.*'
]
},
// appConfig: {
// pageIgnorePatterns: [
// '**/_*/**',
// '**/_*.*'
// ]
// },
// ignore: [
// 'src/pages/**/_*/**',
// 'src/pages/**/_*.*'

View File

@ -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",

View File

@ -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";

View File

@ -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";