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;
     }
});