From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 types/global.d.ts |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/types/global.d.ts b/types/global.d.ts
new file mode 100644
index 0000000..eebe9bb
--- /dev/null
+++ b/types/global.d.ts
@@ -0,0 +1,58 @@
+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 // 鎬婚噺
+  }
+}

--
Gitblit v1.8.0