set name to PascalCase

pull/976/head
Pan 2018-08-17 17:25:34 +08:00
parent 8b8e005b19
commit df71d7a4e4
6 changed files with 57 additions and 57 deletions

View File

@ -31,7 +31,7 @@ export default {
getBreadcrumb() { getBreadcrumb() {
let matched = this.$route.matched.filter(item => item.name) let matched = this.$route.matched.filter(item => item.name)
const first = matched[0] const first = matched[0]
if (first && first.name !== 'dashboard') { if (first && first.name.trim().toLocaleLowerCase() !== 'Dashboard'.toLocaleLowerCase()) {
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched) matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)
} }
this.levelList = matched this.levelList = matched

View File

@ -59,7 +59,7 @@ export const constantRouterMap = [
{ {
path: 'dashboard', path: 'dashboard',
component: () => import('@/views/dashboard/index'), component: () => import('@/views/dashboard/index'),
name: 'dashboard', name: 'Dashboard',
meta: { title: 'dashboard', icon: 'dashboard', noCache: true } meta: { title: 'dashboard', icon: 'dashboard', noCache: true }
} }
] ]
@ -72,7 +72,7 @@ export const constantRouterMap = [
{ {
path: 'index', path: 'index',
component: () => import('@/views/documentation/index'), component: () => import('@/views/documentation/index'),
name: 'documentation', name: 'Documentation',
meta: { title: 'documentation', icon: 'documentation', noCache: true } meta: { title: 'documentation', icon: 'documentation', noCache: true }
} }
] ]
@ -85,7 +85,7 @@ export const constantRouterMap = [
{ {
path: 'index', path: 'index',
component: () => import('@/views/guide/index'), component: () => import('@/views/guide/index'),
name: 'guide', name: 'Guide',
meta: { title: 'guide', icon: 'guide', noCache: true } meta: { title: 'guide', icon: 'guide', noCache: true }
} }
] ]
@ -113,7 +113,7 @@ export const asyncRouterMap = [
{ {
path: 'page', path: 'page',
component: () => import('@/views/permission/page'), component: () => import('@/views/permission/page'),
name: 'pagePermission', name: 'PagePermission',
meta: { meta: {
title: 'pagePermission', title: 'pagePermission',
roles: ['admin'] // or you can only set roles in sub nav roles: ['admin'] // or you can only set roles in sub nav
@ -122,7 +122,7 @@ export const asyncRouterMap = [
{ {
path: 'directive', path: 'directive',
component: () => import('@/views/permission/directive'), component: () => import('@/views/permission/directive'),
name: 'directivePermission', name: 'DirectivePermission',
meta: { meta: {
title: 'directivePermission' title: 'directivePermission'
// if do not set roles, means: this page does not require permission // if do not set roles, means: this page does not require permission
@ -138,7 +138,7 @@ export const asyncRouterMap = [
{ {
path: 'index', path: 'index',
component: () => import('@/views/svg-icons/index'), component: () => import('@/views/svg-icons/index'),
name: 'icons', name: 'Icons',
meta: { title: 'icons', icon: 'icon', noCache: true } meta: { title: 'icons', icon: 'icon', noCache: true }
} }
] ]
@ -154,7 +154,7 @@ export const asyncRouterMap = [
path: '/example', path: '/example',
component: Layout, component: Layout,
redirect: '/example/list', redirect: '/example/list',
name: 'example', name: 'Example',
meta: { meta: {
title: 'example', title: 'example',
icon: 'example' icon: 'example'
@ -163,20 +163,20 @@ export const asyncRouterMap = [
{ {
path: 'create', path: 'create',
component: () => import('@/views/example/create'), component: () => import('@/views/example/create'),
name: 'createArticle', name: 'CreateArticle',
meta: { title: 'createArticle', icon: 'edit' } meta: { title: 'createArticle', icon: 'edit' }
}, },
{ {
path: 'edit/:id(\\d+)', path: 'edit/:id(\\d+)',
component: () => import('@/views/example/edit'), component: () => import('@/views/example/edit'),
name: 'editArticle', name: 'EditArticle',
meta: { title: 'editArticle', noCache: true }, meta: { title: 'editArticle', noCache: true },
hidden: true hidden: true
}, },
{ {
path: 'list', path: 'list',
component: () => import('@/views/example/list'), component: () => import('@/views/example/list'),
name: 'articleList', name: 'ArticleList',
meta: { title: 'articleList', icon: 'list' } meta: { title: 'articleList', icon: 'list' }
} }
] ]
@ -189,7 +189,7 @@ export const asyncRouterMap = [
{ {
path: 'index', path: 'index',
component: () => import('@/views/tab/index'), component: () => import('@/views/tab/index'),
name: 'tab', name: 'Tab',
meta: { title: 'tab', icon: 'tab' } meta: { title: 'tab', icon: 'tab' }
} }
] ]
@ -199,7 +199,7 @@ export const asyncRouterMap = [
path: '/error', path: '/error',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'errorPages', name: 'ErrorPages',
meta: { meta: {
title: 'errorPages', title: 'errorPages',
icon: '404' icon: '404'
@ -208,13 +208,13 @@ export const asyncRouterMap = [
{ {
path: '401', path: '401',
component: () => import('@/views/errorPage/401'), component: () => import('@/views/errorPage/401'),
name: 'page401', name: 'Page401',
meta: { title: 'page401', noCache: true } meta: { title: 'page401', noCache: true }
}, },
{ {
path: '404', path: '404',
component: () => import('@/views/errorPage/404'), component: () => import('@/views/errorPage/404'),
name: 'page404', name: 'Page404',
meta: { title: 'page404', noCache: true } meta: { title: 'page404', noCache: true }
} }
] ]
@ -228,7 +228,7 @@ export const asyncRouterMap = [
{ {
path: 'log', path: 'log',
component: () => import('@/views/errorLog/index'), component: () => import('@/views/errorLog/index'),
name: 'errorLog', name: 'ErrorLog',
meta: { title: 'errorLog', icon: 'bug' } meta: { title: 'errorLog', icon: 'bug' }
} }
] ]
@ -238,7 +238,7 @@ export const asyncRouterMap = [
path: '/excel', path: '/excel',
component: Layout, component: Layout,
redirect: '/excel/export-excel', redirect: '/excel/export-excel',
name: 'excel', name: 'Excel',
meta: { meta: {
title: 'excel', title: 'excel',
icon: 'excel' icon: 'excel'
@ -247,19 +247,19 @@ export const asyncRouterMap = [
{ {
path: 'export-excel', path: 'export-excel',
component: () => import('@/views/excel/exportExcel'), component: () => import('@/views/excel/exportExcel'),
name: 'exportExcel', name: 'ExportExcel',
meta: { title: 'exportExcel' } meta: { title: 'exportExcel' }
}, },
{ {
path: 'export-selected-excel', path: 'export-selected-excel',
component: () => import('@/views/excel/selectExcel'), component: () => import('@/views/excel/selectExcel'),
name: 'selectExcel', name: 'EelectExcel',
meta: { title: 'selectExcel' } meta: { title: 'selectExcel' }
}, },
{ {
path: 'upload-excel', path: 'upload-excel',
component: () => import('@/views/excel/uploadExcel'), component: () => import('@/views/excel/uploadExcel'),
name: 'uploadExcel', name: 'UploadExcel',
meta: { title: 'uploadExcel' } meta: { title: 'uploadExcel' }
} }
] ]
@ -275,7 +275,7 @@ export const asyncRouterMap = [
{ {
path: 'download', path: 'download',
component: () => import('@/views/zip/index'), component: () => import('@/views/zip/index'),
name: 'exportZip', name: 'ExportZip',
meta: { title: 'exportZip' } meta: { title: 'exportZip' }
} }
] ]
@ -289,7 +289,7 @@ export const asyncRouterMap = [
{ {
path: 'index', path: 'index',
component: () => import('@/views/theme/index'), component: () => import('@/views/theme/index'),
name: 'theme', name: 'Theme',
meta: { title: 'theme', icon: 'theme' } meta: { title: 'theme', icon: 'theme' }
} }
] ]
@ -303,7 +303,7 @@ export const asyncRouterMap = [
{ {
path: 'index', path: 'index',
component: () => import('@/views/clipboard/index'), component: () => import('@/views/clipboard/index'),
name: 'clipboardDemo', name: 'ClipboardDemo',
meta: { title: 'clipboardDemo', icon: 'clipboard' } meta: { title: 'clipboardDemo', icon: 'clipboard' }
} }
] ]
@ -316,7 +316,7 @@ export const asyncRouterMap = [
{ {
path: 'index', path: 'index',
component: () => import('@/views/i18n-demo/index'), component: () => import('@/views/i18n-demo/index'),
name: 'i18n', name: 'I18n',
meta: { title: 'i18n', icon: 'international' } meta: { title: 'i18n', icon: 'international' }
} }
] ]

View File

@ -6,7 +6,7 @@ const chartsRouter = {
path: '/charts', path: '/charts',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'charts', name: 'Charts',
meta: { meta: {
title: 'charts', title: 'charts',
icon: 'chart' icon: 'chart'
@ -15,19 +15,19 @@ const chartsRouter = {
{ {
path: 'keyboard', path: 'keyboard',
component: () => import('@/views/charts/keyboard'), component: () => import('@/views/charts/keyboard'),
name: 'keyboardChart', name: 'KeyboardChart',
meta: { title: 'keyboardChart', noCache: true } meta: { title: 'keyboardChart', noCache: true }
}, },
{ {
path: 'line', path: 'line',
component: () => import('@/views/charts/line'), component: () => import('@/views/charts/line'),
name: 'lineChart', name: 'LineChart',
meta: { title: 'lineChart', noCache: true } meta: { title: 'lineChart', noCache: true }
}, },
{ {
path: 'mixchart', path: 'mixchart',
component: () => import('@/views/charts/mixChart'), component: () => import('@/views/charts/mixChart'),
name: 'mixChart', name: 'MixChart',
meta: { title: 'mixChart', noCache: true } meta: { title: 'mixChart', noCache: true }
} }
] ]

View File

@ -6,7 +6,7 @@ const componentsRouter = {
path: '/components', path: '/components',
component: Layout, component: Layout,
redirect: 'noredirect', redirect: 'noredirect',
name: 'component-demo', name: 'ComponentDemo',
meta: { meta: {
title: 'components', title: 'components',
icon: 'component' icon: 'component'
@ -15,79 +15,79 @@ const componentsRouter = {
{ {
path: 'tinymce', path: 'tinymce',
component: () => import('@/views/components-demo/tinymce'), component: () => import('@/views/components-demo/tinymce'),
name: 'tinymce-demo', name: 'TinymceDemo',
meta: { title: 'tinymce' } meta: { title: 'tinymce' }
}, },
{ {
path: 'markdown', path: 'markdown',
component: () => import('@/views/components-demo/markdown'), component: () => import('@/views/components-demo/markdown'),
name: 'markdown-demo', name: 'MarkdownDemo',
meta: { title: 'markdown' } meta: { title: 'markdown' }
}, },
{ {
path: 'json-editor', path: 'json-editor',
component: () => import('@/views/components-demo/jsonEditor'), component: () => import('@/views/components-demo/jsonEditor'),
name: 'jsonEditor-demo', name: 'JsonEditorDemo',
meta: { title: 'jsonEditor' } meta: { title: 'jsonEditor' }
}, },
{ {
path: 'splitpane', path: 'splitpane',
component: () => import('@/views/components-demo/splitpane'), component: () => import('@/views/components-demo/splitpane'),
name: 'splitpane-demo', name: 'SplitpaneDemo',
meta: { title: 'splitPane' } meta: { title: 'splitPane' }
}, },
{ {
path: 'avatar-upload', path: 'avatar-upload',
component: () => import('@/views/components-demo/avatarUpload'), component: () => import('@/views/components-demo/avatarUpload'),
name: 'avatarUpload-demo', name: 'AvatarUploadDemo',
meta: { title: 'avatarUpload' } meta: { title: 'avatarUpload' }
}, },
{ {
path: 'dropzone', path: 'dropzone',
component: () => import('@/views/components-demo/dropzone'), component: () => import('@/views/components-demo/dropzone'),
name: 'dropzone-demo', name: 'DropzoneDemo',
meta: { title: 'dropzone' } meta: { title: 'dropzone' }
}, },
{ {
path: 'sticky', path: 'sticky',
component: () => import('@/views/components-demo/sticky'), component: () => import('@/views/components-demo/sticky'),
name: 'sticky-demo', name: 'StickyDemo',
meta: { title: 'sticky' } meta: { title: 'sticky' }
}, },
{ {
path: 'count-to', path: 'count-to',
component: () => import('@/views/components-demo/countTo'), component: () => import('@/views/components-demo/countTo'),
name: 'countTo-demo', name: 'CountToDemo',
meta: { title: 'countTo' } meta: { title: 'countTo' }
}, },
{ {
path: 'mixin', path: 'mixin',
component: () => import('@/views/components-demo/mixin'), component: () => import('@/views/components-demo/mixin'),
name: 'componentMixin-demo', name: 'ComponentMixinDemo',
meta: { title: 'componentMixin' } meta: { title: 'componentMixin' }
}, },
{ {
path: 'back-to-top', path: 'back-to-top',
component: () => import('@/views/components-demo/backToTop'), component: () => import('@/views/components-demo/backToTop'),
name: 'backToTop-demo', name: 'BackToTopDemo',
meta: { title: 'backToTop' } meta: { title: 'backToTop' }
}, },
{ {
path: 'drag-dialog', path: 'drag-dialog',
component: () => import('@/views/components-demo/dragDialog'), component: () => import('@/views/components-demo/dragDialog'),
name: 'dragDialog-demo', name: 'DragDialogDemo',
meta: { title: 'dragDialog' } meta: { title: 'dragDialog' }
}, },
{ {
path: 'dnd-list', path: 'dnd-list',
component: () => import('@/views/components-demo/dndList'), component: () => import('@/views/components-demo/dndList'),
name: 'dndList-demo', name: 'DndListDemo',
meta: { title: 'dndList' } meta: { title: 'dndList' }
}, },
{ {
path: 'drag-kanban', path: 'drag-kanban',
component: () => import('@/views/components-demo/dragKanban'), component: () => import('@/views/components-demo/dragKanban'),
name: 'dragKanban-demo', name: 'DragKanbanDemo',
meta: { title: 'dragKanban' } meta: { title: 'dragKanban' }
} }
] ]

View File

@ -6,7 +6,7 @@ const nestedRouter = {
path: '/nested', path: '/nested',
component: Layout, component: Layout,
redirect: '/nested/menu1/menu1-1', redirect: '/nested/menu1/menu1-1',
name: 'nested', name: 'Nested',
meta: { meta: {
title: 'nested', title: 'nested',
icon: 'nested' icon: 'nested'
@ -15,33 +15,33 @@ const nestedRouter = {
{ {
path: 'menu1', path: 'menu1',
component: () => import('@/views/nested/menu1/index'), // Parent router-view component: () => import('@/views/nested/menu1/index'), // Parent router-view
name: 'menu1', name: 'Menu1',
meta: { title: 'menu1' }, meta: { title: 'menu1' },
redirect: '/nested/menu1/menu1-1', redirect: '/nested/menu1/menu1-1',
children: [ children: [
{ {
path: 'menu1-1', path: 'menu1-1',
component: () => import('@/views/nested/menu1/menu1-1'), component: () => import('@/views/nested/menu1/menu1-1'),
name: 'menu1-1', name: 'Menu1-1',
meta: { title: 'menu1-1' } meta: { title: 'menu1-1' }
}, },
{ {
path: 'menu1-2', path: 'menu1-2',
component: () => import('@/views/nested/menu1/menu1-2'), component: () => import('@/views/nested/menu1/menu1-2'),
name: 'menu1-2', name: 'Menu1-2',
redirect: '/nested/menu1/menu1-2/menu1-2-1', redirect: '/nested/menu1/menu1-2/menu1-2-1',
meta: { title: 'menu1-2' }, meta: { title: 'menu1-2' },
children: [ children: [
{ {
path: 'menu1-2-1', path: 'menu1-2-1',
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'), component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
name: 'menu1-2-1', name: 'Menu1-2-1',
meta: { title: 'menu1-2-1' } meta: { title: 'menu1-2-1' }
}, },
{ {
path: 'menu1-2-2', path: 'menu1-2-2',
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'), component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
name: 'menu1-2-2', name: 'Menu1-2-2',
meta: { title: 'menu1-2-2' } meta: { title: 'menu1-2-2' }
} }
] ]
@ -49,14 +49,14 @@ const nestedRouter = {
{ {
path: 'menu1-3', path: 'menu1-3',
component: () => import('@/views/nested/menu1/menu1-3'), component: () => import('@/views/nested/menu1/menu1-3'),
name: 'menu1-3', name: 'Menu1-3',
meta: { title: 'menu1-3' } meta: { title: 'menu1-3' }
} }
] ]
}, },
{ {
path: 'menu2', path: 'menu2',
name: 'menu2', name: 'Menu2',
component: () => import('@/views/nested/menu2/index'), component: () => import('@/views/nested/menu2/index'),
meta: { title: 'menu2' } meta: { title: 'menu2' }
} }

View File

@ -6,7 +6,7 @@ const tableRouter = {
path: '/table', path: '/table',
component: Layout, component: Layout,
redirect: '/table/complex-table', redirect: '/table/complex-table',
name: 'table', name: 'Table',
meta: { meta: {
title: 'Table', title: 'Table',
icon: 'table' icon: 'table'
@ -15,37 +15,37 @@ const tableRouter = {
{ {
path: 'dynamic-table', path: 'dynamic-table',
component: () => import('@/views/table/dynamicTable/index'), component: () => import('@/views/table/dynamicTable/index'),
name: 'dynamicTable', name: 'DynamicTable',
meta: { title: 'dynamicTable' } meta: { title: 'dynamicTable' }
}, },
{ {
path: 'drag-table', path: 'drag-table',
component: () => import('@/views/table/dragTable'), component: () => import('@/views/table/dragTable'),
name: 'dragTable', name: 'DragTable',
meta: { title: 'dragTable' } meta: { title: 'dragTable' }
}, },
{ {
path: 'inline-edit-table', path: 'inline-edit-table',
component: () => import('@/views/table/inlineEditTable'), component: () => import('@/views/table/inlineEditTable'),
name: 'inlineEditTable', name: 'InlineEditTable',
meta: { title: 'inlineEditTable' } meta: { title: 'inlineEditTable' }
}, },
{ {
path: 'tree-table', path: 'tree-table',
component: () => import('@/views/table/treeTable/treeTable'), component: () => import('@/views/table/treeTable/treeTable'),
name: 'treeTableDemo', name: 'TreeTableDemo',
meta: { title: 'treeTable' } meta: { title: 'treeTable' }
}, },
{ {
path: 'custom-tree-table', path: 'custom-tree-table',
component: () => import('@/views/table/treeTable/customTreeTable'), component: () => import('@/views/table/treeTable/customTreeTable'),
name: 'customTreeTableDemo', name: 'CustomTreeTableDemo',
meta: { title: 'customTreeTable' } meta: { title: 'customTreeTable' }
}, },
{ {
path: 'complex-table', path: 'complex-table',
component: () => import('@/views/table/complexTable'), component: () => import('@/views/table/complexTable'),
name: 'complexTable', name: 'ComplexTable',
meta: { title: 'complexTable' } meta: { title: 'complexTable' }
} }
] ]