Commit f424f4f4 by 冒粤蓉

fix breacrumb

1 parent 818234ba
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
let matched = this.$route.matched.filter(item => item.name); // this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录 let matched = this.$route.matched.filter(item => item.name); // this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
const first = matched[0]; const first = matched[0];
const { meta, path } = first; const { meta, path } = first;
const basePath = '/oEshield#'; const basePath = '/system#';
let breadcrumb = []; let breadcrumb = [];
if(meta) { if(meta) {
const { title, pushState } = meta; const { title, pushState } = meta;
...@@ -58,7 +58,9 @@ export default { ...@@ -58,7 +58,9 @@ export default {
name: title, name: title,
path: basePath + path path: basePath + path
}) })
this.$root.parentVuex.dispatch('menu/setBreadCrumb', [...curBreadCrumb, breadcrumb[0]]); history.state.pushState = pushState;
history.state.breadcrumb = [...curBreadCrumb, breadcrumb[0]];
// this.$root.parentVuex.dispatch('menu/setBreadCrumb', [...curBreadCrumb, breadcrumb[0]]);
} }
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!