feat: 重新整理目录结构,mock请求
This commit is contained in:
3
types/env.d.ts
vendored
3
types/env.d.ts
vendored
@@ -15,6 +15,9 @@ interface ImportMetaEnv {
|
||||
readonly VITE_DROP_CONSOLE: string
|
||||
readonly VITE_SOURCEMAP: string
|
||||
readonly VITE_OUT_DIR: string
|
||||
readonly VITE_AXIOS_CONTENT_TYPE: string
|
||||
readonly VITE_AXIOS_TIMEOUT: number
|
||||
readonly VITE_AXIOS_SUCCESS_CODE: number
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
7
types/global.d.ts
vendored
7
types/global.d.ts
vendored
@@ -1,4 +1,5 @@
|
||||
import type { CSSProperties } from 'vue'
|
||||
import { AxiosRequestHeaders } from 'axios'
|
||||
declare global {
|
||||
declare interface Fn<T = any> {
|
||||
(...arg: T[]): T
|
||||
@@ -25,7 +26,7 @@ declare global {
|
||||
|
||||
declare type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu'
|
||||
|
||||
declare type AxiosHeaders =
|
||||
declare type AxiosContentType =
|
||||
| 'application/json'
|
||||
| 'application/x-www-form-urlencoded'
|
||||
| 'multipart/form-data'
|
||||
@@ -39,12 +40,12 @@ declare global {
|
||||
data?: any
|
||||
url?: string
|
||||
method?: AxiosMethod
|
||||
headersType?: string
|
||||
headers?: AxiosRequestHeaders
|
||||
responseType?: AxiosResponseType
|
||||
}
|
||||
|
||||
declare interface IResponse<T = any> {
|
||||
code: string
|
||||
code: number
|
||||
data: T extends any ? T : T & any
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user