diff --git a/klp-ui/src/layout/components/SubNav.vue b/klp-ui/src/layout/components/SubNav.vue index cc90bc73..424d4eef 100644 --- a/klp-ui/src/layout/components/SubNav.vue +++ b/klp-ui/src/layout/components/SubNav.vue @@ -146,10 +146,18 @@ export default { const ownPath = c.path.startsWith('/') ? c.path : path.resolve(parentPath, c.path) const title = (c.meta && c.meta.title) || c.name || c.path const hasChildren = c.children && c.children.length > 0 && c.children.some(gc => !gc.hidden) + let routeFullPath = ownPath + if (c.query) { + try { + routeFullPath = { path: ownPath, query: JSON.parse(c.query) } + } catch (e) { + routeFullPath = ownPath + } + } const item = { ...c, _ownPath: ownPath, - _fullPath: ownPath, + _fullPath: routeFullPath, _title: title, _hasChildren: hasChildren } diff --git a/klp-ui/src/views/redirectMenu.vue b/klp-ui/src/views/redirectMenu.vue index cfba940d..ea9851a6 100644 --- a/klp-ui/src/views/redirectMenu.vue +++ b/klp-ui/src/views/redirectMenu.vue @@ -75,10 +75,18 @@ export default { const ownPath = c.path.startsWith('/') ? c.path : path.resolve(parentPath, c.path) const title = (c.meta && c.meta.title) || c.name || c.path || '' const hasChildren = c.children && c.children.length > 0 && c.children.some(gc => !gc.hidden) + let routeFullPath = ownPath + if (c.query) { + try { + routeFullPath = { path: ownPath, query: JSON.parse(c.query) } + } catch (e) { + routeFullPath = ownPath + } + } const item = { ...c, _ownPath: ownPath, - _fullPath: ownPath, + _fullPath: routeFullPath, _title: title, _hasChildren: hasChildren }