page.ts 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. import type { AppRouteModule } from '/@/router/types';
  2. import { PAGE_LAYOUT_COMPONENT } from '/@/router/constant';
  3. import { ExceptionEnum } from '/@/enums/exceptionEnum';
  4. const ExceptionPage = () => import('/@/views/sys/exception/Exception');
  5. const page: AppRouteModule = {
  6. path: '/page-demo',
  7. name: 'PageDemo',
  8. component: PAGE_LAYOUT_COMPONENT,
  9. redirect: '/page-demo/exception',
  10. meta: {
  11. icon: 'mdi:page-next-outline',
  12. title: 'routes.demo.page.page',
  13. },
  14. children: [
  15. // =============================form start=============================
  16. {
  17. path: '/form',
  18. name: 'FormPage',
  19. redirect: '/page-demo/form/basic',
  20. meta: {
  21. title: 'routes.demo.page.form',
  22. },
  23. children: [
  24. {
  25. path: 'basic',
  26. name: 'FormBasicPage',
  27. component: () => import('/@/views/demo/page/form/basic/index.vue'),
  28. meta: {
  29. title: 'routes.demo.page.formBasic',
  30. },
  31. },
  32. {
  33. path: 'step',
  34. name: 'FormStepPage',
  35. component: () => import('/@/views/demo/page/form/step/index.vue'),
  36. meta: {
  37. title: 'routes.demo.page.formStep',
  38. },
  39. },
  40. {
  41. path: 'high',
  42. name: 'FormHightPage',
  43. component: () => import('/@/views/demo/page/form/high/index.vue'),
  44. meta: {
  45. title: 'routes.demo.page.formHigh',
  46. },
  47. },
  48. ],
  49. },
  50. // =============================form end=============================
  51. // =============================desc start=============================
  52. {
  53. path: '/desc',
  54. name: 'DescPage',
  55. redirect: '/page-demo/desc/basic',
  56. meta: {
  57. title: 'routes.demo.page.desc',
  58. },
  59. children: [
  60. {
  61. path: 'basic',
  62. name: 'DescBasicPage',
  63. component: () => import('/@/views/demo/page/desc/basic/index.vue'),
  64. meta: {
  65. title: 'routes.demo.page.descBasic',
  66. },
  67. },
  68. {
  69. path: 'high',
  70. name: 'DescHighPage',
  71. component: () => import('/@/views/demo/page/desc/high/index.vue'),
  72. meta: {
  73. title: 'routes.demo.page.descHigh',
  74. },
  75. },
  76. ],
  77. },
  78. // =============================desc end=============================
  79. // =============================result start=============================
  80. {
  81. path: '/result',
  82. name: 'ResultPage',
  83. redirect: '/page-demo/result/success',
  84. meta: {
  85. title: 'routes.demo.page.result',
  86. },
  87. children: [
  88. {
  89. path: 'success',
  90. name: 'ResultSuccessPage',
  91. component: () => import('/@/views/demo/page/result/success/index.vue'),
  92. meta: {
  93. title: 'routes.demo.page.resultSuccess',
  94. },
  95. },
  96. {
  97. path: 'fail',
  98. name: 'ResultFailPage',
  99. component: () => import('/@/views/demo/page/result/fail/index.vue'),
  100. meta: {
  101. title: 'routes.demo.page.resultFail',
  102. },
  103. },
  104. ],
  105. },
  106. // =============================result end=============================
  107. // =============================account start=============================
  108. {
  109. path: '/account',
  110. name: 'AccountPage',
  111. redirect: '/page-demo/account/setting',
  112. meta: {
  113. title: 'routes.demo.page.account',
  114. },
  115. children: [
  116. {
  117. path: 'center',
  118. name: 'AccountCenterPage',
  119. component: () => import('/@/views/demo/page/account/center/index.vue'),
  120. meta: {
  121. title: 'routes.demo.page.accountCenter',
  122. },
  123. },
  124. {
  125. path: 'setting',
  126. name: 'AccountSettingPage',
  127. component: () => import('/@/views/demo/page/account/setting/index.vue'),
  128. meta: {
  129. title: 'routes.demo.page.accountSetting',
  130. },
  131. },
  132. ],
  133. },
  134. // =============================account end=============================
  135. // =============================exception start=============================
  136. {
  137. path: '/exception',
  138. name: 'ExceptionPage',
  139. redirect: '/page-demo/exception/404',
  140. meta: {
  141. title: 'routes.demo.page.exception',
  142. },
  143. children: [
  144. {
  145. path: '403',
  146. name: 'PageNotAccess',
  147. component: ExceptionPage,
  148. props: {
  149. status: ExceptionEnum.PAGE_NOT_ACCESS,
  150. },
  151. meta: {
  152. title: '403',
  153. afterCloseLoading: true,
  154. },
  155. },
  156. {
  157. path: '404',
  158. name: 'PageNotFound',
  159. component: ExceptionPage,
  160. props: {
  161. status: ExceptionEnum.PAGE_NOT_FOUND,
  162. },
  163. meta: {
  164. title: '404',
  165. afterCloseLoading: true,
  166. },
  167. },
  168. {
  169. path: '500',
  170. name: 'ServiceError',
  171. component: ExceptionPage,
  172. props: {
  173. status: ExceptionEnum.ERROR,
  174. },
  175. meta: {
  176. title: '500',
  177. afterCloseLoading: true,
  178. },
  179. },
  180. {
  181. path: 'net-work-error',
  182. name: 'NetWorkError',
  183. component: ExceptionPage,
  184. props: {
  185. status: ExceptionEnum.NET_WORK_ERROR,
  186. },
  187. meta: {
  188. title: 'routes.demo.page.netWorkError',
  189. afterCloseLoading: true,
  190. },
  191. },
  192. {
  193. path: 'not-data',
  194. name: 'NotData',
  195. component: ExceptionPage,
  196. props: {
  197. status: ExceptionEnum.PAGE_NOT_DATA,
  198. },
  199. meta: {
  200. title: 'routes.demo.page.notData',
  201. afterCloseLoading: true,
  202. },
  203. },
  204. ],
  205. },
  206. // =============================exception end=============================
  207. // =============================list start=============================
  208. {
  209. path: '/list',
  210. name: 'ListPage',
  211. redirect: '/page-demo/list/card',
  212. meta: {
  213. title: 'routes.demo.page.list',
  214. },
  215. children: [
  216. {
  217. path: 'card',
  218. name: 'ListCardPage',
  219. component: () => import('/@/views/demo/page/list/card/index.vue'),
  220. meta: {
  221. title: 'routes.demo.page.listCard',
  222. },
  223. },
  224. ],
  225. },
  226. // =============================list end=============================
  227. ],
  228. };
  229. export default page;