/** * @author linhd * @date 2021/8/10 14:24 * @description 菜单参数 */ import React, { ReactNode } from 'react'; /** 菜单类型 */ export type MenuListTypeType = 'redirect' | 'router' | 'iframe' | 'snack' | 'snackPage'; /** 菜单列表项参数 */ export interface MenuChildrenProps { /** 样式class */ className?: string; /** 菜单名 */ label?: ReactNode; /** 菜单类型 */ type?: MenuListTypeType; /** 菜单路径 */ path?: string; /** href */ href?: string; /** 菜单图标 */ icon?: ReactNode; /** 菜单组件 */ component?: any; /** 子菜单 */ children?: MenuChildrenProps[]; /** 菜单最后一层所有上下级 一条线 */ idMenuLast?: any; /** 当前选中菜单 */ selectMenu?: string; /** 点击菜单 */ onClickMenu?: (item: MenuChildrenProps | false) => void; [name: string]: any; } /** 菜单列表参数 */ export interface MenuListProps { /** 菜单列表参数 */ list?: MenuChildrenProps[]; /** 当前选中菜单 */ selectMenu?: string; /** 点击菜单 */ onClickMenu?: (item: MenuChildrenProps | false) => void; /** 样式class */ className?: string; /** 自定义更多内容 */ moreCustomize?: ReactNode; [name: string]: any; } /** 语言 */ export interface LanguageItemProps { /** 图标 */ icon?: ReactNode; /** 文字 */ label?: ReactNode; /** 值 */ value?: string; [name: string]: any; } /** 语言 */ export interface LanguageProps { /** 样式class */ className?: string; /** 当前选中的语言 */ selectLang?: string; /** 语言列表 */ language?: LanguageItemProps[]; /** 点击下拉语言 */ onClick?: (val: any, item: LanguageItemProps) => void; /** 自定义 */ render?: ReactNode; } export interface BackSelfcareProps { /** 图标 */ icon?: ReactNode; /** 标题 */ label?: ReactNode; /** 自定义 */ render?: ReactNode; /** 样式class */ className?: string; /** 点击事件 */ onClick?: (e: any) => void; } /** 帮助 */ export interface HelpProps { /** 图标 */ icon?: ReactNode; /** 标题 */ label?: ReactNode; /** 自定义 */ render?: ReactNode; /** 样式class */ className?: string; /** 点击事件 */ onClick?: (e: any) => void; } /** 按钮listItem */ export interface BtnListItemProps { /** 图标 */ icon?: ReactNode; /** 标题 */ label?: ReactNode; /** 值 */ value?: string; /** 标记 */ sign?: boolean; [name: string]: any; } /** 按钮列表 */ export interface BtnListProps { /** 按钮list */ list?: BtnListItemProps[]; /** 自定义 */ render?: ReactNode; /** 样式class */ className?: string; /** 点击事件 */ onClick?: (item: BtnListItemProps, e: any) => void; } /** 用户下拉菜单 */ export interface UserListProps { /** 图标 */ icon?: ReactNode; /** 标题 */ label?: ReactNode; /** 值 */ value?: string; /** 子菜单 */ children?: UserListProps[]; [name: string]: any; } /** 用户信息 */ export interface UserProps { /** 样式class */ className?: string; /** 图片地址 */ img?: string; /** imgRender */ imgRender?: ReactNode; /** 显示名 */ label?: ReactNode; /** 自定义 */ render?: ReactNode; /** 下拉菜单选中的值 */ selectValue?: any; /** 下拉菜单 */ list?: UserListProps[]; /** 点击用户 */ onClick?: (e: any) => void; /** 点击下拉菜单 */ onClickMenu?: (val: any, item: UserListProps) => void; } /** 尾部导航 */ export interface FooterProps { /** 样式class */ className?: string; /** 返回自助参数 */ backSelfcareProps?: BackSelfcareProps; /** 语言参数 */ languageProps?: LanguageProps; /** 按钮list */ btnListProps?: BtnListProps; /** 用户参数 */ userProps?: UserProps; /** 帮助 */ helpProps?: HelpProps; /** 自定义 */ render?: ReactNode; } /** 菜单参数 */ export interface PageHeaderProps { /** 样式class */ className?: string; /** style */ style?: React.CSSProperties; /** 当前选中菜单 */ selectMenu?: string; /** 左侧自定义内容 */ leftRender?: ReactNode; /** 菜单配置 */ menuListProps?: MenuListProps; /** 右侧参数 */ footerProps?: FooterProps; /** 点击菜单 */ onClickMenu?: (item: MenuChildrenProps | false) => void; }