feat(sidebar): 侧边栏图标更换,默认菜单数据增加icon和activeIcon属性

master
钟良源 4 months ago
parent af18bec033
commit 4359fd8247

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -52,6 +52,8 @@ export const menuData2 = [
path: 'componentList', path: 'componentList',
key: 'componentList', key: 'componentList',
parentKey: 'componentList', parentKey: 'componentList',
icon: '/ideContainer/icon/appList.png',
activeIcon: '/ideContainer/icon/appList_active.png',
children: null children: null
// children: [ // children: [
// { // {
@ -76,24 +78,39 @@ export const menuData2 = [
}, },
{ {
title: '组件编码', title: '组件编码',
children: null,
path: 'componentCoding', path: 'componentCoding',
key: 'componentCoding', key: 'componentCoding',
parentKey: 'componentCoding' parentKey: 'componentCoding',
icon: '/ideContainer/icon/componentCoding.png',
activeIcon: '/ideContainer/icon/componentCoding_active.png',
children: null
}, },
{ {
title: '组件部署', title: '组件部署',
children: null,
path: 'componentDeployment', path: 'componentDeployment',
key: 'componentDeployment', key: 'componentDeployment',
parentKey: 'componentDeployment' parentKey: 'componentDeployment',
icon: '/ideContainer/icon/componentDeployment.png',
activeIcon: '/ideContainer/icon/componentDeployment_active.png',
children: null
}, },
{ {
title: '组件测试', title: '组件测试',
children: null,
path: 'componentTest', path: 'componentTest',
key: 'componentTest', key: 'componentTest',
parentKey: 'componentTest' parentKey: 'componentTest',
icon: '/ideContainer/icon/componentTest.png',
activeIcon: '/ideContainer/icon/componentTest_active.png',
children: null
},
{
title: '环境配置',
path: 'envConfig',
key: 'envConfig',
parentKey: 'envConfig',
icon: '/ideContainer/icon/envConfig.png',
activeIcon: '/ideContainer/icon/envConfig_active.png',
children: null
} }
]; ];

@ -30,12 +30,13 @@ const ComponentReview = () => <div style={{ height: '100%', width: '100%' }}>组
const ComponentCoding = () => <div style={{ height: '100%', width: '100%' }}></div>; const ComponentCoding = () => <div style={{ height: '100%', width: '100%' }}></div>;
const ComponentDeployment = () => <div style={{ height: '100%', width: '100%' }}></div>; const ComponentDeployment = () => <div style={{ height: '100%', width: '100%' }}></div>;
const ComponentTest = () => <div style={{ height: '100%', width: '100%' }}></div>; const ComponentTest = () => <div style={{ height: '100%', width: '100%' }}></div>;
const EnvConfig = () => <div style={{ height: '100%', width: '100%' }}></div>;
// 所有可显示的组件路径列表 // 所有可显示的组件路径列表
const ALL_PATHS = [ const ALL_PATHS = [
'compFlow', 'appFlow', 'compList', 'appInstance', 'event', 'globalVar', 'appCompList', 'compFlow', 'appFlow', 'compList', 'appInstance', 'event', 'globalVar', 'appCompList',
'myComponents', 'matchingComponents', 'componentReview', 'componentList', 'myComponents', 'matchingComponents', 'componentReview', 'componentList',
'componentCoding', 'componentDeployment', 'componentTest' 'componentCoding', 'componentDeployment', 'componentTest', 'envConfig'
]; ];
function IDEContainer() { function IDEContainer() {
@ -156,6 +157,8 @@ function IDEContainer() {
return <ComponentDeployment />; return <ComponentDeployment />;
case 'componentTest': case 'componentTest':
return <ComponentTest />; return <ComponentTest />;
case 'envConfig':
return <EnvConfig />;
default: default:
return <div></div>; return <div></div>;
} }

Loading…
Cancel
Save