Open zakihong opened 7 months ago
菜单配置中需要有个一个 /flows 相关的菜单,比如 {id: 2, parentId: 1, title: '菜单名称', path: '/flows', order: 900, type: 1},
已经配置了,{ menuId: 40, menuName: '发布单', menuPath: '/flows', pMenuId: 4, }, { menuId: 44, menuName: '发布单详情', menuPath: '/flows/:id', pMenuId: 4, type: 1, }, 刷新详情页面的时候,左侧菜单既不展开也不选中,怎么解决,求指导
左侧菜单是你自定义了吗?还是用框架自带的? 我这里无法复现,是不存在这个问题的
我是定义了一个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,
}这样
我使用的你之前很早的框架
@ra-lib/xxx的库可以尝试更新一下
我用的@ra-lib
@config({ path: '/flows/:id', selectedMenuPath: '/flows', side: true, title: { text: '详情' }, })