Ant-design-pro: pro-v5中,layout可以设置为side,top,mix,但是有点疑问,配置为top时,nav菜单渲染是在哪里配置?

Created on 24 Aug 2020  ·  6Comments  ·  Source: ant-design/ant-design-pro

🧐 问题描述

默认是mix模式,但是nav的渲染是config.ts的router里配置的么,还是需要手动RightContent里写呢?

💻 示例代码

export default {
navTheme: 'light',
// 拂晓蓝
primaryColor: '#1890ff',
layout: 'mix',
contentWidth: 'Fluid',
fixedHeader: false,
fixSiderbar: true,
colorWeak: false,
menu: {
locale: true,
},
title: 'Ant Design Pro',
pwa: false,
iconfontUrl: '',
} as LayoutSettings & {
pwa: boolean;
};

🚑 其他信息

🕵🏻‍♀️ question

All 6 comments

nav 的渲染是不支持控制的,你有什么需求?

如果我设置为top的话,菜单会位于顶部渲染,设置为side的话,菜单会位于侧边进行渲染
如果是mix的话
比如,侧边是 文件管理 -> 系统文件 -> 图片文件 三级菜单
mix模式下,如果文件管理能放到top,系统文件和图片文件放到左侧side,是不是会好看点

请问你是咋把菜单渲染到顶部的啊?我一直没找到从哪获取路由

splitMenus: true,
自动分割菜单

请问你是咋把菜单渲染到顶部的啊?我一直没找到从哪获取路由

defaultSetting里,layout: 'top', 就可以了

splitMenus: true,
自动分割菜单

哇!!!谢谢!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

2uncle-code picture 2uncle-code  ·  3Comments

suifan picture suifan  ·  3Comments

zhongjiewu picture zhongjiewu  ·  3Comments

skyFi picture skyFi  ·  3Comments

952425340 picture 952425340  ·  3Comments