Commit 1b2e3154 by xue_wengang

菜单激活

parent 9fdf5d22
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
this.topHeader = this.header; this.topHeader = this.header;
this.$bus.$on("routerPath", () => { this.$bus.$on("routerPath", () => {
console.log(sessionStorage.getItem("routerPath")); console.log(sessionStorage.getItem("routerPath"));
this.$refs.menu.activeIndex = sessionStorage.getItem("routerPath"); // this.$refs.menu.activeIndex = sessionStorage.getItem("routerPath");
}); });
}, },
watch: { watch: {
...@@ -143,8 +143,8 @@ export default { ...@@ -143,8 +143,8 @@ export default {
// this.header = val; // this.header = val;
}, },
$route(val) { $route(val) {
this.activeIndex = this.activeIndex =this.$route.name;
sessionStorage.getItem("routerPath") || this.$route.name; debugger
let index = this.topMenus.findIndex((i) => i.id == val.name); let index = this.topMenus.findIndex((i) => i.id == val.name);
if (!val.meta.isAdd && index >= 0) { if (!val.meta.isAdd && index >= 0) {
this.activeName = val.name; this.activeName = val.name;
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
id: "queryRyhx", id: "queryRyhx",
label: "画像工厂", label: "画像工厂",
newAuth: "M01", newAuth: "M01",
index: "2", index: "1",
className: "iconfont icongongnengfuwu", className: "iconfont icongongnengfuwu",
hasChildren: true, hasChildren: true,
children: [ children: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment