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