diff --git a/src/pages/ideContainer/config/menuData.ts b/src/pages/ideContainer/config/menuData.ts
index 3ffc73c..36d4d5e 100644
--- a/src/pages/ideContainer/config/menuData.ts
+++ b/src/pages/ideContainer/config/menuData.ts
@@ -54,7 +54,7 @@ export const menuData1 = [
parentKey: 'event'
},
{
- title: '全局变量',
+ title: '全局参数',
children: null,
path: 'globalVar',
key: 'globalVar',
diff --git a/src/pages/ideContainer/index.tsx b/src/pages/ideContainer/index.tsx
index 18688ef..635a56d 100644
--- a/src/pages/ideContainer/index.tsx
+++ b/src/pages/ideContainer/index.tsx
@@ -109,7 +109,7 @@ function IDEContainer() {
backgroundColor: '#ffffff'
}}>
= ({ selected, identity, subMenuData, onMe
v.key = `compFlow-${v.id}`;
v.path = 'compFlow';
v.parentKey = subMenuKey;
+ v.icon = '/ideContainer/icon/app.png';
v.children = [
{
title: '事件',
- children: null
+ children: null,
+ icon: '/ideContainer/icon/list.png'
},
{
title: '组件列表',
- children: null
+ children: null,
+ icon: '/ideContainer/icon/list.png'
}
];
});
@@ -243,16 +246,19 @@ const SideBar: React.FC = ({ selected, identity, subMenuData, onMe
children.children[0].children = res.data.events.map(item => {
return {
title: item,
- children: null
+ children: null,
+ icon: '/ideContainer/icon/list.png'
};
});
children.children[1].children = Object.keys(res.data.compList).map(item => {
return {
title: compTypeMap[item],
+ icon: item === 'appComponent' ? '/ideContainer/icon/app1.png' : '/ideContainer/icon/complexApp.png',
children: res.data.compList[item].map(item => {
return {
title: item,
- children: null
+ children: null,
+ icon: '/ideContainer/icon/tool.png'
};
})
};
@@ -265,6 +271,7 @@ const SideBar: React.FC = ({ selected, identity, subMenuData, onMe
// 同时更新本地 menu 状态以触发重新渲染
setMenu(prevMenu => {
+ console.log('prevMenu:', prevMenu);
const newMenu = [...prevMenu];
newMenu[activeKey] = { ...newMenu[activeKey], children: currentMenu[index].children };
return newMenu;
@@ -284,13 +291,23 @@ const SideBar: React.FC = ({ selected, identity, subMenuData, onMe
};
if (item.children && item.children.length > 0) {
return (
-
+ : null}
+ >
{renderMenuItems(item.children, key)}
);
}
else {
- return ;
+ return ( : null}
+ />);
}
});
}
@@ -317,7 +334,11 @@ const SideBar: React.FC = ({ selected, identity, subMenuData, onMe
setModalType('EDIT');
setShowModal(true);
}}
- >编辑信息
+ >
+
+
+ 编辑信息
+
);