MCPcopy Create free account
hub / github.com/ModelEngine-Group/app-platform / getMenu

Function getMenu

agent-flow/src/components/Header.jsx:115–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 * @return {*} 菜单项
114 */
115 const getMenu = () => {
116 const items = shape.drawer.getToolMenus().map(toolMenu => {
117 const menu = {
118 key: toolMenu.key,
119 label: t(toolMenu.label),
120 popupClassName: 'react-node-header-menu-sub',
121 popupOffset: [10, 0],
122 };
123 toolMenu.children && (menu.children = toolMenu.children);
124 toolMenu.onTitleClick && (menu.onTitleClick = toolMenu.onTitleClick);
125 return menu;
126 });
127 return {items, onClick: (e) => onMenuClick(e), onOpenChange, triggerSubMenuAction: 'click'};
128 };
129
130 /**
131 * 展示菜单.

Callers 1

showMenusFunction · 0.85

Calls 2

onMenuClickFunction · 0.85
mapMethod · 0.65

Tested by

no test coverage detected