remove permission param of router.config.js

pull/9/head
ruibaby 2019-03-20 22:36:09 +08:00
parent 2f24ff9610
commit 7d7f75c972
1 changed files with 20 additions and 20 deletions

View File

@ -25,31 +25,31 @@ export const asyncRouterMap = [
name: 'posts', name: 'posts',
redirect: '/posts/list', redirect: '/posts/list',
component: RouteView, component: RouteView,
meta: { title: '文章', icon: 'form', permission: [ 'form' ] }, meta: { title: '文章', icon: 'form' },
children: [ children: [
{ {
path: '/posts/list', path: '/posts/list',
name: 'PostList', name: 'PostList',
component: () => import('@/views/post/PostList'), component: () => import('@/views/post/PostList'),
meta: { title: '所有文章', hiddenHeaderContent: true, permission: [ 'form' ] } meta: { title: '所有文章', hiddenHeaderContent: true }
}, },
{ {
path: '/posts/write', path: '/posts/write',
name: 'PostEdit', name: 'PostEdit',
component: () => import('@/views/post/PostEdit'), component: () => import('@/views/post/PostEdit'),
meta: { title: '写文章', hiddenHeaderContent: true, permission: [ 'form' ] } meta: { title: '写文章', hiddenHeaderContent: true }
}, },
{ {
path: '/categories', path: '/categories',
name: 'CategoryList', name: 'CategoryList',
component: () => import('@/views/post/CategoryList'), component: () => import('@/views/post/CategoryList'),
meta: { title: '分类目录', hiddenHeaderContent: true, permission: [ 'form' ] } meta: { title: '分类目录', hiddenHeaderContent: true }
}, },
{ {
path: '/tags', path: '/tags',
name: 'TagList', name: 'TagList',
component: () => import('@/views/post/TagList'), component: () => import('@/views/post/TagList'),
meta: { title: '标签', hiddenHeaderContent: true, permission: [ 'form' ] } meta: { title: '标签', hiddenHeaderContent: true }
} }
] ]
}, },
@ -60,19 +60,19 @@ export const asyncRouterMap = [
name: 'pages', name: 'pages',
component: RouteView, component: RouteView,
redirect: '/pages/list', redirect: '/pages/list',
meta: { title: '页面', icon: 'read', permission: [ 'table' ] }, meta: { title: '页面', icon: 'read' },
children: [ children: [
{ {
path: '/pages/list', path: '/pages/list',
name: 'PageList', name: 'PageList',
component: () => import('@/views/page/PageList'), component: () => import('@/views/page/PageList'),
meta: { title: '所有页面', hiddenHeaderContent: true, permission: [ 'table' ] } meta: { title: '所有页面', hiddenHeaderContent: true }
}, },
{ {
path: '/pages/write', path: '/pages/write',
name: 'PageEdit', name: 'PageEdit',
component: () => import('@/views/page/PageEdit'), component: () => import('@/views/page/PageEdit'),
meta: { title: '新建页面', hiddenHeaderContent: true, permission: [ 'table' ] } meta: { title: '新建页面', hiddenHeaderContent: true }
} }
] ]
}, },
@ -82,7 +82,7 @@ export const asyncRouterMap = [
path: '/attachments', path: '/attachments',
name: 'attachments', name: 'attachments',
component: () => import('@/views/attachment/AttachmentList'), component: () => import('@/views/attachment/AttachmentList'),
meta: { title: '附件', icon: 'picture', hiddenHeaderContent: true, permission: [ 'profile' ] } meta: { title: '附件', icon: 'picture', hiddenHeaderContent: true }
}, },
// comments // comments
@ -90,7 +90,7 @@ export const asyncRouterMap = [
path: '/comments', path: '/comments',
name: 'comments', name: 'comments',
component: () => import('@/views/comment/CommentList'), component: () => import('@/views/comment/CommentList'),
meta: { title: '评论', icon: 'message', hiddenHeaderContent: true, permission: [ 'profile' ] } meta: { title: '评论', icon: 'message', hiddenHeaderContent: true }
}, },
// interface // interface
@ -99,25 +99,25 @@ export const asyncRouterMap = [
name: 'interface', name: 'interface',
component: RouteView, component: RouteView,
redirect: '/interface/themes', redirect: '/interface/themes',
meta: { title: '外观', icon: 'skin', permission: [ 'result' ] }, meta: { title: '外观', icon: 'skin' },
children: [ children: [
{ {
path: '/interface/themes', path: '/interface/themes',
name: 'ThemeList', name: 'ThemeList',
component: () => import('@/views/interface/ThemeList'), component: () => import('@/views/interface/ThemeList'),
meta: { title: '主题', hiddenHeaderContent: true, permission: [ 'result' ] } meta: { title: '主题', hiddenHeaderContent: true }
}, },
{ {
path: '/interface/menus', path: '/interface/menus',
name: 'MenuList', name: 'MenuList',
component: () => import('@/views/interface/MenuList'), component: () => import('@/views/interface/MenuList'),
meta: { title: '菜单', hiddenHeaderContent: true, permission: [ 'result' ] } meta: { title: '菜单', hiddenHeaderContent: true }
}, },
{ {
path: '/interface/themes/edit', path: '/interface/themes/edit',
name: 'ThemeEdit', name: 'ThemeEdit',
component: () => import('@/views/interface/ThemeEdit'), component: () => import('@/views/interface/ThemeEdit'),
meta: { title: '主题编辑', hiddenHeaderContent: true, permission: [ 'result' ] } meta: { title: '主题编辑', hiddenHeaderContent: true }
} }
] ]
}, },
@ -128,13 +128,13 @@ export const asyncRouterMap = [
name: 'user', name: 'user',
component: RouteView, component: RouteView,
redirect: '/user/profile', redirect: '/user/profile',
meta: { title: '用户', icon: 'user', permission: [ 'exception' ] }, meta: { title: '用户', icon: 'user' },
children: [ children: [
{ {
path: '/user/profile', path: '/user/profile',
name: 'Profile', name: 'Profile',
component: () => import('@/views/user/Profile'), component: () => import('@/views/user/Profile'),
meta: { title: '个人资料', hiddenHeaderContent: true, permission: [ 'exception' ] } meta: { title: '个人资料', hiddenHeaderContent: true }
} }
] ]
}, },
@ -145,25 +145,25 @@ export const asyncRouterMap = [
name: 'options', name: 'options',
component: RouteView, component: RouteView,
redirect: '/system/options', redirect: '/system/options',
meta: { title: '系统', icon: 'setting', permission: [ 'user' ] }, meta: { title: '系统', icon: 'setting' },
children: [ children: [
{ {
path: '/system/options', path: '/system/options',
name: 'OptionForm', name: 'OptionForm',
component: () => import('@/views/system/OptionForm'), component: () => import('@/views/system/OptionForm'),
meta: { title: '博客设置', hiddenHeaderContent: true, permission: [ 'user' ] } meta: { title: '博客设置', hiddenHeaderContent: true }
}, },
{ {
path: '/system/backup', path: '/system/backup',
name: 'BackupList', name: 'BackupList',
component: () => import('@/views/system/BackupList'), component: () => import('@/views/system/BackupList'),
meta: { title: '博客备份', hiddenHeaderContent: true, permission: [ 'user' ] } meta: { title: '博客备份', hiddenHeaderContent: true }
}, },
{ {
path: '/system/tools', path: '/system/tools',
name: 'ToolList', name: 'ToolList',
component: () => import('@/views/system/ToolList'), component: () => import('@/views/system/ToolList'),
meta: { title: '小工具', hiddenHeaderContent: true, permission: [ 'user' ] } meta: { title: '小工具', hiddenHeaderContent: true }
} }
] ]
} }