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

asyncRoutes加载的路由,无法显示在侧边栏上 #3035

Closed
gsdukbh opened this issue Mar 5, 2020 · 4 comments
Closed

asyncRoutes加载的路由,无法显示在侧边栏上 #3035

gsdukbh opened this issue Mar 5, 2020 · 4 comments

Comments

@gsdukbh
Copy link

gsdukbh commented Mar 5, 2020

Bug report(问题描述)

asyncRoutes加载的路由,无法显示在侧边栏上

Steps to reproduce(问题复现步骤)

Screenshot or Gif(截图或动态图)

image

Link to minimal reproduction(最小可在线还原demo)

export const asyncRoutes = [
{
path: '/home',
name: 'sccc',
component: Layout,
meta: {
title: '管理员',
icon: 'dashboard',
roles: ['ROLE_ADMIN'],
},
children: [
{
path: '/user',
name: 'scc',
component: Home,
meta: {
title: 's',
}
}
]
},
{
path: '/121',
name: '121',
component: Layout,
// hidden:true,
meta: {
title: '登录ssss',
roles: ['ROLE_ADMIN'],

    }
},}

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:
  • vue-element-admin version:最新
@gsdukbh gsdukbh closed this as completed Mar 5, 2020
@gsdukbh
Copy link
Author

gsdukbh commented Mar 5, 2020

已经解决

@MuggleTan
Copy link

请问是哪里的问题呢,我也碰到了

@guoshuaiping
Copy link

求指点,哪里的问题?我也遇到了,好容易过了next({ ...to, replace: true })死循环的坑,现在有遇到这个问题了,fk

@guoshuaiping
Copy link

guoshuaiping commented Oct 19, 2021

这个问题我知道了,需要修改下slidebar组件代码中遍历路由那块儿,修改后的关键点如下图。参考的其他人的:https://www.i4k.xyz/article/qq_40981137/104976733

image

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

No branches or pull requests

3 participants