Commit 32918e44 authored by 拷钉's avatar 拷钉 Committed by 陈帅

修复:有多个layout时,如果其中一个layout中没有routes,将发收到另一个layout的菜单 (#3724)

parent 3708b6f9
......@@ -8,6 +8,9 @@ const { check } = Authorized;
// Conversion router to menu.
function formatter(data, parentAuthority, parentName) {
if (!data) {
return undefined;
}
return data
.map(item => {
if (!item.name || !item.path) {
......@@ -75,6 +78,9 @@ const filterMenuData = menuData => {
* @param {Object} menuData 菜单配置
*/
const getBreadcrumbNameMap = menuData => {
if (!menuData) {
return {};
}
const routerMap = {};
const flattenMenuData = data => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment