ebike-plus-ui/src/typings/global.d.ts
WANGFAN\wangf 75335797e0 feat: rbac
2025-04-10 16:57:26 +08:00

50 lines
1.1 KiB
TypeScript

/* ts命名空间 */
/* 路由-Menu */
declare namespace Menu {
interface MenuOptions {
id: string;
parentId: string;
path: string;
name: string;
redirect?: string;
component?: string | (() => Promise<unknown>);
meta: MetaType;
children?: MenuOptions[] | null | any;
}
interface MetaType {
title: string;
hide: boolean;
disable: boolean;
keepAlive: boolean;
affix: boolean;
link?: string;
iframe?: boolean;
roles: Array<string>;
icon?: string;
svgIcon?: string;
sort?: number;
type?: number;
}
}
/* tabs菜单 */
declare namespace TabsMenu {
interface list {
list: Array<{ type: number; icon: string; title: string }>;
}
interface menu {
type: number;
icon: string;
title: string;
}
}
/* viteEnv */
interface ViteEnv {
VITE_GLOB_APP_TITLE: string;
VITE_IMG_BASE_URL: string;
VITE_APP_OPEN_MOCK: boolean | string;
VITE_USER_NODE_ENV: "development" | "production" | "test";
VITE_PUBLIC_PATH: string;
VITE_APP_BASE_URL: string;
}