1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
angular.forEach(rightOptions.options,
function
(v,k){
_label = v.group;
var
subInsertMenus = {};
if
(!rightMenus[_label]){
//判断父节点是否存在
subMenu(v);
subInsertMenus[v.label] = srm;
var
rm = {
"label"
: _label,
"separator_before"
:
false
,
"separator_after"
:
false
,
"submenu"
:subInsertMenus
};
rightMenus[_label] = rm;
}
else
{
subMenu(v);
rightMenus[_label].submenu[v.label] = srm;
}
});
|
本文转自 爱笑嘚蛋蛋 51CTO博客,原文链接:http://blog.51cto.com/dd118/2051721,如需转载请自行联系原作者