import { ReactNode } from "react" interface IMenuItem { id: string, label: string | ReactNode, /** 如果label是ReactNode,需要指定title字段 */ title?: string disabled?: boolean, icon?: ReactNode, isSubMenu?: boolean pid?: string | null [key: string]: any } export interface IDashBoard { menuConfig: { theme?: "light" | "dark" // 菜单主题 selectedKeys?: string[] // 当前选中的节点 openKeys?: string[] // 当前打开的节点 dataSource: IMenuItem[] // 菜单数据源 } /** 切换菜单时触发 */ onChange?: (params: { value: string, menuItem: IMenuItem }) => void /** 内容区域div的属性id */ contentId: string /** 组件最大高度,如:document.body.clientHeight - 80 */ height: number | string }