mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 17:05:54 +08:00
fix: 🐛 修复商家端菜单切换之后active样式丢失问题
This commit is contained in:
@@ -33,6 +33,7 @@ import util from "@/libs/util.js";
|
||||
export default {
|
||||
name: "shrinkableMenu",
|
||||
computed: {
|
||||
|
||||
// 二级菜单列表
|
||||
menuList() {
|
||||
return this.$store.state.app.menuList;
|
||||
@@ -54,7 +55,7 @@ export default {
|
||||
this.selectNav(val.meta.firstRouterName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeMenu(name) { //二级路由点击
|
||||
@@ -63,12 +64,10 @@ export default {
|
||||
});
|
||||
},
|
||||
selectNav(name) { // 一级路由点击
|
||||
this.$store.commit("childrenMenu",this.$refs.childrenMenu)
|
||||
this.$store.commit("setCurrNav", name);
|
||||
this.setStore("currNav", name);
|
||||
util.initRouter(this);
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.childrenMenu.updateActiveName()
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user