Ant Design Pro:Layout 组件——嵌套布局


在   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>

亲测可用!!

 

大佬!可否赠我十斤代码?

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM