This commit is contained in:
quantulr
2023-10-29 18:37:44 +08:00
commit 373b3d9dff
1813 changed files with 131892 additions and 0 deletions

32
pc/typings/fetch.d.ts vendored Normal file
View File

@ -0,0 +1,32 @@
import 'ohmyfetch'
import { FetchResponse, FetchOptions } from 'ohmyfetch'
declare module 'ohmyfetch' {
interface FetchOptions {
url?: string
requestOptions?: RequestOptions
}
interface RequestOptions {
// 请求接口前缀
apiPrefix?: string
// 需要对返回数据进行处理
isTransformResponse?: boolean
// 是否返回默认数据
isReturnDefaultResponse?: boolean
//POST请求下如果无data则将params视为data
isParamsToData?: boolean
// 是否自动携带token
withToken?: boolean
requestInterceptorsHook?(options: FetchOptions): FetchOptions
responseInterceptorsHook?(
response: FetchResponse<any>,
options: FetchOptions
): any
responseInterceptorsCatchHook?: (error: any) => void
}
interface FileParams {
name?: string
file: File
data?: any
}
}

0
pc/typings/modules.d.ts vendored Normal file
View File

8
pc/typings/router.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
import 'vue-router'
declare module 'vue-router' {
// 扩展 RouteMeta
interface RouteMeta {
module?: string
activeMenu?: string
}
}