去掉无用代码
This commit is contained in:
parent
8e52fc7266
commit
74a49ae13f
|
@ -2,38 +2,35 @@
|
|||
<div id="menu-bar">
|
||||
<el-row type="flex">
|
||||
<el-col :span="8">
|
||||
<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='$route.path'
|
||||
menu-trigger="click">
|
||||
<el-menu-item :index="'/api/home'">
|
||||
{{ $t("i18n.home") }}
|
||||
</el-menu-item>
|
||||
|
||||
<el-submenu v-if="isCurrentWorkspaceUser"
|
||||
index="3" popper-class="submenu">
|
||||
<el-submenu v-if="isCurrentWorkspaceUser" index="3">
|
||||
<template v-slot:title>{{$t('commons.project')}}</template>
|
||||
<ms-recent-list :options="projectRecent"/>
|
||||
<el-divider/>
|
||||
<el-divider class="menu-divider"/>
|
||||
<ms-show-all :index="'/api/project/all'"/>
|
||||
<ms-create-button v-permission="['test_manager', 'test_user']" :index="'/api/project/create'" :title="$t('project.create')"/>
|
||||
<ms-create-button v-permission="['test_manager', 'test_user']" :index="'/api/project/create'"
|
||||
:title="$t('project.create')"/>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu v-if="isCurrentWorkspaceUser"
|
||||
index="4" popper-class="submenu">
|
||||
<el-submenu v-if="isCurrentWorkspaceUser" index="4">
|
||||
<template v-slot:title>{{$t('commons.test')}}</template>
|
||||
<ms-recent-list :options="testRecent"/>
|
||||
<el-divider/>
|
||||
<el-divider class="menu-divider"/>
|
||||
<ms-show-all :index="'/api/test/list/all'"/>
|
||||
<ms-create-button v-permission="['test_manager', 'test_user']" :index="'/api/test/create'" :title="$t('load_test.create')"/>
|
||||
<!-- <el-menu-item :index="testCaseProjectPath" class="blank_item"></el-menu-item>-->
|
||||
<!-- <el-menu-item :index="testEditPath" class="blank_item"></el-menu-item>-->
|
||||
<ms-create-button v-permission="['test_manager', 'test_user']" :index="'/api/test/create'"
|
||||
:title="$t('load_test.create')"/>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu v-if="isCurrentWorkspaceUser"
|
||||
index="5" popper-class="submenu">
|
||||
<el-submenu v-if="isCurrentWorkspaceUser" index="5">
|
||||
<template v-slot:title>{{$t('commons.report')}}</template>
|
||||
<ms-recent-list :options="reportRecent"/>
|
||||
<el-divider/>
|
||||
<el-divider class="menu-divider"/>
|
||||
<ms-show-all :index="'/api/report/list/all'"/>
|
||||
<!-- <el-menu-item :index="reportViewPath" class="blank_item"></el-menu-item>-->
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
@ -62,10 +59,6 @@
|
|||
data() {
|
||||
return {
|
||||
isCurrentWorkspaceUser: false,
|
||||
// testCaseProjectPath: '',
|
||||
// testEditPath: '',
|
||||
// reportViewPath: '',
|
||||
// isRouterAlive: true,
|
||||
projectRecent: {
|
||||
title: this.$t('project.recent'),
|
||||
url: "/project/recent/5",
|
||||
|
@ -96,55 +89,20 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// '$route'(to, from) {
|
||||
// let path = to.path;
|
||||
// //激活菜单栏
|
||||
// if (path.indexOf("/api/test/") >= 0) {
|
||||
// this.testCaseProjectPath = '/api/test/' + this.$route.params.projectId;
|
||||
// this.reload();
|
||||
// }
|
||||
// if (path.indexOf("/api/test/edit/") >= 0) {
|
||||
// this.testEditPath = '/api/test/edit/' + this.$route.params.testId;
|
||||
// this.reload();
|
||||
// }
|
||||
// if (path.indexOf("/api/report/view/") >= 0) {
|
||||
// this.reportViewPath = '/api/report/view/' + this.$route.params.reportId;
|
||||
// this.reload();
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
|
||||
},
|
||||
// methods: {
|
||||
// reload() {
|
||||
// this.isRouterAlive = false;
|
||||
// this.$nextTick(function () {
|
||||
// this.isRouterAlive = true;
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.el-menu.el-menu--horizontal {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#menu-bar {
|
||||
border-bottom: 1px solid #E6E6E6;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.blank_item {
|
||||
display: none;
|
||||
.menu-divider {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue