From 602e5009268ef6280284b37dcbb62eee410da425 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 18 Dec 2020 12:58:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=A6=96=E9=A1=B5=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/api/router.js | 1 - .../components/common/head/HeaderTopMenus.vue | 21 ++++++++++++++----- frontend/src/business/components/xpack | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/frontend/src/business/components/api/router.js b/frontend/src/business/components/api/router.js index ab570f38ac..3b32bbc216 100644 --- a/frontend/src/business/components/api/router.js +++ b/frontend/src/business/components/api/router.js @@ -3,7 +3,6 @@ import MsProject from "@/business/components/settings/project/MsProject"; export default { path: "/api", name: "api", - redirect: "/api/home", components: { content: () => import('@/business/components/api/ApiTest') }, diff --git a/frontend/src/business/components/common/head/HeaderTopMenus.vue b/frontend/src/business/components/common/head/HeaderTopMenus.vue index 57907d9c7a..a8fb2db8eb 100644 --- a/frontend/src/business/components/common/head/HeaderTopMenus.vue +++ b/frontend/src/business/components/common/head/HeaderTopMenus.vue @@ -9,17 +9,17 @@ router> - {{$t('test_track.test_track')}} + {{ $t('test_track.test_track') }} - - {{$t('commons.api')}} + + {{ $t('commons.api') }} - {{$t('commons.performance')}} + {{ $t('commons.performance') }} - {{$t('commons.system_setting')}} + {{ $t('commons.system_setting') }} @@ -47,7 +47,18 @@ }, methods: { handleSelect(index) { + console.log(index) this.activeIndex = index + + }, + active() { + if (this.activeIndex === '/api') { + if (this.$store.state.switch.value == 'new') { + window.location.href = "/#/api/home"; + } else if (this.$store.state.switch.value == 'old') { + window.location.href = "/#/api/home_obsolete"; + } + } } } } diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index d39dafaf84..010ad7a5f0 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit d39dafaf84b9c7a56cb51f2caf67dd7dfde5938c +Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433