import React from 'react'; import { MenuDataType } from '@music163/tango-helpers'; import { TabsProps } from 'antd'; export interface ComponentsPanelProps { /** * 菜单数据 */ menuData: MenuDataType; /** * 展示业务组件分类 */ showBizComps?: boolean; /** * 动态加载物料 loading,避免未加载完成用户点击空列表 */ loading?: boolean; /** * 设置业务组件调用名 * @param name * @returns */ getBizCompName?: (name: string) => string; /** * 是否局部模式 (快捷添加组件面板中使用) */ isScope?: boolean; /** * 组件选中回调 */ onItemSelect?: (name: string) => void; /** * 自定义样式 */ style?: React.CSSProperties; /** * tabProps */ tabProps?: TabsProps; /** * 布局模式,默认网格布局 */ layout?: 'grid' | 'line'; } export declare function useFlatMenuData(menuData: T): { title: string; items: string[]; }[]; export declare const ComponentsPanel: (({ isScope, menuData, showBizComps, getBizCompName, loading, style, tabProps, onItemSelect, layout, }: ComponentsPanelProps) => React.JSX.Element) & { displayName: string; };