默认跳转

This commit is contained in:
Captain.B 2020-02-26 15:19:52 +08:00
parent b226f43b8d
commit c4b9b9987c
2 changed files with 5 additions and 10 deletions

View File

@ -1,7 +1,10 @@
<template>
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" router
:default-active='$route.path'
menu-trigger="click">
<el-menu-item index="1"><a href="/" style="text-decoration: none;">{{ $t("i18n.home") }}</a></el-menu-item>
<el-menu-item index="/setting/personsetting">
{{ $t("i18n.home") }}
</el-menu-item>
<el-submenu index="3" popper-class="submenu" v-permission="['test_manager']">
<template slot="title">项目</template>
<recent-project/>

View File

@ -19,6 +19,7 @@ Vue.use(VueRouter);
const router = new VueRouter({
routes: [
{path: "/", redirect: '/setting/personsetting'},
{
path: "/sidebar",
components: {
@ -34,23 +35,14 @@ const router = new VueRouter({
{
path: 'workspace',
component: Workspace,
meta: {
roles: ['org_admin']
}
},
{
path: 'user',
component: User,
meta: {
roles: ['admin']
}
},
{
path: 'organization',
component: Organization,
meta: {
roles: ['admin']
}
},
{
path: 'organizationmember',