refactor: add eslint-plugin-vue && lint code (#976)
This commit is contained in:
@@ -59,7 +59,7 @@ export const constantRouterMap = [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: () => import('@/views/dashboard/index'),
|
||||
name: 'dashboard',
|
||||
name: 'Dashboard',
|
||||
meta: { title: 'dashboard', icon: 'dashboard', noCache: true }
|
||||
}
|
||||
]
|
||||
@@ -72,7 +72,7 @@ export const constantRouterMap = [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/documentation/index'),
|
||||
name: 'documentation',
|
||||
name: 'Documentation',
|
||||
meta: { title: 'documentation', icon: 'documentation', noCache: true }
|
||||
}
|
||||
]
|
||||
@@ -85,7 +85,7 @@ export const constantRouterMap = [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/guide/index'),
|
||||
name: 'guide',
|
||||
name: 'Guide',
|
||||
meta: { title: 'guide', icon: 'guide', noCache: true }
|
||||
}
|
||||
]
|
||||
@@ -113,7 +113,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'page',
|
||||
component: () => import('@/views/permission/page'),
|
||||
name: 'pagePermission',
|
||||
name: 'PagePermission',
|
||||
meta: {
|
||||
title: 'pagePermission',
|
||||
roles: ['admin'] // or you can only set roles in sub nav
|
||||
@@ -122,7 +122,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'directive',
|
||||
component: () => import('@/views/permission/directive'),
|
||||
name: 'directivePermission',
|
||||
name: 'DirectivePermission',
|
||||
meta: {
|
||||
title: 'directivePermission'
|
||||
// if do not set roles, means: this page does not require permission
|
||||
@@ -138,7 +138,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/svg-icons/index'),
|
||||
name: 'icons',
|
||||
name: 'Icons',
|
||||
meta: { title: 'icons', icon: 'icon', noCache: true }
|
||||
}
|
||||
]
|
||||
@@ -154,7 +154,7 @@ export const asyncRouterMap = [
|
||||
path: '/example',
|
||||
component: Layout,
|
||||
redirect: '/example/list',
|
||||
name: 'example',
|
||||
name: 'Example',
|
||||
meta: {
|
||||
title: 'example',
|
||||
icon: 'example'
|
||||
@@ -163,20 +163,20 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'create',
|
||||
component: () => import('@/views/example/create'),
|
||||
name: 'createArticle',
|
||||
name: 'CreateArticle',
|
||||
meta: { title: 'createArticle', icon: 'edit' }
|
||||
},
|
||||
{
|
||||
path: 'edit/:id(\\d+)',
|
||||
component: () => import('@/views/example/edit'),
|
||||
name: 'editArticle',
|
||||
name: 'EditArticle',
|
||||
meta: { title: 'editArticle', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
component: () => import('@/views/example/list'),
|
||||
name: 'articleList',
|
||||
name: 'ArticleList',
|
||||
meta: { title: 'articleList', icon: 'list' }
|
||||
}
|
||||
]
|
||||
@@ -189,7 +189,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/tab/index'),
|
||||
name: 'tab',
|
||||
name: 'Tab',
|
||||
meta: { title: 'tab', icon: 'tab' }
|
||||
}
|
||||
]
|
||||
@@ -199,7 +199,7 @@ export const asyncRouterMap = [
|
||||
path: '/error',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'errorPages',
|
||||
name: 'ErrorPages',
|
||||
meta: {
|
||||
title: 'errorPages',
|
||||
icon: '404'
|
||||
@@ -208,13 +208,13 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: '401',
|
||||
component: () => import('@/views/errorPage/401'),
|
||||
name: 'page401',
|
||||
name: 'Page401',
|
||||
meta: { title: 'page401', noCache: true }
|
||||
},
|
||||
{
|
||||
path: '404',
|
||||
component: () => import('@/views/errorPage/404'),
|
||||
name: 'page404',
|
||||
name: 'Page404',
|
||||
meta: { title: 'page404', noCache: true }
|
||||
}
|
||||
]
|
||||
@@ -228,7 +228,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'log',
|
||||
component: () => import('@/views/errorLog/index'),
|
||||
name: 'errorLog',
|
||||
name: 'ErrorLog',
|
||||
meta: { title: 'errorLog', icon: 'bug' }
|
||||
}
|
||||
]
|
||||
@@ -238,7 +238,7 @@ export const asyncRouterMap = [
|
||||
path: '/excel',
|
||||
component: Layout,
|
||||
redirect: '/excel/export-excel',
|
||||
name: 'excel',
|
||||
name: 'Excel',
|
||||
meta: {
|
||||
title: 'excel',
|
||||
icon: 'excel'
|
||||
@@ -247,19 +247,19 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'export-excel',
|
||||
component: () => import('@/views/excel/exportExcel'),
|
||||
name: 'exportExcel',
|
||||
name: 'ExportExcel',
|
||||
meta: { title: 'exportExcel' }
|
||||
},
|
||||
{
|
||||
path: 'export-selected-excel',
|
||||
component: () => import('@/views/excel/selectExcel'),
|
||||
name: 'selectExcel',
|
||||
name: 'EelectExcel',
|
||||
meta: { title: 'selectExcel' }
|
||||
},
|
||||
{
|
||||
path: 'upload-excel',
|
||||
component: () => import('@/views/excel/uploadExcel'),
|
||||
name: 'uploadExcel',
|
||||
name: 'UploadExcel',
|
||||
meta: { title: 'uploadExcel' }
|
||||
}
|
||||
]
|
||||
@@ -275,7 +275,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'download',
|
||||
component: () => import('@/views/zip/index'),
|
||||
name: 'exportZip',
|
||||
name: 'ExportZip',
|
||||
meta: { title: 'exportZip' }
|
||||
}
|
||||
]
|
||||
@@ -289,7 +289,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/theme/index'),
|
||||
name: 'theme',
|
||||
name: 'Theme',
|
||||
meta: { title: 'theme', icon: 'theme' }
|
||||
}
|
||||
]
|
||||
@@ -303,7 +303,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/clipboard/index'),
|
||||
name: 'clipboardDemo',
|
||||
name: 'ClipboardDemo',
|
||||
meta: { title: 'clipboardDemo', icon: 'clipboard' }
|
||||
}
|
||||
]
|
||||
@@ -316,7 +316,7 @@ export const asyncRouterMap = [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/i18n-demo/index'),
|
||||
name: 'i18n',
|
||||
name: 'I18n',
|
||||
meta: { title: 'i18n', icon: 'international' }
|
||||
}
|
||||
]
|
||||
|
@@ -6,7 +6,7 @@ const chartsRouter = {
|
||||
path: '/charts',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'charts',
|
||||
name: 'Charts',
|
||||
meta: {
|
||||
title: 'charts',
|
||||
icon: 'chart'
|
||||
@@ -15,19 +15,19 @@ const chartsRouter = {
|
||||
{
|
||||
path: 'keyboard',
|
||||
component: () => import('@/views/charts/keyboard'),
|
||||
name: 'keyboardChart',
|
||||
name: 'KeyboardChart',
|
||||
meta: { title: 'keyboardChart', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'line',
|
||||
component: () => import('@/views/charts/line'),
|
||||
name: 'lineChart',
|
||||
name: 'LineChart',
|
||||
meta: { title: 'lineChart', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'mixchart',
|
||||
component: () => import('@/views/charts/mixChart'),
|
||||
name: 'mixChart',
|
||||
name: 'MixChart',
|
||||
meta: { title: 'mixChart', noCache: true }
|
||||
}
|
||||
]
|
||||
|
@@ -6,7 +6,7 @@ const componentsRouter = {
|
||||
path: '/components',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'component-demo',
|
||||
name: 'ComponentDemo',
|
||||
meta: {
|
||||
title: 'components',
|
||||
icon: 'component'
|
||||
@@ -15,79 +15,79 @@ const componentsRouter = {
|
||||
{
|
||||
path: 'tinymce',
|
||||
component: () => import('@/views/components-demo/tinymce'),
|
||||
name: 'tinymce-demo',
|
||||
name: 'TinymceDemo',
|
||||
meta: { title: 'tinymce' }
|
||||
},
|
||||
{
|
||||
path: 'markdown',
|
||||
component: () => import('@/views/components-demo/markdown'),
|
||||
name: 'markdown-demo',
|
||||
name: 'MarkdownDemo',
|
||||
meta: { title: 'markdown' }
|
||||
},
|
||||
{
|
||||
path: 'json-editor',
|
||||
component: () => import('@/views/components-demo/jsonEditor'),
|
||||
name: 'jsonEditor-demo',
|
||||
name: 'JsonEditorDemo',
|
||||
meta: { title: 'jsonEditor' }
|
||||
},
|
||||
{
|
||||
path: 'splitpane',
|
||||
component: () => import('@/views/components-demo/splitpane'),
|
||||
name: 'splitpane-demo',
|
||||
name: 'SplitpaneDemo',
|
||||
meta: { title: 'splitPane' }
|
||||
},
|
||||
{
|
||||
path: 'avatar-upload',
|
||||
component: () => import('@/views/components-demo/avatarUpload'),
|
||||
name: 'avatarUpload-demo',
|
||||
name: 'AvatarUploadDemo',
|
||||
meta: { title: 'avatarUpload' }
|
||||
},
|
||||
{
|
||||
path: 'dropzone',
|
||||
component: () => import('@/views/components-demo/dropzone'),
|
||||
name: 'dropzone-demo',
|
||||
name: 'DropzoneDemo',
|
||||
meta: { title: 'dropzone' }
|
||||
},
|
||||
{
|
||||
path: 'sticky',
|
||||
component: () => import('@/views/components-demo/sticky'),
|
||||
name: 'sticky-demo',
|
||||
name: 'StickyDemo',
|
||||
meta: { title: 'sticky' }
|
||||
},
|
||||
{
|
||||
path: 'count-to',
|
||||
component: () => import('@/views/components-demo/countTo'),
|
||||
name: 'countTo-demo',
|
||||
name: 'CountToDemo',
|
||||
meta: { title: 'countTo' }
|
||||
},
|
||||
{
|
||||
path: 'mixin',
|
||||
component: () => import('@/views/components-demo/mixin'),
|
||||
name: 'componentMixin-demo',
|
||||
name: 'ComponentMixinDemo',
|
||||
meta: { title: 'componentMixin' }
|
||||
},
|
||||
{
|
||||
path: 'back-to-top',
|
||||
component: () => import('@/views/components-demo/backToTop'),
|
||||
name: 'backToTop-demo',
|
||||
name: 'BackToTopDemo',
|
||||
meta: { title: 'backToTop' }
|
||||
},
|
||||
{
|
||||
path: 'drag-dialog',
|
||||
component: () => import('@/views/components-demo/dragDialog'),
|
||||
name: 'dragDialog-demo',
|
||||
name: 'DragDialogDemo',
|
||||
meta: { title: 'dragDialog' }
|
||||
},
|
||||
{
|
||||
path: 'dnd-list',
|
||||
component: () => import('@/views/components-demo/dndList'),
|
||||
name: 'dndList-demo',
|
||||
name: 'DndListDemo',
|
||||
meta: { title: 'dndList' }
|
||||
},
|
||||
{
|
||||
path: 'drag-kanban',
|
||||
component: () => import('@/views/components-demo/dragKanban'),
|
||||
name: 'dragKanban-demo',
|
||||
name: 'DragKanbanDemo',
|
||||
meta: { title: 'dragKanban' }
|
||||
}
|
||||
]
|
||||
|
@@ -6,7 +6,7 @@ const nestedRouter = {
|
||||
path: '/nested',
|
||||
component: Layout,
|
||||
redirect: '/nested/menu1/menu1-1',
|
||||
name: 'nested',
|
||||
name: 'Nested',
|
||||
meta: {
|
||||
title: 'nested',
|
||||
icon: 'nested'
|
||||
@@ -15,33 +15,33 @@ const nestedRouter = {
|
||||
{
|
||||
path: 'menu1',
|
||||
component: () => import('@/views/nested/menu1/index'), // Parent router-view
|
||||
name: 'menu1',
|
||||
name: 'Menu1',
|
||||
meta: { title: 'menu1' },
|
||||
redirect: '/nested/menu1/menu1-1',
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1',
|
||||
component: () => import('@/views/nested/menu1/menu1-1'),
|
||||
name: 'menu1-1',
|
||||
name: 'Menu1-1',
|
||||
meta: { title: 'menu1-1' }
|
||||
},
|
||||
{
|
||||
path: 'menu1-2',
|
||||
component: () => import('@/views/nested/menu1/menu1-2'),
|
||||
name: 'menu1-2',
|
||||
name: 'Menu1-2',
|
||||
redirect: '/nested/menu1/menu1-2/menu1-2-1',
|
||||
meta: { title: 'menu1-2' },
|
||||
children: [
|
||||
{
|
||||
path: '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' }
|
||||
},
|
||||
{
|
||||
path: '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' }
|
||||
}
|
||||
]
|
||||
@@ -49,14 +49,14 @@ const nestedRouter = {
|
||||
{
|
||||
path: 'menu1-3',
|
||||
component: () => import('@/views/nested/menu1/menu1-3'),
|
||||
name: 'menu1-3',
|
||||
name: 'Menu1-3',
|
||||
meta: { title: 'menu1-3' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu2',
|
||||
name: 'menu2',
|
||||
name: 'Menu2',
|
||||
component: () => import('@/views/nested/menu2/index'),
|
||||
meta: { title: 'menu2' }
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ const tableRouter = {
|
||||
path: '/table',
|
||||
component: Layout,
|
||||
redirect: '/table/complex-table',
|
||||
name: 'table',
|
||||
name: 'Table',
|
||||
meta: {
|
||||
title: 'Table',
|
||||
icon: 'table'
|
||||
@@ -15,37 +15,37 @@ const tableRouter = {
|
||||
{
|
||||
path: 'dynamic-table',
|
||||
component: () => import('@/views/table/dynamicTable/index'),
|
||||
name: 'dynamicTable',
|
||||
name: 'DynamicTable',
|
||||
meta: { title: 'dynamicTable' }
|
||||
},
|
||||
{
|
||||
path: 'drag-table',
|
||||
component: () => import('@/views/table/dragTable'),
|
||||
name: 'dragTable',
|
||||
name: 'DragTable',
|
||||
meta: { title: 'dragTable' }
|
||||
},
|
||||
{
|
||||
path: 'inline-edit-table',
|
||||
component: () => import('@/views/table/inlineEditTable'),
|
||||
name: 'inlineEditTable',
|
||||
name: 'InlineEditTable',
|
||||
meta: { title: 'inlineEditTable' }
|
||||
},
|
||||
{
|
||||
path: 'tree-table',
|
||||
component: () => import('@/views/table/treeTable/treeTable'),
|
||||
name: 'treeTableDemo',
|
||||
name: 'TreeTableDemo',
|
||||
meta: { title: 'treeTable' }
|
||||
},
|
||||
{
|
||||
path: 'custom-tree-table',
|
||||
component: () => import('@/views/table/treeTable/customTreeTable'),
|
||||
name: 'customTreeTableDemo',
|
||||
name: 'CustomTreeTableDemo',
|
||||
meta: { title: 'customTreeTable' }
|
||||
},
|
||||
{
|
||||
path: 'complex-table',
|
||||
component: () => import('@/views/table/complexTable'),
|
||||
name: 'complexTable',
|
||||
name: 'ComplexTable',
|
||||
meta: { title: 'complexTable' }
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user