code: function () {
              var self = this, cur = self, last;
              do {
                  // 沿着 menu，menuitem 链
                  last = cur;
                  cur = cur.get('parent');
              } while (cur && (cur.isMenuItem || cur.isMenu));
              return last;
          }
docs: 根菜单 popupmenu 或者到中间的 menu 菜单