From 848b840519b1185a20f9db0d0e063acd70a0abe8 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 26 May 2021 15:52:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B6=E9=83=A8=E8=8F=9C=E5=8D=95=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../head/PerformanceHeaderMenus.vue | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue b/frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue index 41f71a32d0..78dbd52fa8 100644 --- a/frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue +++ b/frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue @@ -3,7 +3,7 @@ - + {{ $t("i18n.home") }} @@ -46,14 +46,25 @@ export default { }, data() { return { - currentProject: '' + currentProject: '', + pathName: '', }; }, methods: {}, - mounted() { + watch: { + '$route': { + immediate: true, + handler(to, from) { + if (to.params && to.params.testId) { + this.pathName = '/performance/test/all'; + } else if (to.params && to.params.reportId) { + this.pathName = '/performance/report/all'; + } else { + this.pathName = to.path; + } + } + } }, - beforeDestroy() { - } };