router roles demo

This commit is contained in:
Captain.B 2020-02-12 16:27:51 +08:00
parent 7579953c51
commit 57af617fed
1 changed files with 8 additions and 3 deletions

View File

@ -18,10 +18,14 @@ const router = new VueRouter({
{ {
path: "/content", components: { path: "/content", components: {
content: Setting content: Setting
}, children: [ },
children: [
{ {
path: 'workspace', path: 'workspace',
component: Workspace component: Workspace,
meta: {
roles: ['admin']
}
}, },
{ {
path: 'user', path: 'user',
@ -33,7 +37,8 @@ const router = new VueRouter({
path: "/createTest", components: { path: "/createTest", components: {
content: CreateTestPlan content: CreateTestPlan
} }
},] },
]
}); });
export default router export default router