nav.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. import BasicLayout from '../layouts/BasicLayout';
  2. import UserLayout from '../layouts/UserLayout';
  3. import BlankLayout from '../layouts/BlankLayout';
  4. import Analysis from '../routes/Dashboard/Analysis';
  5. import Monitor from '../routes/Dashboard/Monitor';
  6. import Workplace from '../routes/Dashboard/Workplace';
  7. import TableList from '../routes/List/TableList';
  8. import CoverCardList from '../routes/List/CoverCardList';
  9. import CardList from '../routes/List/CardList';
  10. import FilterCardList from '../routes/List/FilterCardList';
  11. import SearchList from '../routes/List/SearchList';
  12. import BasicList from '../routes/List/BasicList';
  13. import BasicProfile from '../routes/Profile/BasicProfile';
  14. import AdvancedProfile from '../routes/Profile/AdvancedProfile';
  15. import BasicForm from '../routes/Forms/BasicForm';
  16. import AdvancedForm from '../routes/Forms/AdvancedForm';
  17. import StepForm from '../routes/Forms/StepForm';
  18. import Step2 from '../routes/Forms/StepForm/Step2';
  19. import Step3 from '../routes/Forms/StepForm/Step3';
  20. import Exception403 from '../routes/Exception/403';
  21. import Exception404 from '../routes/Exception/404';
  22. import Exception500 from '../routes/Exception/500';
  23. import Success from '../routes/Result/Success';
  24. import Error from '../routes/Result/Error';
  25. import Login from '../routes/User/Login';
  26. import Register from '../routes/User/Register';
  27. import RegisterResult from '../routes/User/RegisterResult';
  28. const data = [{
  29. component: BasicLayout,
  30. layout: 'BasicLayout',
  31. name: '首页', // for breadcrumb
  32. path: '',
  33. children: [{
  34. name: 'Dashboard',
  35. icon: 'dashboard',
  36. path: 'dashboard',
  37. children: [{
  38. name: '分析页',
  39. path: 'analysis',
  40. component: Analysis,
  41. }, {
  42. name: '监控页',
  43. path: 'monitor',
  44. component: Monitor,
  45. }, {
  46. name: '工作台',
  47. path: 'workplace',
  48. component: Workplace,
  49. }],
  50. }, {
  51. name: '表单页',
  52. path: 'form',
  53. icon: 'form',
  54. children: [{
  55. name: '基础表单',
  56. path: 'basic-form',
  57. component: BasicForm,
  58. }, {
  59. name: '分步表单',
  60. path: 'step-form',
  61. component: StepForm,
  62. children: [{
  63. path: 'confirm',
  64. component: Step2,
  65. }, {
  66. path: 'result',
  67. component: Step3,
  68. }],
  69. }, {
  70. name: '高级表单',
  71. path: 'advanced-form',
  72. component: AdvancedForm,
  73. }],
  74. }, {
  75. name: '列表页',
  76. path: 'list',
  77. icon: 'table',
  78. children: [{
  79. name: '查询表格',
  80. path: 'table-list',
  81. component: TableList,
  82. }, {
  83. name: '标准列表',
  84. path: 'basic-list',
  85. component: BasicList,
  86. }, {
  87. name: '卡片列表',
  88. path: 'card-list',
  89. component: CardList,
  90. }, {
  91. name: '搜索列表(项目)',
  92. path: 'cover-card-list',
  93. component: CoverCardList,
  94. }, {
  95. name: '搜索列表(应用)',
  96. path: 'filter-card-list',
  97. component: FilterCardList,
  98. }, {
  99. name: '搜索列表(文章)',
  100. path: 'search',
  101. component: SearchList,
  102. }],
  103. }, {
  104. name: '详情页',
  105. path: 'profile',
  106. icon: 'profile',
  107. children: [{
  108. name: '基础详情页',
  109. path: 'basic',
  110. component: BasicProfile,
  111. }, {
  112. name: '高级详情页',
  113. path: 'advanced',
  114. component: AdvancedProfile,
  115. }],
  116. }, {
  117. name: '结果',
  118. path: 'result',
  119. icon: 'check-circle-o',
  120. children: [{
  121. name: '成功',
  122. path: 'success',
  123. component: Success,
  124. }, {
  125. name: '失败',
  126. path: 'fail',
  127. component: Error,
  128. }],
  129. }, {
  130. name: '异常',
  131. path: 'exception',
  132. icon: 'warning',
  133. children: [{
  134. name: '403',
  135. path: '403',
  136. component: Exception403,
  137. }, {
  138. name: '404',
  139. path: '404',
  140. component: Exception404,
  141. }, {
  142. name: '500',
  143. path: '500',
  144. component: Exception500,
  145. }],
  146. }],
  147. }, {
  148. component: UserLayout,
  149. layout: 'UserLayout',
  150. children: [{
  151. name: '帐户',
  152. icon: 'user',
  153. path: 'user',
  154. children: [{
  155. name: '登录',
  156. path: 'login',
  157. component: Login,
  158. }, {
  159. name: '注册',
  160. path: 'register',
  161. component: Register,
  162. }, {
  163. name: '注册结果',
  164. path: 'register-result',
  165. component: RegisterResult,
  166. }],
  167. }],
  168. }, {
  169. component: BlankLayout,
  170. layout: 'BlankLayout',
  171. children: {
  172. name: '使用文档',
  173. path: 'http://pro.ant.design/docs/getting-started',
  174. target: '_blank',
  175. icon: 'book',
  176. },
  177. }];
  178. export function getNavData() {
  179. return data;
  180. }
  181. export default data;