asyncRouter.ts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. import type { RouteRecordRaw } from 'vue-router'
  2. const asyncRouter: RouteRecordRaw[] = [
  3. {
  4. path: '/home',
  5. name: 'home',
  6. component: () => import('@/views/exception/403.vue'),
  7. meta: {
  8. title: '首页',
  9. icon: 'House'
  10. }
  11. },
  12. {
  13. path: '/system',
  14. name: 'system',
  15. meta: {
  16. title: '系统管理',
  17. icon: 'icon-system'
  18. },
  19. children: [
  20. {
  21. path: '/system/user',
  22. name: 'systemUser',
  23. component: () => import('@/views/system/User.vue'),
  24. meta: {
  25. title: '用户管理',
  26. icon: 'user'
  27. }
  28. },
  29. {
  30. path: '/system/role',
  31. name: 'systemRole',
  32. component: () => import('@/views/system/Role.vue'),
  33. meta: {
  34. title: '角色管理',
  35. icon: 'avatar'
  36. }
  37. },
  38. {
  39. path: '/system/dict',
  40. name: 'systemDict',
  41. component: () => import('@/views/system/Dict.vue'),
  42. meta: {
  43. title: '字典管理',
  44. icon: 'memo'
  45. }
  46. },
  47. {
  48. path: '/system/menu',
  49. name: 'systemMenu',
  50. component: () => import('@/views/system/Menu.vue'),
  51. meta: {
  52. title: '菜单管理',
  53. icon: 'menu'
  54. }
  55. }
  56. ]
  57. },
  58. {
  59. path: '/org',
  60. name: 'org',
  61. meta: {
  62. title: '组织机构',
  63. icon: 'OfficeBuilding'
  64. },
  65. children: [
  66. {
  67. path: '/org/orgList',
  68. name: 'orgList',
  69. component: () => import('@/views/org/Org.vue'),
  70. meta: {
  71. title: '机构管理',
  72. icon: 'OfficeBuilding'
  73. }
  74. }
  75. ]
  76. },
  77. {
  78. path: '/miniprogram',
  79. name: 'miniprogram',
  80. meta: {
  81. title: '小程序管理',
  82. icon: 'icon-system'
  83. },
  84. children: [
  85. {
  86. path: '/miniprogram/banner',
  87. name: 'miniBanner',
  88. component: () => import('@/views/miniprogram/Banner.vue'),
  89. meta: {
  90. title: '轮播图',
  91. icon: 'picture'
  92. }
  93. },
  94. {
  95. path: '/miniprogram/question',
  96. name: 'miniQuestion',
  97. component: () => import('@/views/miniprogram/Question.vue'),
  98. meta: {
  99. title: '常见问题',
  100. icon: 'QuestionFilled'
  101. }
  102. },
  103. {
  104. path: '/miniprogram/feedback',
  105. name: 'miniFeedback',
  106. component: () => import('@/views/miniprogram/Feedback.vue'),
  107. meta: {
  108. title: '意见反馈',
  109. icon: 'Promotion'
  110. }
  111. },
  112. {
  113. path: '/miniprogram/about',
  114. name: 'miniAbout',
  115. component: () => import('@/views/miniprogram/About.vue'),
  116. meta: {
  117. title: '关于我们',
  118. icon: 'user'
  119. }
  120. },
  121. {
  122. path: '/miniprogram/version',
  123. name: 'miniVersion',
  124. component: () => import('@/views/miniprogram/Version.vue'),
  125. meta: {
  126. title: '版本信息',
  127. icon: 'list'
  128. }
  129. }
  130. ]
  131. },
  132. {
  133. path: '/list',
  134. name: 'list',
  135. meta: {
  136. title: '列表页',
  137. icon: 'icon-list-view'
  138. },
  139. children: [
  140. {
  141. path: '/list/cardList',
  142. name: 'cardList',
  143. component: () => import('@/views/list/CardList.vue'),
  144. meta: {
  145. title: '卡片列表',
  146. icon: 'icon-bank-card'
  147. }
  148. }
  149. ]
  150. },
  151. {
  152. path: '/form',
  153. name: 'form',
  154. meta: {
  155. title: '表单页',
  156. icon: 'Notebook'
  157. },
  158. children: [
  159. {
  160. path: '/form/basic',
  161. name: 'formBasic',
  162. component: () => import('@/views/form/Basic.vue'),
  163. meta: {
  164. title: '基础表单'
  165. }
  166. },
  167. {
  168. path: '/form/advanced',
  169. name: 'formAdvanced',
  170. component: () => import('@/views/form/Advanced.vue'),
  171. meta: {
  172. title: '高级表单'
  173. }
  174. },
  175. {
  176. path: '/form/test',
  177. name: 'test',
  178. meta: {
  179. title: 'ceshi'
  180. },
  181. children: [
  182. {
  183. path: '/form/basict',
  184. name: 'formBasict',
  185. component: () => import('@/views/form/Basic.vue'),
  186. meta: {
  187. title: '基础表单t'
  188. }
  189. },
  190. {
  191. path: '/form/advancedt',
  192. name: 'formAdvancedt',
  193. component: () => import('@/views/form/Advanced.vue'),
  194. meta: {
  195. title: '高级表单t'
  196. }
  197. }
  198. ]
  199. }
  200. ]
  201. },
  202. {
  203. path: '/result',
  204. name: 'result',
  205. meta: {
  206. title: '结果页',
  207. icon: 'CircleCheck'
  208. },
  209. children: [
  210. {
  211. path: '/result/success',
  212. name: 'resultSuccess',
  213. component: () => import('@/views/result/Success.vue'),
  214. meta: {
  215. title: '成功页'
  216. }
  217. },
  218. {
  219. path: '/result/error',
  220. name: 'resultError',
  221. component: () => import('@/views/result/Error.vue'),
  222. meta: {
  223. title: '失败页'
  224. }
  225. }
  226. ]
  227. },
  228. {
  229. path: '/:pathMatch(.*)*',
  230. redirect: '/exception/404',
  231. hidden: true
  232. }
  233. ]
  234. export default asyncRouter