first commit
This commit is contained in:
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
declare namespace API {
|
||||
|
||||
type ErrorShowType =
|
||||
| 0 // Success Message
|
||||
| 1 // Warning Message
|
||||
| 2 // Error Message
|
||||
| 3 // Success Notification
|
||||
| 4 // Warning Notification
|
||||
| 5 // Error Notification
|
||||
| 99; // Other
|
||||
|
||||
/** List response data format */
|
||||
type ListResponse<T> = {
|
||||
data: T[]
|
||||
page: number
|
||||
total: number
|
||||
per_page: number
|
||||
current_page: number
|
||||
}
|
||||
|
||||
/** The response data format agreed upon with the back end */
|
||||
interface ResponseStructure<T = any> {
|
||||
success: boolean
|
||||
msg: string
|
||||
data?: T
|
||||
errorCode?: number
|
||||
showType?: ErrorShowType
|
||||
status?: number
|
||||
description?: string
|
||||
placement?: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight',
|
||||
}
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
declare namespace Env {
|
||||
/** The router history mode */
|
||||
type RouterHistoryMode = 'hash' | 'history' | 'memory';
|
||||
|
||||
/** Interface for import.meta */
|
||||
interface ImportMeta extends ImportMetaEnv {
|
||||
|
||||
/** The base url of the application */
|
||||
readonly VITE_BASE_URL: string;
|
||||
|
||||
readonly VITE_CONSTANT_ROUTE_MODE: 'dynamic' | 'static';
|
||||
|
||||
readonly VITE_ROUTER_HISTORY_MODE?: RouterHistoryMode;
|
||||
}
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
interface Window {
|
||||
|
||||
tokenRefreshing?: boolean;
|
||||
|
||||
requests?: any[];
|
||||
|
||||
/** Ant-design-vue message instance */
|
||||
$message?: import('antd/es/message/interface').MessageInstance;
|
||||
|
||||
/** Ant-design-vue modal instance */
|
||||
$modal?: Omit<import('antd/es/modal/confirm').ModalStaticFunctions, 'warn'>;
|
||||
|
||||
/** Ant-design-vue notification instance */
|
||||
$notification?: import('antd/es/notification/interface').NotificationInstance;
|
||||
|
||||
}
|
||||
|
||||
interface anyObj {
|
||||
[key: string]: any
|
||||
}
|
||||
Reference in New Issue
Block a user