2024-04-17 00:20:59 +08:00
|
|
|
/* ts命名空间 */
|
|
|
|
|
/* 路由-Menu */
|
|
|
|
|
declare namespace Menu {
|
|
|
|
|
interface MenuOptions {
|
|
|
|
|
path: string;
|
|
|
|
|
name: string;
|
|
|
|
|
redirect?: string;
|
|
|
|
|
component?: string | (() => Promise<unknown>);
|
|
|
|
|
meta: MetaType;
|
|
|
|
|
children?: MenuOptions[];
|
|
|
|
|
}
|
|
|
|
|
interface MetaType {
|
|
|
|
|
title: string;
|
2024-04-21 16:08:59 +08:00
|
|
|
hide: boolean;
|
|
|
|
|
keepAlive: boolean;
|
|
|
|
|
affix: boolean;
|
|
|
|
|
link?: string;
|
|
|
|
|
iframe?: boolean;
|
2024-04-17 00:20:59 +08:00
|
|
|
roles: Array<string>;
|
|
|
|
|
icon?: string;
|
|
|
|
|
svgIcon?: string;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-04-21 16:08:59 +08:00
|
|
|
/* tabs菜单 */
|
|
|
|
|
declare namespace TabsMenu {
|
|
|
|
|
interface list {
|
|
|
|
|
list: Array<{ type: number; icon: string; title: string }>;
|
|
|
|
|
}
|
|
|
|
|
interface menu {
|
|
|
|
|
type: number;
|
|
|
|
|
icon: string;
|
|
|
|
|
title: string;
|
|
|
|
|
}
|
|
|
|
|
}
|