wireguard-dashboard-admin/types/global.d.ts

194 lines
4.9 KiB
TypeScript
Raw Permalink Normal View History

2022-08-22 21:34:55 +08:00
import type { ECharts } from "echarts";
2022-11-26 19:14:08 +08:00
import type { TableColumns } from "@pureadmin/table";
2022-01-21 11:32:58 +08:00
2022-11-26 19:14:08 +08:00
/**
* `.vue` `.ts` `.tsx` 使
*/
2021-10-16 16:16:58 +08:00
declare global {
2022-11-26 19:14:08 +08:00
/**
2024-03-09 16:27:52 +08:00
* `node``pnpm`
2022-11-26 19:14:08 +08:00
*/
2022-03-03 23:30:08 +08:00
const __APP_INFO__: {
pkg: {
name: string;
version: string;
2024-03-09 16:27:52 +08:00
engines: {
node: string;
pnpm: string;
};
2022-03-03 23:30:08 +08:00
dependencies: Recordable<string>;
devDependencies: Recordable<string>;
};
lastBuildTime: string;
};
2022-11-26 19:14:08 +08:00
/**
* Window
*/
2021-10-16 16:16:58 +08:00
interface Window {
// Global vue app instance
__APP__: App<Element>;
webkitCancelAnimationFrame: (handle: number) => void;
mozCancelAnimationFrame: (handle: number) => void;
oCancelAnimationFrame: (handle: number) => void;
msCancelAnimationFrame: (handle: number) => void;
webkitRequestAnimationFrame: (callback: FrameRequestCallback) => number;
mozRequestAnimationFrame: (callback: FrameRequestCallback) => number;
oRequestAnimationFrame: (callback: FrameRequestCallback) => number;
msRequestAnimationFrame: (callback: FrameRequestCallback) => number;
}
2024-03-22 20:47:17 +08:00
/**
* Document
*/
interface Document {
webkitFullscreenElement?: Element;
mozFullScreenElement?: Element;
msFullscreenElement?: Element;
}
2022-11-26 19:14:08 +08:00
/**
*
*/
type ViteCompression =
| "none"
| "gzip"
| "brotli"
| "both"
| "gzip-clear"
| "brotli-clear"
| "both-clear";
2022-11-26 19:14:08 +08:00
/**
*
2024-05-10 12:09:23 +08:00
* @see {@link https://pure-admin.github.io/pure-admin-doc/pages/config/#%E5%85%B7%E4%BD%93%E9%85%8D%E7%BD%AE}
2022-11-26 19:14:08 +08:00
*/
interface ViteEnv {
2021-10-16 16:16:58 +08:00
VITE_PORT: number;
VITE_PUBLIC_PATH: string;
2021-12-14 10:51:07 +08:00
VITE_ROUTER_HISTORY: string;
VITE_CDN: boolean;
2023-05-12 13:27:40 +08:00
VITE_HIDE_HOME: string;
VITE_COMPRESSION: ViteCompression;
2021-10-16 16:16:58 +08:00
}
2022-11-26 19:14:08 +08:00
/**
* `@pureadmin/table` `TableColumns` 便
*/
interface TableColumnList extends Array<TableColumns> {}
/**
2024-03-09 16:27:52 +08:00
* `public/platform-config.json`
2024-05-10 12:09:23 +08:00
* @see {@link https://pure-admin.github.io/pure-admin-doc/pages/config/#platform-config-json}
2022-11-26 19:14:08 +08:00
*/
2024-03-09 16:27:52 +08:00
interface PlatformConfigs {
2021-10-16 16:16:58 +08:00
Version?: string;
Title?: string;
FixedHeader?: boolean;
HiddenSideBar?: boolean;
2021-11-28 16:39:26 +08:00
MultiTagsCache?: boolean;
2024-04-22 14:15:05 +08:00
MaxTagsLevel?: number;
2021-10-16 16:16:58 +08:00
KeepAlive?: boolean;
2022-11-26 19:14:08 +08:00
Locale?: string;
2021-10-16 16:16:58 +08:00
Layout?: string;
Theme?: string;
2021-12-22 10:12:52 +08:00
DarkMode?: boolean;
2024-03-09 16:27:52 +08:00
OverallStyle?: string;
Grey?: boolean;
Weak?: boolean;
HideTabs?: boolean;
2024-03-09 16:27:52 +08:00
HideFooter?: boolean;
2024-03-22 20:47:17 +08:00
Stretch?: boolean | number;
2022-01-05 14:17:06 +08:00
SidebarStatus?: boolean;
EpThemeColor?: string;
ShowLogo?: boolean;
ShowModel?: string;
2022-11-26 19:14:08 +08:00
MenuArrowIconNoTransition?: boolean;
CachingAsyncRoutes?: boolean;
2022-12-02 20:20:50 +08:00
TooltipEffect?: Effect;
2023-05-12 13:27:40 +08:00
ResponsiveStorageNameSpace?: string;
2024-03-09 16:27:52 +08:00
MenuSearchHistory?: number;
2021-10-16 16:16:58 +08:00
}
2022-11-26 19:14:08 +08:00
/**
2024-03-09 16:27:52 +08:00
* `PlatformConfigs`
2024-05-10 12:09:23 +08:00
* @see {@link https://pure-admin.github.io/pure-admin-doc/pages/config/#platform-config-json}
2022-11-26 19:14:08 +08:00
*/
interface StorageConfigs {
version?: string;
title?: string;
fixedHeader?: boolean;
hiddenSideBar?: boolean;
multiTagsCache?: boolean;
keepAlive?: boolean;
locale?: string;
layout?: string;
theme?: string;
darkMode?: boolean;
grey?: boolean;
weak?: boolean;
hideTabs?: boolean;
2024-03-09 16:27:52 +08:00
hideFooter?: boolean;
2022-11-26 19:14:08 +08:00
sidebarStatus?: boolean;
epThemeColor?: string;
2024-03-09 16:27:52 +08:00
themeColor?: string;
overallStyle?: string;
2022-11-26 19:14:08 +08:00
showLogo?: boolean;
showModel?: string;
2024-03-09 16:27:52 +08:00
menuSearchHistory?: number;
2022-11-26 19:14:08 +08:00
username?: string;
}
/**
* `responsive-storage` `storage`
*/
interface ResponsiveStorage {
locale: {
locale?: string;
};
layout: {
layout?: string;
theme?: string;
darkMode?: boolean;
sidebarStatus?: boolean;
epThemeColor?: string;
2024-03-09 16:27:52 +08:00
themeColor?: string;
overallStyle?: string;
2022-11-26 19:14:08 +08:00
};
configure: {
grey?: boolean;
weak?: boolean;
hideTabs?: boolean;
2024-03-09 16:27:52 +08:00
hideFooter?: boolean;
2022-11-26 19:14:08 +08:00
showLogo?: boolean;
showModel?: string;
multiTagsCache?: boolean;
2024-03-22 20:47:17 +08:00
stretch?: boolean | number;
2022-11-26 19:14:08 +08:00
};
tags?: Array<any>;
}
/**
* 访
*/
interface GlobalPropertiesApi {
2022-08-22 21:34:55 +08:00
$echarts: ECharts;
$storage: ResponsiveStorage;
2024-03-09 16:27:52 +08:00
$config: PlatformConfigs;
}
/**
* `Element`
*/
interface Element {
// v-ripple 作用于 src/directives/ripple/index.ts 文件
_ripple?: {
enabled?: boolean;
centered?: boolean;
class?: string;
circle?: boolean;
touched?: boolean;
};
2022-08-22 21:34:55 +08:00
}
2022-11-26 19:14:08 +08:00
}