vue-pro/yudao-ui-admin-vue3/types/global.d.ts
YunaiV 08c772fede 1. 将 BasePage 重命名为 PageParam
2. 增加代码注释
3. 调整 menu 重置表单的逻辑,避免写 2 遍 null 的数据
2022-11-13 18:34:23 +08:00

51 lines
1.2 KiB
TypeScript

import type { CSSProperties } from 'vue'
declare global {
declare interface Fn<T = any> {
(...arg: T[]): T
}
declare type Nullable<T> = T | null
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
declare type ComponentRef<T> = InstanceType<T>
declare type LocaleType = 'zh-CN' | 'en'
declare type AxiosHeaders =
| 'application/json'
| 'application/x-www-form-urlencoded'
| 'multipart/form-data'
declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT'
declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
declare interface AxiosConfig {
params?: any
data?: any
url?: string
method?: AxiosMethod
headersType?: string
responseType?: AxiosResponseType
}
declare interface IResponse<T = any> {
code: string
data: T extends any ? T : T & any
}
declare interface PageParam {
pageSize?: number
pageNo?: number
}
declare interface Tree {
id: number
name: string
children?: Tree[] | any[]
}
}