欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-06-27 14:23:02
在 BasicLayout.jsx 文件中修改

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

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

亲测可用!!

 

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

 

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