diff --git a/public/ideContainer/icon/appComp.png b/public/ideContainer/icon/appComp.png new file mode 100644 index 0000000..2ade7cc Binary files /dev/null and b/public/ideContainer/icon/appComp.png differ diff --git a/public/ideContainer/icon/appComp_active.png b/public/ideContainer/icon/appComp_active.png new file mode 100644 index 0000000..e89cfae Binary files /dev/null and b/public/ideContainer/icon/appComp_active.png differ diff --git a/public/ideContainer/icon/appEvent.png b/public/ideContainer/icon/appEvent.png new file mode 100644 index 0000000..338b9ca Binary files /dev/null and b/public/ideContainer/icon/appEvent.png differ diff --git a/public/ideContainer/icon/appEvent_active.png b/public/ideContainer/icon/appEvent_active.png new file mode 100644 index 0000000..c547ba7 Binary files /dev/null and b/public/ideContainer/icon/appEvent_active.png differ diff --git a/public/ideContainer/icon/appFlow.png b/public/ideContainer/icon/appFlow.png new file mode 100644 index 0000000..be10a24 Binary files /dev/null and b/public/ideContainer/icon/appFlow.png differ diff --git a/public/ideContainer/icon/appFlow_active.png b/public/ideContainer/icon/appFlow_active.png new file mode 100644 index 0000000..f74dcef Binary files /dev/null and b/public/ideContainer/icon/appFlow_active.png differ diff --git a/public/ideContainer/icon/appList.png b/public/ideContainer/icon/appList.png new file mode 100644 index 0000000..1411e74 Binary files /dev/null and b/public/ideContainer/icon/appList.png differ diff --git a/public/ideContainer/icon/appList_active.png b/public/ideContainer/icon/appList_active.png new file mode 100644 index 0000000..ec80db8 Binary files /dev/null and b/public/ideContainer/icon/appList_active.png differ diff --git a/public/ideContainer/icon/globalVar.png b/public/ideContainer/icon/globalVar.png new file mode 100644 index 0000000..b12b287 Binary files /dev/null and b/public/ideContainer/icon/globalVar.png differ diff --git a/public/ideContainer/icon/globalVar_active.png b/public/ideContainer/icon/globalVar_active.png new file mode 100644 index 0000000..f4665df Binary files /dev/null and b/public/ideContainer/icon/globalVar_active.png differ diff --git a/src/pages/ideContainer/config/menuData.ts b/src/pages/ideContainer/config/menuData.ts index cff58d3..68c9239 100644 --- a/src/pages/ideContainer/config/menuData.ts +++ b/src/pages/ideContainer/config/menuData.ts @@ -4,68 +4,45 @@ export const menuData1 = [ path: '', key: 'appList', parentKey: 'appList', - children: [ - { - title: '应用A', - path: 'compFlow', - key: 'compFlow', - parentKey: 'appList', - children: [ - { - title: '事件', - children: null - }, - { - title: '组件列表', - children: null - } - ] - }, - { - title: '应用B', - path: 'compFlow', - key: 'compFlow', - parentKey: 'appList', - children: [ - { - title: '事件', - children: null - }, - { - title: '组件列表', - children: null - } - ] - } - ] + icon: '/ideContainer/icon/appList.png', + activeIcon: '/ideContainer/icon/appList_active.png', + children: [] }, { title: '应用编排', + path: 'appFlow', key: 'appFlow', parentKey: 'appFlow', - children: null, - path: 'appFlow' + icon: '/ideContainer/icon/appFlow.png', + activeIcon: '/ideContainer/icon/appFlow_active.png', + children: null }, { title: '事件', - children: null, path: 'event', key: 'event', - parentKey: 'event' + parentKey: 'event', + icon: '/ideContainer/icon/appEvent.png', + activeIcon: '/ideContainer/icon/appEvent_active.png', + children: null }, { title: '全局参数', - children: null, path: 'globalVar', key: 'globalVar', - parentKey: 'globalVar' + parentKey: 'globalVar', + icon: '/ideContainer/icon/globalVar.png', + activeIcon: '/ideContainer/icon/globalVar_active.png', + children: null }, { title: '组件', - children: null, path: 'appCompList', key: 'appCompList', - parentKey: 'appCompList' + parentKey: 'appCompList', + icon: '/ideContainer/icon/appComp.png', + activeIcon: '/ideContainer/icon/appComp_active.png', + children: null } ]; diff --git a/src/pages/ideContainer/sideBar.tsx b/src/pages/ideContainer/sideBar.tsx index 744b702..caf2490 100644 --- a/src/pages/ideContainer/sideBar.tsx +++ b/src/pages/ideContainer/sideBar.tsx @@ -412,9 +412,14 @@ const SideBar: React.FC = ({ onClick={() => handleMenuItemClick(item, index)} >
- + {item.icon && + } + {!item.icon && ( + {item.icon || } + )} {item.title}