起因:误建在 yudao master 快照(vite 8.0.10 + rolldown@1.0.0-rc.17 前沿不稳, mini-desktop 构建 native binding 崩;另叠 pnpm10+ 拦原生构建脚本 esbuild)。 重做到稳定发布 tag v2026.01:vite 5.1.4 / vue 3.5.12 / element-plus 2.11.1。 - 保留 wanxiang 5 个 MVP 运营页(review/featured/dashboard/adSlot/withdraw) + 6 个 admin-api 模块(ad/trade/project/feed/telemetry/mock)+ 路由/.env 接线不变 - build:local 改 node 直跑 vite(绕 pnpm-run 预检),max-old-space 降至 4096 - 注:本次为基线切换提交,构建绿待 mini-desktop(15G)独立验证,本机 5.8G 跑前端 OOM Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
export {}
|
|
declare global {
|
|
interface Fn<T = any> {
|
|
(...arg: T[]): T
|
|
}
|
|
|
|
type Nullable<T> = T | null
|
|
|
|
type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
|
|
|
|
type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
|
|
|
|
type ComponentRef<T> = InstanceType<T>
|
|
|
|
type LocaleType = 'zh-CN' | 'en'
|
|
|
|
declare type TimeoutHandle = ReturnType<typeof setTimeout>
|
|
declare type IntervalHandle = ReturnType<typeof setInterval>
|
|
|
|
type AxiosHeaders =
|
|
| 'application/json'
|
|
| 'application/x-www-form-urlencoded'
|
|
| 'multipart/form-data'
|
|
|
|
type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT'
|
|
|
|
type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
|
|
|
|
interface AxiosConfig {
|
|
params?: any
|
|
data?: any
|
|
url?: string
|
|
method?: AxiosMethod
|
|
headersType?: string
|
|
responseType?: AxiosResponseType
|
|
}
|
|
|
|
interface IResponse<T = any> {
|
|
code: string
|
|
data: T extends any ? T : T & any
|
|
}
|
|
|
|
interface PageParam {
|
|
pageSize?: number
|
|
pageNo?: number
|
|
}
|
|
|
|
interface Tree {
|
|
id: number
|
|
name: string
|
|
children?: Tree[] | any[]
|
|
}
|
|
// 分页数据公共返回
|
|
interface PageResult<T> {
|
|
list: T // 数据
|
|
total: number // 总量
|
|
}
|
|
}
|