@lambo-design/shared 1.0.0-beta.277 → 1.0.0-beta.278
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/menu/index.js +2 -11
package/package.json
CHANGED
package/utils/menu/index.js
CHANGED
|
@@ -97,17 +97,8 @@ const listToMenuTree = (list, menuTree, pageNode, parentId, crumbs, root, appId,
|
|
|
97
97
|
list.forEach(item => {
|
|
98
98
|
let appIdCondition = !appId || item.appId == appId || appId.indexOf(item.appId) > -1;//过滤是否要求的应用
|
|
99
99
|
let hideInMenuCondition = !(item.hasOwnProperty("hideInMenu") && item.hideInMenu);//过滤是否隐藏的菜单
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
try{
|
|
103
|
-
hideInIbp = JSON.parse(item.extendProps).hideInIbp=== '1';
|
|
104
|
-
}catch (error){
|
|
105
|
-
console.log('Json解析失败:',item);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
item.hideInMenu = hideInIbp || item.hideInMenu;
|
|
109
|
-
if ((!hideInIbp) && (generateType && generateType == 'router' && appIdCondition) ||
|
|
110
|
-
(generateType == 'menu' && appIdCondition && hideInMenuCondition)) {
|
|
100
|
+
if ((generateType && generateType == 'router' && appIdCondition) ||
|
|
101
|
+
(generateType == 'menu' && appIdCondition && hideInMenuCondition)) {
|
|
111
102
|
// 判断是否为父级菜单
|
|
112
103
|
if (item.pid === parentId) {
|
|
113
104
|
if (item.type === 1 || item.type === 2) {
|