feat: 重新整理目录结构,mock请求

This commit is contained in:
kailong321200875
2023-11-30 11:34:39 +08:00
parent c8400abd9f
commit 179ab2672f
27 changed files with 96 additions and 112 deletions

3
types/env.d.ts vendored
View File

@@ -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
View File

@@ -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
}