import { Omit, AppTheme, IDictionary, UserDataSourceType } from "../typeDefinition"; /** * 菜单 */ export interface AppMenu { /** 呈现到界面的菜单名称 */ name: string; /** 菜单的图标类型 */ icon?: string; /** 模块Id */ moduleId: string; /** 页面Id, 默认为Main */ pageId?: string; /** 在何处打开链接文档,该值存在时`type`只能为`a` */ target?: "_blank" | "_self" | "_parent" | "_top"; children?: AppMenu[]; } export interface AvatarConfig { name: string; avatar: string; } /** 链接属性 */ export interface ILinkProperty { /** 名称 */ name: string; /** 模块Id */ moduleId?: string; /** 页面Id, 默认为Main */ pageId?: string; /** 自定义显示的图标类型 */ icon?: string; /** 要跳转的链接 */ href?: string; /** 在何处打开链接文档,该值存在时`type`只能为`a` */ target?: "_blank" | "_self" | "_parent" | "_top"; /** 使用的标签,默认是`Link`,站内跳转 */ type?: "a" | "Link"; } export interface AppRightContent { /** 帮助图标 */ help?: Omit; currentUser?: { type: UserDataSourceType; data?: AvatarConfig; }; [key: string]: any; } /** * app.json 配置 * app.json是整个应用的入口配置,可以配置页面列表、菜单列表、全局变量、应用主题等 */ export interface AppConfig { /** 默认标题 */ title: string; /** 系统logo, 默认是公司logo */ logo?: string; /** 应用ico */ ico?: string; /** * 菜单列表,也是全局路由 * 子项可配置权限点、路由路径,名称 */ menus: AppMenu[]; /** * 系统Id */ systemId: string; /** 应用主题,默认: `dark` */ theme?: AppTheme; /** */ layout?: "topmenu"; /** * 全局变量,可通过`app.globalData`调用 */ globalData?: IDictionary; rightContent?: AppRightContent; }