Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

稍微修改了下菜单的显示问题,和路由写法保持一致 #712

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Mr-lq7
Copy link

@Mr-lq7 Mr-lq7 commented Dec 27, 2021

  • 在使用过程中发现当路由只有一个孩子的时候按照框架的逻辑会将这个孩子的属性用组件进行显示。

  • 但是在大多数情况下如果在路由数组中写法为{path: 'xx', name: 'xx', meta: {title: '父级菜单名'}, children: [{}]},当只有一个孩子的时候,菜单应显示父级菜单名(组件)孩子菜单名(el-menu-item组件)

  • 当在路由数组中没有children属性的时候,将该路由对象用el-menu-item组件显示即可

-这样就能比较好的将路由对象和菜单显示对应起来,使其保持一致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant