From 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期三, 16 七月 2025 22:39:23 +0800 Subject: [PATCH] 添加时间筛选 --- src/views/layout/components/Menu/index.vue | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/layout/components/Menu/index.vue b/src/views/layout/components/Menu/index.vue index a37cdcd..5302c98 100644 --- a/src/views/layout/components/Menu/index.vue +++ b/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)); }) -- Gitblit v1.8.0