错误提交

This commit is contained in:
gexinzhineng/gxzn27
2023-04-03 16:11:12 +08:00
parent 0e578f8d0a
commit b967c4e01e
38 changed files with 344 additions and 158 deletions

View File

@ -1,6 +1,7 @@
declare module 'vue' {
export interface GlobalComponents {
Icon: typeof import('../components/Icon/src/Icon.vue')['default']
Icon: typeof import('@/components/Icon')['Icon']
DictTag: typeof import('@/components/DictTag')['DictTag']
}
}

26
types/global.d.ts vendored
View File

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

4
types/router.d.ts vendored
View File

@ -54,7 +54,7 @@ type Component<T = any> =
| (() => Promise<T>)
declare global {
declare interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
name: string
meta: RouteMeta
component?: Component | string
@ -64,7 +64,7 @@ declare global {
keepAlive?: boolean
}
declare interface AppCustomRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
interface AppCustomRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
icon: any
name: string
meta: RouteMeta