zhanghua
2023-12-12 122faf2b3a03f7ef381d70a38684fe0b70d42ebc
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));
                })