From ff7cb3011a476d8b2531ff0fcf13303caea049b0 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Fri, 25 Sep 2020 17:08:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=86=8D=E6=AC=A1=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=B7=A6=E4=BE=A7=E8=8F=9C=E5=8D=95=E5=88=B7?= =?UTF-8?q?=E6=96=B0=20&=20panel=E4=B8=8B=E6=8B=89=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/leftMenu.vue | 13 +++++--- .../src/components/page/dashboard/panel.vue | 30 ++++++++++++++++--- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/nezha-fronted/src/components/common/leftMenu.vue b/nezha-fronted/src/components/common/leftMenu.vue index f54e17f24..e49c4f23c 100644 --- a/nezha-fronted/src/components/common/leftMenu.vue +++ b/nezha-fronted/src/components/common/leftMenu.vue @@ -136,7 +136,7 @@
- +
@@ -187,6 +187,7 @@ tagCheckMap:{}, lastCheckSize:0, assetPingSwitch:true, + isRouterAlive: true } }, computed: { @@ -619,15 +620,19 @@ } }, jumpTo(route) { - /*bus.$emit("menu-change", route); - localStorage.setItem('nz-parent-menu', this.parentMenu); - localStorage.setItem('nz-menu-change', route);*/ + if(route == this.route){ + this.reload(); + } this.$router.push({ path: route, query: { t: +new Date() } }); + }, + reload () { + this.isRouterAlive = false + this.$nextTick(() => (this.isRouterAlive = true)) } }, } diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index 6b086e04e..1acf67fb5 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -6,13 +6,19 @@