From 5151cbd29fd38d25966a6d688c360990a54019c3 Mon Sep 17 00:00:00 2001 From: sc Date: Fri, 15 Oct 2021 10:53:50 +0800 Subject: [PATCH] =?UTF-8?q?FIX=20=E8=8F=9C=E5=8D=95=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=9C=AA=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/index.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/layout/index.vue b/src/layout/index.vue index 4ab70904..6cb5c7a9 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -25,7 +25,7 @@
- + @@ -60,7 +60,7 @@
- + @@ -96,7 +96,7 @@
- +
@@ -130,7 +130,7 @@
- + @@ -182,7 +182,8 @@ settingDialog: false, menu: [], nextMenu: [], - pmenu: {} + pmenu: {}, + active: '' } }, computed:{ @@ -236,6 +237,9 @@ var home = this.$router.options.routes[0].children[0]; this.pmenu = this.$route.matched[1] || home; this.nextMenu = this.filterUrl(this.pmenu.children); + this.$nextTick(()=>{ + this.active = this.$route.meta.active || this.$route.fullPath; + }) }, //点击显示 showMenu(route) {