result.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { RouteRecordRaw } from 'vue-router';
  2. import { Layout } from '@/router/constant';
  3. import { CheckCircleOutlined } from '@vicons/antd';
  4. import { renderIcon } from '@/utils/index';
  5. /**
  6. * @param name 路由名称, 必须设置,且不能重名
  7. * @param meta 路由元信息(路由附带扩展信息)
  8. * @param redirect 重定向地址, 访问这个路由时,自定进行重定向
  9. * @param meta.disabled 禁用整个菜单
  10. * @param meta.title 菜单名称
  11. * @param meta.icon 菜单图标
  12. * @param meta.keepAlive 缓存该路由
  13. * @param meta.sort 排序越小越排前
  14. *
  15. * */
  16. const routes: Array<RouteRecordRaw> = [
  17. {
  18. path: '/result',
  19. name: 'Result',
  20. redirect: '/result/success',
  21. component: Layout,
  22. meta: {
  23. title: '结果页面',
  24. icon: renderIcon(CheckCircleOutlined),
  25. sort: 4,
  26. },
  27. children: [
  28. {
  29. path: 'success',
  30. name: 'result-success',
  31. meta: {
  32. title: '成功页',
  33. },
  34. component: () => import('@/views/result/success.vue'),
  35. },
  36. {
  37. path: 'fail',
  38. name: 'result-fail',
  39. meta: {
  40. title: '失败页',
  41. },
  42. component: () => import('@/views/result/fail.vue'),
  43. },
  44. {
  45. path: 'info',
  46. name: 'result-info',
  47. meta: {
  48. title: '信息页',
  49. },
  50. component: () => import('@/views/result/info.vue'),
  51. },
  52. ],
  53. },
  54. ];
  55. export default routes;