src/views/layout/components/Menu/index.vue
@@ -102,8 +102,13 @@ watch: { $route() { this.handleSelect(this.$route.fullPath) } }, '$route.path'(toPath, fromPath) { this.handleSelect(toPath) this.$router.push({ path: toPath }) }, }, methods: { handleSelect(path) { this.isActive = path @@ -112,8 +117,6 @@ const userName = sessionStorage.getItem('name'); users.getMenu({ name: userName }) .then(res => { // console.log(res) // debugger this.menuList = res.menus; sessionStorage.setItem('user', JSON.stringify(res)); })