提交 602e5009 编写于 作者: W wenyann

fix:首页切换

上级 3db39fb2
......@@ -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')
},
......
......@@ -9,17 +9,17 @@
router>
<el-menu-item index="/track" v-permission="['test_manager','test_user','test_viewer']">
{{$t('test_track.test_track')}}
{{ $t('test_track.test_track') }}
</el-menu-item>
<el-menu-item index="/api" v-permission="['test_manager','test_user','test_viewer']">
{{$t('commons.api')}}
<el-menu-item index="/api" @click="active()" v-permission="['test_manager','test_user','test_viewer']">
{{ $t('commons.api') }}
</el-menu-item>
<el-menu-item index="/performance" onselectstart="return false"
v-permission="['test_manager','test_user','test_viewer']">
{{$t('commons.performance')}}
{{ $t('commons.performance') }}
</el-menu-item>
<el-menu-item index="/setting" onselectstart="return false">
{{$t('commons.system_setting')}}
{{ $t('commons.system_setting') }}
</el-menu-item>
</el-menu>
</template>
......@@ -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";
}
}
}
}
}
......
Subproject commit d39dafaf84b9c7a56cb51f2caf67dd7dfde5938c
Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册