Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在使用过程中发现当路由只有一个孩子的时候按照框架的逻辑会将这个孩子的属性用组件进行显示。
但是在大多数情况下如果在路由数组中写法为{path: 'xx', name: 'xx', meta: {title: '父级菜单名'}, children: [{}]},当只有一个孩子的时候,菜单应显示父级菜单名(组件)孩子菜单名(el-menu-item组件)
当在路由数组中没有children属性的时候,将该路由对象用el-menu-item组件显示即可
-这样就能比较好的将路由对象和菜单显示对应起来,使其保持一致