fix(性能测试): 修复顶部菜单样式
This commit is contained in:
parent
900f0ea343
commit
848b840519
|
@ -3,7 +3,7 @@
|
||||||
<el-row type="flex">
|
<el-row type="flex">
|
||||||
<project-change :project-name="currentProject"/>
|
<project-change :project-name="currentProject"/>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" router :default-active='$route.path'>
|
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" router :default-active="pathName">
|
||||||
<el-menu-item :index="'/performance/home'">
|
<el-menu-item :index="'/performance/home'">
|
||||||
{{ $t("i18n.home") }}
|
{{ $t("i18n.home") }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
@ -46,14 +46,25 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentProject: ''
|
currentProject: '',
|
||||||
|
pathName: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
mounted() {
|
watch: {
|
||||||
},
|
'$route': {
|
||||||
beforeDestroy() {
|
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;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue