npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

robo-galaxy-menu

v1.0.20

Published

```bash npm install robo-galaxy-menu yarn add robo-galaxy-menu ``` > 以下使用在@ant-design/pro-components: "^2.3.57"得到验证 ### 如何使用 通常在`app.tsx`文件中antd pro 暴露的`layout`函数中添加对`menuRender`的函数定义 ```typescript import { ProMenu } from "robo-galaxy-menu"; import routes

Downloads

1

Readme

快速开始

npm install robo-galaxy-menu
yarn add robo-galaxy-menu

以下使用在@ant-design/pro-components: "^2.3.57"得到验证

如何使用

通常在app.tsx文件中antd pro 暴露的layout函数中添加对menuRender的函数定义

import { ProMenu } from "robo-galaxy-menu";
import routes from "../config/routes"; // 引入原始route文件

export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => {
    //...other functions
    menuRender: (props) => {return <ProMenu 
      headerHeight={58} // header高度
      siderWidth={props.siderWidth} 
      menuData={props.menuData} 
      routes={routes}
    />},
}

更换icon图标

  1. 创建icon
import Icon from "@ant-design/icons";
import React from "react";
import { ReactComponent as ListIconSvg } from "../../public/icons/list.svg";

export const ListIcon = () => <Icon component={ListIconSvg} />;
  1. 加入到组件中
const iconMap = {
  listTest: <ListIcon />
}

export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => {
    //...other function
    menuRender: (props) => {return <ProMenu 
      headerHeight={58} // header高度
      siderWidth={props.siderWidth} 
      menuData={props.menuData} 
      routes={routes}
      iconMap={iconMap}
    />},

添加自定义header(对应antd pro 中menuExtraRender方法)

export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => {
    //...other function
    menuRender: (props) => {return <ProMenu 
      headerHeight={58} // header高度
      siderWidth={props.siderWidth} 
      menuData={props.menuData} 
      routes={routes}
      iconMap={iconMap}
      menuExtraRender={<YourHeaderComponent />}
    />},

注意

使用改组件后会导致menuItemRendermenuFooterRender, collapsedButtonRender, actionsRender, onCollapse, collapsed, defaultCollapsed, iconfontUrl, actionRef方法失效

可能还存在其他失效的方法,可以及时反馈给库所有者

其他

如果存在运行Bug或无法满足需求的情况,请向库所有者提需求