在 BasicLayout.jsx 文件中修改
<ProLayout layout="topmenu" className="chenshuai2144" disableMobile rightContentRender={ (rightProps) => <RightContent {...rightProps} {...settings} /> } contentStyle={{ margin: 0 }} navTheme="light" > <ProLayout navTheme="light" menuHeaderRender={false} onCollapse={handleMenuCollapse} menuDataRender={menuDataRender} menuItemRender={(menuItemProps, defaultDom) => { if (menuItemProps.isUrl || menuItemProps.children || !menuItemProps.path) { return defaultDom; } return <Link to={menuItemProps.path}>{defaultDom}</Link>; }} {...props} {...settings}> {children} </ProLayout> </ProLayout>
亲测可用!!
大佬!可否赠我十斤代码?