|
|
@@ -81,15 +81,19 @@ class ConfigSider extends React.Component {
|
|
|
}
|
|
|
|
|
|
generateMenuOptions = (menuTree) => {
|
|
|
- return menuTree.map(t => {
|
|
|
+ let menuList = [];
|
|
|
+ menuTree.forEach(t => {
|
|
|
t.children = t.children instanceof Array ? t.children : [];
|
|
|
- return {
|
|
|
- key: t.code,
|
|
|
- value: t.code,
|
|
|
- label: t.name,
|
|
|
- children: this.generateMenuOptions(t.children)
|
|
|
+ if(t.type === 'menu') {
|
|
|
+ menuList.push({
|
|
|
+ key: t.code,
|
|
|
+ value: t.code,
|
|
|
+ label: t.name,
|
|
|
+ children: this.generateMenuOptions(t.children)
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
+ return menuList;
|
|
|
}
|
|
|
|
|
|
getParens = (menu) => {
|