code: function formatter(data, parentAuthority, parentName) {
    if (!data) {
      return undefined;
    }
    return data
      .map(item => {
        if (!item.name || !item.path) {
          return null;
        }
  
        let locale = 'menu';
        if (parentName && parentName !== '/') {
          locale = `${parentName}.${item.name}`;
        } else {
          locale = `menu.${item.name}`;
        }
        const result = {
          ...item,
          title:locale
        };
        if (item.routes) {
          const children = formatter(item.routes, item.authority, locale);
          // Reduce memory usage
          result.children = children;
        }
        delete result.routes;
        return result;
      })
      .filter(item => item);
  }
docs: Conversion router to menu.