Initial commit
This commit is contained in:
89
promo-ui2/types/global.d.ts
vendored
Normal file
89
promo-ui2/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
import type { CSSProperties } from 'vue'
|
||||
import { RawAxiosRequestHeaders } from 'axios'
|
||||
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 RemoveReadonly<T> = {
|
||||
-readonly [P in keyof T]: T[P]
|
||||
}
|
||||
|
||||
declare type ComponentRef<T> = InstanceType<T>
|
||||
|
||||
declare type LocaleType = 'zh-CN' | 'en'
|
||||
|
||||
declare type TimeoutHandle = ReturnType<typeof setTimeout>
|
||||
declare type IntervalHandle = ReturnType<typeof setInterval>
|
||||
|
||||
declare type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'
|
||||
|
||||
declare type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu'
|
||||
|
||||
declare type AxiosContentType =
|
||||
| 'application/json'
|
||||
| 'application/x-www-form-urlencoded'
|
||||
| 'multipart/form-data'
|
||||
| 'text/plain'
|
||||
|
||||
declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put'
|
||||
|
||||
declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
|
||||
|
||||
declare interface AxiosConfig {
|
||||
params?: any
|
||||
data?: any
|
||||
url?: string
|
||||
method?: AxiosMethod
|
||||
headers?: RawAxiosRequestHeaders
|
||||
responseType?: AxiosResponseType
|
||||
}
|
||||
|
||||
declare interface IResponse<T = any> {
|
||||
code: number
|
||||
data: T extends any ? T : T & any
|
||||
rows: any
|
||||
total: any
|
||||
}
|
||||
|
||||
declare interface ThemeTypes {
|
||||
elColorPrimary?: string
|
||||
leftMenuBorderColor?: string
|
||||
leftMenuBgColor?: string
|
||||
leftMenuBgLightColor?: string
|
||||
leftMenuBgActiveColor?: string
|
||||
leftMenuCollapseBgActiveColor?: string
|
||||
leftMenuTextColor?: string
|
||||
leftMenuTextActiveColor?: string
|
||||
logoTitleTextColor?: string
|
||||
logoBorderColor?: string
|
||||
topHeaderBgColor?: string
|
||||
topHeaderTextColor?: string
|
||||
topHeaderHoverColor?: string
|
||||
topToolBorderColor?: string
|
||||
}
|
||||
|
||||
declare interface ImportMetaEnv {
|
||||
readonly VITE_NODE_ENV: string
|
||||
readonly VITE_APP_TITLE: string
|
||||
readonly VITE_API_BASE_PATH: string
|
||||
readonly VITE_BASE_PATH: string
|
||||
readonly VITE_DROP_DEBUGGER: string
|
||||
readonly VITE_DROP_CONSOLE: string
|
||||
readonly VITE_SOURCEMAP: string
|
||||
readonly VITE_OUT_DIR: string
|
||||
readonly VITE_USE_BUNDLE_ANALYZER: string
|
||||
readonly VITE_USE_ALL_ELEMENT_PLUS_STYLE: string
|
||||
readonly VITE_USE_MOCK: string
|
||||
readonly VITE_USE_CSS_SPLIT: string
|
||||
readonly VITE_USE_ONLINE_ICON: string
|
||||
readonly VITE_ICON_PREFIX: string
|
||||
readonly VITE_HIDE_GLOBAL_SETTING: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user