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

列表页跳转详情页,当刷新页面菜单不选中 #154

Open
zakihong opened this issue Mar 20, 2024 · 7 comments
Open

列表页跳转详情页,当刷新页面菜单不选中 #154

zakihong opened this issue Mar 20, 2024 · 7 comments

Comments

@zakihong
Copy link

@config({
path: '/flows/:id',
selectedMenuPath: '/flows',
side: true,
title: { text: '详情' },
})

@zkboys
Copy link
Contributor

zkboys commented Mar 20, 2024

菜单配置中需要有个一个 /flows 相关的菜单,比如 {id: 2, parentId: 1, title: '菜单名称', path: '/flows', order: 900, type: 1},

@zakihong
Copy link
Author

已经配置了,{
menuId: 40,
menuName: '发布单',
menuPath: '/flows',
pMenuId: 4,
},
{
menuId: 44,
menuName: '发布单详情',
menuPath: '/flows/:id',
pMenuId: 4,
type: 1,
}, 刷新详情页面的时候,左侧菜单既不展开也不选中,怎么解决,求指导

@zkboys
Copy link
Contributor

zkboys commented Mar 20, 2024

左侧菜单是你自定义了吗?还是用框架自带的?
我这里无法复现,是不存在这个问题的
image

@zakihong
Copy link
Author

我是定义了一个MenuConfig{
menuId: 4,
menuName: '变更管理',
menuPath: '',
pMenuId: 0,
subs: [
{
menuId: 40,
menuName: '发布单',
menuPath: '/flows',
pMenuId: 4,
},
{
menuId: 44,
menuName: '发布单详情',
menuPath: '/flows/:id',
pMenuId: 4,
type: 1,
},
{
menuId: 41,
menuName: '变更登记',
menuPath: '/history',
pMenuId: 4,
},
{
menuId: 42,
menuName: '变更日志',
menuPath: '/logs',
pMenuId: 4,
},
],
},然后在App.js中转成{
id: node.menuId,
order: 100 - i,
type: 1,
parentKey: ${node.pMenuId},
key: ${node.menuId},
text: node.menuName,
path: node.menuPath,
}这样

@zakihong
Copy link
Author

我使用的你之前很早的框架
image

@zkboys
Copy link
Contributor

zkboys commented Mar 20, 2024

@ra-lib/xxx的库可以尝试更新一下

@zakihong
Copy link
Author

我用的@RA-LIB

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

2 participants