routes.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import Login from './views/Login.vue'
  2. import NotFound from './views/404.vue'
  3. import Home from './views/Home.vue'
  4. import Main from './views/Main.vue'
  5. import Table from './views/nav1/Table.vue'
  6. import Form from './views/nav1/Form.vue'
  7. import user from './views/nav1/user.vue'
  8. import Page4 from './views/nav2/Page4.vue'
  9. import Page5 from './views/nav2/Page5.vue'
  10. import Page6 from './views/nav3/Page6.vue'
  11. import echarts from './views/charts/echarts.vue'
  12. let routes = [
  13. // 登录界面
  14. {
  15. path: '/login',
  16. component: Login,
  17. name: '',
  18. hidden: true
  19. },
  20. // 提示404界面
  21. {
  22. path: '/404',
  23. component: NotFound,
  24. name: '',
  25. hidden: true
  26. },
  27. // 面板页面
  28. {
  29. path: '/',
  30. component: Home,
  31. name: '',
  32. iconCls: 'el-icon-setting',
  33. leaf: true,//只有一个节点
  34. children: [
  35. { path: '/user_setting', component: Table, name: 'User Settings' }
  36. ]
  37. },
  38. {
  39. path: '/',
  40. component: Home,
  41. name: '功能页一',
  42. iconCls: 'el-icon-message',//图标样式class
  43. children: [
  44. // { path: '/table', component: Table, name: 'Table' },
  45. { path: '/form', component: Page6, name: '页面3' },
  46. { path: '/user', component: Page6, name: '页面4' },
  47. ]
  48. },
  49. {
  50. path: '/',
  51. component: Home,
  52. name: '功能页二',
  53. iconCls: 'el-icon-star-off',
  54. children: [
  55. { path: '/page4', component: Page6, name: '页面4' },
  56. { path: '/page5', component: Page6, name: '页面5' }
  57. ]
  58. },
  59. {
  60. path: '/',
  61. component: Home,
  62. name: '图表',
  63. iconCls: 'el-icon-picture',
  64. children: [
  65. { path: '/Page6', component: Page6, name: '页面6' }
  66. ]
  67. },
  68. // 找不到的时候,提示404页面
  69. {
  70. path: '*',
  71. hidden: true,
  72. redirect: { path: '/404' }
  73. }
  74. ];
  75. export default routes;