默认跳转

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> <template>
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" router <el-menu class="header-menu" :unique-opened="true" mode="horizontal" router
:default-active='$route.path'
menu-trigger="click"> 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']"> <el-submenu index="3" popper-class="submenu" v-permission="['test_manager']">
<template slot="title">项目</template> <template slot="title">项目</template>
<recent-project/> <recent-project/>

View File

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