ref 路由生成方式调整为后台生成和去除mock

This commit is contained in:
DaxPay
2024-07-02 16:22:50 +08:00
parent 37ee147249
commit 40dda3d4e4
276 changed files with 1551 additions and 19426 deletions

25
types/axios.d.ts vendored
View File

@@ -11,13 +11,13 @@ export interface RequestOptions {
// Whether to return native response headers
// For example: use this attribute when you need to get the response headers
isReturnNativeResponse?: boolean
// Whether to join url
// 是否加入网址
joinPrefix?: boolean
// Interface address, use the default apiUrl if you leave it blank
// 接口地址,如果将其留空,请使用默认 apiUrl
apiUrl?: string
// 请求拼接路径
urlPrefix?: string
// Error message prompt type
// 错误消息提示类型
errorMessageMode?: ErrorMessageMode
// Success message prompt type
successMessageMode?: SuccessMessageMode
@@ -35,11 +35,26 @@ export interface RetryRequest {
count: number
waitTime: number
}
/**
* 通用响应类
*/
export interface Result<T = any> {
code: number
type: 'success' | 'error' | 'warning'
message: string
result: T
msg: string
traceId: string | null | undefined
data: T
}
/**
* 分页响应类
*/
export interface PageResult<T = any> {
current: number
records: Array<T>
size: number
total: number
}
// multipart/form-data: upload file

12
types/config.d.ts vendored
View File

@@ -151,12 +151,14 @@ export interface GlobConfig {
shortName: string
}
export interface GlobEnvConfig {
// Site title
// 项目名称
VITE_GLOB_APP_TITLE: string
// Service interface url
// 接口地址
VITE_GLOB_API_URL: string
// Service interface url prefix
// 请求超时时间
VITE_GLOB_API_TIMEOUT: number
// 接口前缀
VITE_GLOB_API_URL_PREFIX?: string
// Upload url
VITE_GLOB_UPLOAD_URL?: string
// 终端类型
VITE_GLOB_APP_CLIENT: string
}

1
types/global.d.ts vendored
View File

@@ -57,7 +57,6 @@ declare global {
}
declare interface ViteEnv {
VITE_USE_MOCK: boolean
VITE_PUBLIC_PATH: string
VITE_GLOB_APP_TITLE: string
VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none'

31
types/vue-router.d.ts vendored
View File

@@ -1,38 +1,35 @@
import { RoleEnum } from '@/enums/roleEnum'
export {}
declare module 'vue-router' {
interface RouteMeta extends Record<string | number | symbol, unknown> {
orderNo?: number
// title
// 标题
title: string
// dynamic router level.
// 动态路由器级别。
dynamicLevel?: number
// dynamic router real route path (For performance).
// 动态路由器真实路由路径 (用于性能)。
realPath?: string
// Whether to ignore permissions
// 是否忽略鉴权
ignoreAuth?: boolean
// role info
// 角色
roles?: RoleEnum[]
// Whether not to cache
// 是否不缓存
ignoreKeepAlive?: boolean
// Is it fixed on tab
// 它固定在tab上吗
affix?: boolean
// icon on tab
// 图标
icon?: string
// img on tab
img?: string
// Iframe 打开的连接
frameSrc?: string
// current page transition
// current page transition 当前页面转换
transitionName?: string
// Whether the route has been dynamically added
// 路由是否已动态添加 Whether the route has been dynamically added
hideBreadcrumb?: boolean
// Hide submenu
// 隐藏子菜单 Hide submenu
hideChildrenInMenu?: boolean
// Carrying parameters
// 携带参数 Carrying parameters
carryParam?: boolean
// Used internally to mark single-level menus
// 内部用于标记单层菜单 Used internally to mark single-level menus
single?: boolean
// Currently active menu
currentActiveMenu?: string